Skip to content
Snippets Groups Projects
Commit 3cb50a6e authored by Andrew E. Torda's avatar Andrew E. Torda
Browse files

About to play with being able to turn off csv files.

parent 45a7f8a6
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ ini_temp 0.5
final_temp 0.05
x_ini 7,1,7
n_step 100000
fOutName testreal`
fOutName ""`
// These values seem to work well. There is something of a phase
// transition near temperature 0.09. Good values for an optimisation
......@@ -154,6 +154,29 @@ func TestSetSuffix (t *testing.T) {
}
}
func TestRemoveQuotes(t *testing.T) {
var tdata = []struct {
in, out string
} {
{"hello", "hello"},
{"", ""},
{`"`, ""},
{`""`, ""},
{`"""`, ""},
{`""a"`, "a"},
{`""aa"`, "aa"},
{`""a""`, "a"},
{`"a"`, "a"},
{`a"`, "a"},
{`a""`, "a"},
}
for _, ss := range tdata {
if out := RemoveQuotes (ss.in); out != ss.out {
t.Fatalf ("Wanted <%s>, got <%s>. Input was <%s>", ss.out, out, ss.in)
}
}
}
// Check that errors are generated
func TestSetSuffixErr(t *testing.T) {
var tdata = []struct{ in, suffix string }{
......
......@@ -204,7 +204,6 @@ func doRun(mcPrm *mcPrm) error {
}
newx(x, xT, cprm.rand, xDlta)
fTrial = ackley.Ackley(xT)
if fTrial <= fOld {
accept = true
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment