Exemplo n.º 1
0
func testForDoublettes(assert *assert.Assertions, nodes []*GraphNode) {
	for i, node := range nodes {
		for y, node2 := range nodes {
			if i != y {
				assert.False(node.NodeId == node2.NodeId && node.Id == node2.Id,
					"Doublette node found at positions %d and %d with ids %s and %s", i, y, node.Id, node2.Id)
			}
		}
	}
}
Exemplo n.º 2
0
func assertInputInStore(input string, ref ref.Ref, s ChunkStore, assert *assert.Assertions) {
	chunk := s.Get(ref)
	assert.False(chunk.IsEmpty(), "Shouldn't get empty chunk for %s", ref.String())
	assert.Equal(input, string(chunk.Data()))
}
Exemplo n.º 3
0
func AssertSymNe(assert *assert.Assertions, a, b Value) {
	assert.False(a.Equals(b))
	assert.False(b.Equals(a))
}
Exemplo n.º 4
0
func assertGetNoExist(a *assert.Assertions, s KVStore, schema string, key string) {
	val, exist, err := s.Get(schema, key)
	a.NoError(err)
	a.False(exist)
	a.Nil(val)
}