| 66 | } |
| 67 | |
| 68 | void 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 | |
| 84 | void testInt64(MMKV *mmkv) { |
| 85 | auto ret = mmkv->set(numeric_limits<int64_t>::min(), "int64"); |