aboutsummaryrefslogtreecommitdiff
path: root/ber/int_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'ber/int_test.go')
-rw-r--r--ber/int_test.go36
1 files changed, 0 insertions, 36 deletions
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)
- }
- }
-}