(t *testing.T)
| 500 | } |
| 501 | |
| 502 | func TestTemporalStore_ListPredicates(t *testing.T) { |
| 503 | store := NewTemporalStore() |
| 504 | |
| 505 | store.Add(ast.NewAtom("foo", name("/a")), ast.EternalInterval()) |
| 506 | store.Add(ast.NewAtom("bar", name("/b")), ast.EternalInterval()) |
| 507 | store.Add(ast.NewAtom("baz", name("/c")), ast.EternalInterval()) |
| 508 | |
| 509 | preds := store.ListPredicates() |
| 510 | if len(preds) != 3 { |
| 511 | t.Errorf("ListPredicates returned %d predicates, want 3", len(preds)) |
| 512 | } |
| 513 | |
| 514 | // Check that all predicates are present |
| 515 | found := make(map[string]bool) |
| 516 | for _, p := range preds { |
| 517 | found[p.Symbol] = true |
| 518 | } |
| 519 | |
| 520 | for _, expected := range []string{"foo", "bar", "baz"} { |
| 521 | if !found[expected] { |
| 522 | t.Errorf("ListPredicates missing %s", expected) |
| 523 | } |
| 524 | } |
| 525 | } |
nothing calls this directly
no test coverage detected