MCPcopy Create free account
hub / github.com/Tencent/MMKV / testUInt64

Function testUInt64

POSIX/demo/UnitTest.cpp:100–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void testUInt64(MMKV *mmkv) {
101 auto ret = mmkv->set(numeric_limits<uint64_t>::max(), "uint64");
102 assert(ret);
103
104 auto value = mmkv->getUInt64("uint64");
105 assert(value == numeric_limits<uint64_t>::max());
106
107 value = mmkv->getUInt64(KeyNotExist);
108 assert(value == 0);
109
110 value = mmkv->getUInt64(KeyNotExist, -1);
111 assert(value == -1);
112
113 printf("test uint64: passed\n");
114}
115
116template <typename T>
117bool EqualWithAccuracy(T value1, T value2, T accuracy) {

Callers 1

mainFunction · 0.85

Calls 2

setMethod · 0.45
getUInt64Method · 0.45

Tested by

no test coverage detected