restructured some test files
This commit is contained in:
+9
-3
@@ -23,11 +23,17 @@ func runCtxTestSuiteSpec(t *testing.T, ctx kern.ExprContext, section string, inp
|
||||
succeeded := 0
|
||||
failed := 0
|
||||
for _, count := range spec {
|
||||
good := doTest(t, ctx, section, &inputs[count-1], count)
|
||||
index := count - 1
|
||||
if index >= 0 && index < len(inputs) {
|
||||
good := doTest(t, ctx, section, &inputs[index], count)
|
||||
|
||||
if good {
|
||||
succeeded++
|
||||
if good {
|
||||
succeeded++
|
||||
} else {
|
||||
failed++
|
||||
}
|
||||
} else {
|
||||
t.Errorf("%s -- test count: %d, invalid index", section, count)
|
||||
failed++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user