From 54caa4e7e085e177ff05b719ae247d21fe8c257e Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 26 Sep 2015 12:04:34 +0200 Subject: Replace with new implementation --- ber/int_test.go | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 ber/int_test.go (limited to 'ber/int_test.go') diff --git a/ber/int_test.go b/ber/int_test.go deleted file mode 100644 index ba1e5b0..0000000 --- a/ber/int_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package ber - -import ( - "bytes" - "testing" -) - -type intTest struct { - in int - out []byte -} - -var intTestData = []intTest{ - {0, []byte{0x00}}, - {127, []byte{0x7F}}, - {128, []byte{0x00, 0x80}}, - {256, []byte{0x01, 0x00}}, - {-128, []byte{0x80}}, - {-129, []byte{0xFF, 0x7F}}, - {8388607, []byte{0x7f, 0xFF, 0xFF}}, - {-136, []byte{0xFF, 0x78}}, - {-8388607, []byte{0x80, 0x00, 0x01}}, -} - -func TestInt(t *testing.T) { - for _, test := range intTestData { - a := MarshalInt(test.in) - if !bytes.Equal(a, test.out) { - t.Error(test.in, "expected", test.out, "got", a) - } - n := UnmarshalInt(test.out) - if n != test.in { - t.Error(test.out, "expected", test.in, "got", n) - } - } -} -- cgit v1.2.3