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

Function testInt64

POSIX/demo/UnitTest.cpp:84–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void testInt64(MMKV *mmkv) {
85 auto ret = mmkv->set(numeric_limits<int64_t>::min(), "int64");
86 assert(ret);
87
88 auto value = mmkv->getInt64("int64");
89 assert(value == numeric_limits<int64_t>::min());
90
91 value = mmkv->getInt64(KeyNotExist);
92 assert(value == 0);
93
94 value = mmkv->getInt64(KeyNotExist, -1);
95 assert(value == -1);
96
97 printf("test int64: passed\n");
98}
99
100void testUInt64(MMKV *mmkv) {
101 auto ret = mmkv->set(numeric_limits<uint64_t>::max(), "uint64");

Callers 1

mainFunction · 0.85

Calls 2

setMethod · 0.45
getInt64Method · 0.45

Tested by

no test coverage detected