MCPcopy Create free account
hub / github.com/e2wugui/zeze / check_uint

Method check_uint

python/test/test_buffer.py:266–277  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

264 self.assertEqual(bb.wi, ByteBuffer.write_long_size(x))
265
266 def check_uint(self, x):
267 x = ByteBuffer.truncate_int(x)
268 bb = ByteBuffer()
269 bb1 = ByteBuffer()
270 bb.write_uint(x)
271 bb1.write_ulong(x & 0xffff_ffff)
272 self.assertTrue(bb.__eq__(bb1))
273 y = bb.read_uint()
274 self.assertEqual(x, y)
275 self.assertEqual(bb.ri, bb.wi)
276 self.assertEqual(bb.wi, ByteBuffer.write_uint_size(x))
277 self.assertEqual(bb.wi, ByteBuffer.write_ulong_size(x & 0xffff_ffff))
278
279 def check_ulong(self, x):
280 x = ByteBuffer.truncate_long(x)

Callers 2

check_allMethod · 0.95
test_integerMethod · 0.95

Calls 8

write_uintMethod · 0.95
write_ulongMethod · 0.95
__eq__Method · 0.95
read_uintMethod · 0.95
ByteBufferClass · 0.90
truncate_intMethod · 0.80
write_uint_sizeMethod · 0.80
write_ulong_sizeMethod · 0.80

Tested by

no test coverage detected