Skip to content

Commit 88dcf55

Browse files
committed
symtable: fix tests after move
1 parent 0f4c714 commit 88dcf55

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

symtable/symtable_test.go

+18
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ import (
1010
"github.com/ncw/gpython/py"
1111
)
1212

13+
func EqString(t *testing.T, name string, a, b string) {
14+
if a != b {
15+
t.Errorf("%s want %q, got %q", name, a, b)
16+
}
17+
}
18+
19+
func EqStrings(t *testing.T, name string, a, b []string) {
20+
if len(a) != len(b) {
21+
t.Errorf("%s has differing length, want %v, got %v", name, a, b)
22+
return
23+
}
24+
for i := range a {
25+
if a[i] != b[i] {
26+
t.Errorf("%s[%d] has differs, want %v, got %v", name, i, a, b)
27+
}
28+
}
29+
}
30+
1331
func EqInt(t *testing.T, name string, a, b int) {
1432
if a != b {
1533
t.Errorf("%s want %v, got %v", name, a, b)

0 commit comments

Comments
 (0)