mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-26 04:05:59 +01:00
Fixed 3 of the VALID_VALUES on the
UnsignedIntegerTest not being bytes. Added Long and UnsignedLong tests.
This commit is contained in:
parent
5eddb67489
commit
4e6f223a7d
@ -231,15 +231,23 @@ class UnsignedIntegerTest(BaseNumberDatatypeTester):
|
|||||||
DATATYPE_CLS = UnsignedInteger
|
DATATYPE_CLS = UnsignedInteger
|
||||||
|
|
||||||
VALID_VALUES = [
|
VALID_VALUES = [
|
||||||
(0, "\x00\x00\x00\x00"),
|
(0, b"\x00\x00\x00\x00"),
|
||||||
(10000000, "\x00\x98\x96\x80"),
|
(10000000, b"\x00\x98\x96\x80"),
|
||||||
(2147483647, b"\x7f\xff\xff\xff"),
|
(2147483647, b"\x7f\xff\xff\xff"),
|
||||||
(4294967295, "\xff\xff\xff\xff")
|
(4294967295, b"\xff\xff\xff\xff")
|
||||||
]
|
]
|
||||||
|
|
||||||
INVALID_DESERIALIZATION_VALUES = IntegerTest.INVALID_DESERIALIZATION_VALUES
|
INVALID_DESERIALIZATION_VALUES = IntegerTest.INVALID_DESERIALIZATION_VALUES
|
||||||
|
|
||||||
|
|
||||||
|
class LongTest(IntegerTest):
|
||||||
|
DATATYPE_CLS = Long
|
||||||
|
|
||||||
|
|
||||||
|
class UnsignedLongTest(UnsignedInteger):
|
||||||
|
DATATYPE_CLS = UnsignedLong
|
||||||
|
|
||||||
|
|
||||||
# def _bin(binstr):
|
# def _bin(binstr):
|
||||||
# """
|
# """
|
||||||
# Accepts a pretty looking string of binary numbers and
|
# Accepts a pretty looking string of binary numbers and
|
||||||
|
Loading…
Reference in New Issue
Block a user