From deb063f01cfa8ffa66cd76174691bd27ececdbcd Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 26 Jun 2015 19:40:20 +0200 Subject: Add bool type --- ber/int_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'ber/int_test.go') diff --git a/ber/int_test.go b/ber/int_test.go index 03bb6ad..03139c1 100644 --- a/ber/int_test.go +++ b/ber/int_test.go @@ -5,7 +5,7 @@ import ( "testing" ) -func test(t *testing.T, i int, b []byte) { +func testInt(t *testing.T, i int, b []byte) { a := marshalInt(i) if !bytes.Equal(a, b) { t.Error("BER", i, "expected", b, "got", a) @@ -19,14 +19,14 @@ func test(t *testing.T, i int, b []byte) { } func TestInt(t *testing.T) { - test(t, 0, []byte{0x00}) - test(t, 127, []byte{0x7F}) - test(t, 128, []byte{0x00, 0x80}) - test(t, 256, []byte{0x01, 0x00}) - test(t, -128, []byte{0x80}) - test(t, -129, []byte{0xFF, 0x7F}) + testInt(t, 0, []byte{0x00}) + testInt(t, 127, []byte{0x7F}) + testInt(t, 128, []byte{0x00, 0x80}) + testInt(t, 256, []byte{0x01, 0x00}) + testInt(t, -128, []byte{0x80}) + testInt(t, -129, []byte{0xFF, 0x7F}) - test(t, 8388607, []byte{0x7f, 0xFF, 0xFF}) - test(t, -136, []byte{0xFF, 0x78}) - test(t, -8388607, []byte{0x80, 0x00, 0x01}) + testInt(t, 8388607, []byte{0x7f, 0xFF, 0xFF}) + testInt(t, -136, []byte{0xFF, 0x78}) + testInt(t, -8388607, []byte{0x80, 0x00, 0x01}) } -- cgit v1.2.3