We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d53891 commit c207770Copy full SHA for c207770
test/ber/test_ber.rb
@@ -47,7 +47,15 @@ def test_false
47
# negatives
48
-1 => "\x02\x01\xFF",
49
-127 => "\x02\x01\x81",
50
- -128 => "\x02\x01\x80"
+ -128 => "\x02\x01\x80",
51
+ -255 => "\x02\x02\xFF\x01",
52
+ -256 => "\x02\x02\xFF\x00",
53
+ -65535 => "\x02\x03\xFF\x00\x01",
54
+ -65536 => "\x02\x03\xFF\x00\x00",
55
+ -65537 => "\x02\x03\xFE\xFF\xFF",
56
+ -8388607 => "\x02\x03\x80\x00\x01",
57
+ -8388608 => "\x02\x03\x80\x00\x00",
58
+ -16_777_215 => "\x02\x04\xFF\x00\x00\x01",
59
}.each do |number, expected_encoding|
60
define_method "test_encode_#{number}" do
61
assert_equal expected_encoding.b, number.to_ber
0 commit comments