(t *testing.T)
| 172 | } |
| 173 | |
| 174 | func TestFiltered(t *testing.T) { |
| 175 | m := testStore(t) |
| 176 | sc := SimpleColumn{true /* deterministic */} |
| 177 | var buf bytes.Buffer |
| 178 | if err := sc.WriteTo(m, &buf); err != nil { |
| 179 | t.Fatal(err) |
| 180 | } |
| 181 | |
| 182 | s, err := NewSimpleColumnStore(func() (io.ReadCloser, error) { |
| 183 | return io.NopCloser(bytes.NewReader(buf.Bytes())), nil |
| 184 | }) |
| 185 | |
| 186 | if err != nil { |
| 187 | t.Fatal(err) |
| 188 | } |
| 189 | |
| 190 | if !s.Contains(evalAtom("bar([/abc, /def], 5, /def)")) { |
| 191 | t.Errorf("Contains(bar([/abc, /def], 5, /def))=false want true") |
| 192 | } |
| 193 | |
| 194 | if s.Contains(evalAtom("bar(/nope, /nope, /nope)")) { |
| 195 | t.Errorf("Contains(bar(/nope, /nope, /nope)=true want false") |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | func TestEmptyStore(t *testing.T) { |
| 200 | emptyStore := NewSimpleInMemoryStore() |
nothing calls this directly
no test coverage detected