aboutsummaryrefslogtreecommitdiff
path: root/ber/int_test.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-09-26 12:04:34 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-09-26 12:04:34 +0200
commit54caa4e7e085e177ff05b719ae247d21fe8c257e (patch)
tree363400fe1c6c1e7b696c72caaabc4882756355fa /ber/int_test.go
parent1fcefc99a82bac6ce725b6f11277e4aa291a7f51 (diff)
Replace with new implementation
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)
- }
- }
-}