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

Function test_edge

tests/unit/test_value.c:119–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void test_edge() {
120 AttributeSet attr;
121
122 Edge e0;
123 e0.id = 0;
124 e0.attributes = &attr;
125 SIValue edge = SI_Edge(&e0);
126
127 Edge e0Other = e0;
128 SIValue edgeOther = SI_Edge(&e0Other);
129
130 // Validate same hashCode for the same value, different address.
131 uint64_t origHashCode = SIValue_HashCode(edge);
132 uint64_t otherHashCode = SIValue_HashCode(edgeOther);
133 TEST_ASSERT(origHashCode == otherHashCode);
134
135 // Change entity id.
136 Edge e1 = e0;
137 e1.id = 1;
138 edgeOther = SI_Edge(&e1);
139 otherHashCode = SIValue_HashCode(edgeOther);
140 TEST_ASSERT(origHashCode != otherHashCode);
141}
142
143void test_node() {
144 AttributeSet attr;

Callers

nothing calls this directly

Calls 2

SI_EdgeFunction · 0.85
SIValue_HashCodeFunction · 0.85

Tested by

no test coverage detected