MCPcopy Index your code
hub / github.com/google/mangle / TestEmptyStore

Function TestEmptyStore

factstore/simplecolumn_test.go:199–213  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

197}
198
199func TestEmptyStore(t *testing.T) {
200 emptyStore := NewSimpleInMemoryStore()
201 var b bytes.Buffer
202 sc := SimpleColumn{}
203 if err := sc.WriteTo(emptyStore, &b); err != nil {
204 t.Fatal(err)
205 }
206 store, err := NewSimpleColumnStoreFromBytes(b.Bytes())
207 if err != nil {
208 t.Fatal(err)
209 }
210 if diff := cmp.Diff([]ast.PredicateSym{}, store.ListPredicates()); diff != "" {
211 t.Errorf("NewSimpleColumnStoreFromBytes: diff (-want +got) %v", diff)
212 }
213}
214
215func sortBySymbol(a ast.PredicateSym, b ast.PredicateSym) bool {
216 return a.Symbol < b.Symbol

Callers

nothing calls this directly

Calls 4

WriteToMethod · 0.95
NewSimpleInMemoryStoreFunction · 0.85
ListPredicatesMethod · 0.65

Tested by

no test coverage detected