func TesIsEmptyClause(t *testing.T) {
testTable := []struct {
in *GraphClause
out bool
}{
{
in: &GraphClause{},
out: true,
},
{
in: &GraphClause{SBinding: "?foo"},
out: true,
},
}
for _, entry := range testTable {
if got, want := entry.in.IsEmpty(), entry.out; got != want {
t.Errorf("IsEmpty for %v returned %v, but should have returned %v", entry.in, got, want)
}
}
}
--- FAIL: TestIsEmptyClause (0.00s)
semantic_test.go:148: IsEmpty for &{<nil> ?foo <nil> <nil> <nil> false <nil> <nil> <nil> false} returned false, but should have returned true
FAIL
FAIL github.com/google/badwolf/bql/semantic 0.028s
In bql/semantic/semantic_test.go, there is a typo in a test name that causes it to be ignored:
After changing the name to the proper
TestIsEmptyClauseand running the tests, the test fails: