add tuples tests

This commit is contained in:
Neemek 2026-07-11 12:51:39 +02:00
parent e03d18c7db
commit 94b12f28ab
Signed by: neemek
GPG key ID: 84FFE4D7D40AB25E
3 changed files with 101 additions and 101 deletions

View file

@ -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")
}