Skip to content

Commit 1958171

Browse files
committed
Add more unit test cases for COBS/R
1 parent 68cebe6 commit 1958171

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

python2/cobs/cobsr/test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ class PredefinedEncodingsTests(unittest.TestCase):
3939
[ "\x7F", "\x7F" ],
4040
[ "\x80", "\x80" ],
4141
[ "\xD5", "\xD5" ],
42-
[ "1", "1" ],
42+
[ "\xFE", "\xFE" ],
43+
[ "\xFF", "\xFF" ],
44+
[ "a\x02", "\x03a\x02" ],
45+
[ "a\x03", "\x03a" ],
46+
[ "a\xFF", "\xFFa" ],
4347
[ "\x05\x04\x03\x02\x01", "\x06\x05\x04\x03\x02\x01" ],
4448
[ "12345", "51234" ],
4549
[ "12345\x00\x04\x03\x02\x01", "\x0612345\x05\x04\x03\x02\x01" ],

python3/cobs/cobsr/test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ class PredefinedEncodingsTests(unittest.TestCase):
3939
[ b"\x7F", b"\x7F" ],
4040
[ b"\x80", b"\x80" ],
4141
[ b"\xD5", b"\xD5" ],
42-
[ b"1", b"1" ],
42+
[ b"\xFE", b"\xFE" ],
43+
[ b"\xFF", b"\xFF" ],
44+
[ b"a\x02", b"\x03a\x02" ],
45+
[ b"a\x03", b"\x03a" ],
46+
[ b"a\xFF", b"\xFFa" ],
4347
[ b"\x05\x04\x03\x02\x01", b"\x06\x05\x04\x03\x02\x01" ],
4448
[ b"12345", b"51234" ],
4549
[ b"12345\x00\x04\x03\x02\x01", b"\x0612345\x05\x04\x03\x02\x01" ],

0 commit comments

Comments
 (0)