(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestRecursiveNext(t *testing.T) { |
| 55 | ctx := context.TODO() |
| 56 | qs := rec_test_qs |
| 57 | start := NewFixed() |
| 58 | start.Add(graph.PreFetched(quad.Raw("alice"))) |
| 59 | r := NewRecursive(start, singleHop(qs, "parent"), 0) |
| 60 | expected := []string{"bob", "charlie", "dani", "emily"} |
| 61 | |
| 62 | var got []string |
| 63 | for r.Next(ctx) { |
| 64 | got = append(got, quad.ToString(qs.NameOf(r.Result()))) |
| 65 | } |
| 66 | sort.Strings(expected) |
| 67 | sort.Strings(got) |
| 68 | if !reflect.DeepEqual(got, expected) { |
| 69 | t.Errorf("Failed to %s, got: %v, expected: %v", "check basic recursive iterator", got, expected) |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | func TestRecursiveContains(t *testing.T) { |
| 74 | ctx := context.TODO() |
nothing calls this directly
no test coverage detected