add tuples tests
This commit is contained in:
parent
e03d18c7db
commit
94b12f28ab
3 changed files with 101 additions and 101 deletions
|
|
@ -96,6 +96,19 @@ func CompareValues(t *testing.T, got Value, want Value) {
|
|||
CompareValues(t, v, m.Members[k])
|
||||
}
|
||||
|
||||
case TupleValueType:
|
||||
n := got.(*TupleValue)
|
||||
m := want.(*TupleValue)
|
||||
|
||||
if len(n.Items) != len(m.Items) {
|
||||
t.Fatalf("tuple item count mismatch: got %d items, want %d items", len(n.Items), len(m.Items))
|
||||
}
|
||||
|
||||
for i, v := range n.Items {
|
||||
t.Logf("comparing tuple item #%d", i)
|
||||
CompareValues(t, v, m.Items[i])
|
||||
}
|
||||
|
||||
default:
|
||||
panic("unimplemented comparison")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue