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

Function test_hashBool

tests/unit/test_value.c:75–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void test_hashBool() {
76 SIValue siBool = SI_BoolVal(true);
77 SIValue siBoolOther = SI_BoolVal(true);
78 uint64_t origHashCode = SIValue_HashCode(siBool);
79 uint64_t otherHashCode = SIValue_HashCode(siBoolOther);
80 TEST_ASSERT(origHashCode == otherHashCode);
81
82 siBool = SI_BoolVal(false);
83 origHashCode = SIValue_HashCode(siBool);
84 TEST_ASSERT(origHashCode != otherHashCode);
85
86 siBoolOther = SI_BoolVal(false);
87 otherHashCode = SIValue_HashCode(siBoolOther);
88 TEST_ASSERT(origHashCode == otherHashCode);
89}
90
91void test_hashLong() {
92 // INT32 and INT64 tests take too long

Callers

nothing calls this directly

Calls 2

SI_BoolValFunction · 0.85
SIValue_HashCodeFunction · 0.85

Tested by

no test coverage detected