Parse stack params (#119)

* small fixes

* gofmt

* bytearray parsing

* tests

* removed unnecessary files

* added more types for bytearray

* iter

* made TryParseArray parameter variadic

* fixes after review

* fix after review

* misprints

* updated array reverse

* imports/fmt

* naming
This commit is contained in:
Anastasia Prasolova 2019-02-05 15:22:10 +03:00 committed by fabwa
parent 7c1147f04f
commit a058598ecc
5 changed files with 210 additions and 4 deletions

View file

@ -6,9 +6,9 @@ import (
)
func TestArrayReverse(t *testing.T) {
arr := []byte{0x01, 0x02, 0x03, 0x04}
arr := []byte{0x01, 0x02, 0x03, 0x04, 0x05}
have := ArrayReverse(arr)
want := []byte{0x04, 0x03, 0x02, 0x01}
want := []byte{0x05, 0x04, 0x03, 0x02, 0x01}
if bytes.Compare(have, want) != 0 {
t.Fatalf("expected %v got %v", want, have)
}