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

Function test_hashDouble

tests/unit/test_value.c:103–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void test_hashDouble() {
104 SIValue siDouble = SI_DoubleVal(3.14);
105 SIValue siDoubleOther = SI_DoubleVal(3.14);
106 uint64_t origHashCode = SIValue_HashCode(siDouble);
107 uint64_t otherHashCode = SIValue_HashCode(siDoubleOther);
108 TEST_ASSERT(origHashCode == otherHashCode);
109
110 siDouble = SI_DoubleVal(3.14159265);
111 origHashCode = SIValue_HashCode(siDouble);
112 TEST_ASSERT(origHashCode != otherHashCode);
113
114 siDoubleOther = SI_DoubleVal(3.14159265);
115 otherHashCode = SIValue_HashCode(siDoubleOther);
116 TEST_ASSERT(origHashCode == otherHashCode);
117}
118
119void test_edge() {
120 AttributeSet attr;

Callers

nothing calls this directly

Calls 2

SI_DoubleValFunction · 0.85
SIValue_HashCodeFunction · 0.85

Tested by

no test coverage detected