func startingPoints(t *assert.Assertions) ([]*Node, *ItemSets, int) { c := &config.Config{} i, err := NewItemSets(c, NewIntLoader) t.Nil(err) N, err := i.Loader().(*IntLoader).startingPoints(iterItems(items), 3) t.Nil(err) nodes := make([]*Node, 0, len(N)) for _, node := range N { n := node.(*Node) nodes = append(nodes, n) t.True(len(n.txs) >= 3, "len(n.txs) %d < 3", len(n.txs)) } return nodes, i, 3 }
func AssertSymEq(assert *assert.Assertions, a, b Value) { assert.True(a.Equals(b)) assert.True(b.Equals(a)) }
func assertGet(a *assert.Assertions, s KVStore, schema string, key string, expectedValue []byte) { val, exist, err := s.Get(schema, key) a.NoError(err) a.True(exist) a.Equal(expectedValue, val) }