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

Function compare_nodes

tests/unit/test_query_graph.c:39–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void compare_nodes(const QGNode *a, const QGNode *b) {
40 uint a_lbl_count = QGNode_LabelCount(a);
41 uint b_lbl_count = QGNode_LabelCount(b);
42 TEST_ASSERT(a_lbl_count == b_lbl_count);
43 for(uint i = 0; i < a_lbl_count; i++) {
44 TEST_ASSERT(a->labelsID[i] == b->labelsID[i]);
45 }
46 TEST_ASSERT(array_len(a->incoming_edges) == array_len(b->incoming_edges));
47 TEST_ASSERT(array_len(a->outgoing_edges) == array_len(b->outgoing_edges));
48}
49
50void compare_edges(const QGEdge *a, const QGEdge *b) {
51 TEST_ASSERT(a->alias == b->alias);

Callers 2

compare_edgesFunction · 0.85
test_QueryGraphCloneFunction · 0.85

Calls 2

QGNode_LabelCountFunction · 0.85
array_lenFunction · 0.85

Tested by

no test coverage detected