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

Function test_long_int

Python/unit_test.py:68–89  ·  view source on GitHub ↗
(kv)

Source from the content-addressed store, hash-verified

66
67
68def test_long_int(kv):
69 MinLongInt = -1 * (2 ** 63)
70 ret = kv.set(MinLongInt, 'LongInt')
71 assert ret
72
73 value = kv.getLongInt('LongInt')
74 assert value == MinLongInt
75
76 MaxLongInt = (2 ** 63) - 1
77 ret = kv.set(MaxLongInt, 'LongInt')
78 assert ret
79
80 value = kv.getLongInt('LongInt')
81 assert value == MaxLongInt
82
83 value = kv.getLongInt(KeyNotExist)
84 assert value == 0
85
86 value = kv.getLongInt(KeyNotExist, -1)
87 assert value == -1
88
89 print('test long int: passed')
90
91
92def test_long_uint(kv):

Callers 1

unit_test.pyFile · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected