MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / compare_edges

Function compare_edges

tests/unit/test_query_graph.c:50–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void compare_edges(const QGEdge *a, const QGEdge *b) {
51 TEST_ASSERT(a->alias == b->alias);
52 uint relcount = array_len(a->reltypes);
53 TEST_ASSERT(relcount == array_len(b->reltypes));
54 for(uint i = 0; i < relcount; i ++) {
55 TEST_ASSERT(strcmp(a->reltypes[i], b->reltypes[i]) == 0);
56 TEST_ASSERT(a->reltypeIDs[i] == b->reltypeIDs[i]);
57 }
58
59 compare_nodes(a->src, b->src);
60 compare_nodes(a->dest, b->dest);
61}
62
63bool contains_node(const QueryGraph *qg, const QGNode *n) {
64 uint count = QueryGraph_NodeCount(qg);

Callers 1

test_QueryGraphCloneFunction · 0.85

Calls 2

array_lenFunction · 0.85
compare_nodesFunction · 0.85

Tested by

no test coverage detected