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

Function test_strings

tests/unit/test_value.c:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void test_strings() {
50 SIValue v;
51 char const *str = "Test!";
52 v = SIValue_FromString(str);
53 TEST_ASSERT(v.type == T_STRING);
54 TEST_ASSERT(strcmp(v.stringval, "Test!") == 0);
55 SIValue_Free(v);
56
57 // out of double range
58 str = "1.0001e10001";
59 v = SIValue_FromString(str);
60 TEST_ASSERT(v.type == T_STRING);
61 TEST_ASSERT(strcmp(v.stringval, "1.0001e10001") == 0);
62 SIValue_Free(v);
63}
64
65// idempotence and correctness tests for:
66// null, bool, long, double, edge, node, array.

Callers

nothing calls this directly

Calls 2

SIValue_FromStringFunction · 0.85
SIValue_FreeFunction · 0.85

Tested by

no test coverage detected