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

Function testUInt32

POSIX/demo/UnitTest.cpp:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void testUInt32(MMKV *mmkv) {
69 auto ret = mmkv->set(numeric_limits<uint32_t>::max(), "uint32");
70 assert(ret);
71
72 auto value = mmkv->getUInt32("uint32");
73 assert(value == numeric_limits<uint32_t>::max());
74
75 value = mmkv->getUInt32(KeyNotExist);
76 assert(value == 0);
77
78 value = mmkv->getUInt32(KeyNotExist, -1);
79 assert(value == -1);
80
81 printf("test uint32: passed\n");
82}
83
84void testInt64(MMKV *mmkv) {
85 auto ret = mmkv->set(numeric_limits<int64_t>::min(), "int64");

Callers 1

mainFunction · 0.85

Calls 2

setMethod · 0.45
getUInt32Method · 0.45

Tested by

no test coverage detected