This commit is contained in:
Bel LaPointe
2021-12-15 07:33:50 -07:00
parent bc8a0d82df
commit 44ce475100
5 changed files with 147 additions and 13 deletions

View File

@@ -43,6 +43,17 @@ func TestKeysDFS(t *testing.T) {
if err != nil {
t.Fatal(err)
}
for j := range c.want {
found := false
for i := range got {
if fmt.Sprint(got[i]) == fmt.Sprint(c.want[j]) {
found = true
}
}
if !found {
t.Errorf("want %+v among %+v", c.want[j], got)
}
}
if fmt.Sprintf("%+v", got) != fmt.Sprintf("%+v", c.want) {
t.Fatalf("want: %+v\ngot: %+v", c.want, got)
}