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

Table driven version of original tests.

parent bfce75c9
No related branches found
No related tags found
No related merge requests found
...@@ -22,12 +22,6 @@ n_step 10000 ...@@ -22,12 +22,6 @@ n_step 10000
n_output 5000 n_output 5000
f_outName testanneal1d` f_outName testanneal1d`
func TestAnneal1d(t *testing.T) {
if err := realmain(strings.NewReader(s1d)); err != nil {
t.Fatal("anneal run", err)
}
}
var s3d = ` var s3d = `
ini_temp 1 ini_temp 1
final_temp 0.05 final_temp 0.05
...@@ -36,13 +30,6 @@ n_step 10000 ...@@ -36,13 +30,6 @@ n_step 10000
n_output 500 n_output 500
f_outName testanneal3d` f_outName testanneal3d`
func TestAnneal3d(t *testing.T) {
if err := realmain(strings.NewReader(s3d)); err != nil {
t.Fatal("anneal run", err)
}
}
var sCold = ` var sCold = `
ini_temp 1e-10 ini_temp 1e-10
final_temp 1e-12 final_temp 1e-12
...@@ -51,8 +38,20 @@ n_step 10000 ...@@ -51,8 +38,20 @@ n_step 10000
n_output 500 n_output 500
f_outName testcold` f_outName testcold`
func TestCold(t *testing.T) { var sHot = `
if err := realmain(strings.NewReader(sCold)); err != nil { ini_temp 1
t.Fatal("anneal run", err) final_temp 1
x_ini 1,1,1
n_step 10000
n_output 500
f_outName testhot`
var plottable_test = []string {s1d, s3d, sHot, sCold}
func TestPlottable (t *testing.T) {
for _, s := range plottable_test {
if err := realmain(strings.NewReader(sHot)); err != nil {
t.Fatal("plottable failed with\n", err, "\nInput", s)
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment