glide setup and dependencies addition

This commit is contained in:
Steve Brunton
2017-08-27 23:27:11 -04:00
commit b0e0be5688
74 changed files with 11533 additions and 0 deletions

24
vendor/gopkg.in/routeros.v2/proto/writer_test.go generated vendored Normal file
View File

@@ -0,0 +1,24 @@
package proto
import (
"bytes"
"testing"
)
func TestEncodeLength(t *testing.T) {
for _, d := range []struct {
length int
rawBytes []byte
}{
{0x00000001, []byte{0x01}},
{0x00000087, []byte{0x80, 0x87}},
{0x00004321, []byte{0xC0, 0x43, 0x21}},
{0x002acdef, []byte{0xE0, 0x2a, 0xcd, 0xef}},
{0x10000080, []byte{0xF0, 0x10, 0x00, 0x00, 0x80}},
} {
b := encodeLength(d.length)
if bytes.Compare(b, d.rawBytes) != 0 {
t.Fatalf("Expected output %#v for len=%d, got %#v", d.rawBytes, d.length, b)
}
}
}