tracks/go/exercises/wordy/wordy_test.go in trackler-2.0.6.28 vs tracks/go/exercises/wordy/wordy_test.go in trackler-2.0.6.29
- old
+ new
@@ -1,9 +1,11 @@
package wordy
import "testing"
+const targetTestVersion = 1
+
var tests = []struct {
q string
a int
ok bool
}{
@@ -21,9 +23,15 @@
{"What is 2 multiplied by -2 multiplied by 3?", -12, true},
{"What is -3 plus 7 multiplied by -2?", -8, true},
{"What is -12 divided by 2 divided by -3?", 2, true},
{"What is 53 cubed?", 0, false},
{"Who is the president of the United States?", 0, false},
+}
+
+func TestTestVersion(t *testing.T) {
+ if testVersion != targetTestVersion {
+ t.Fatalf("Found testVersion = %v, want %v", testVersion, targetTestVersion)
+ }
}
func TestAnswer(t *testing.T) {
for _, test := range tests {
switch a, ok := Answer(test.q); {