diff options
Diffstat (limited to 'software/communication/data_link_test.go')
-rw-r--r-- | software/communication/data_link_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/software/communication/data_link_test.go b/software/communication/data_link_test.go index 91b941d..ce8fe10 100644 --- a/software/communication/data_link_test.go +++ b/software/communication/data_link_test.go @@ -10,6 +10,10 @@ func TestUnslip(t *testing.T) { 0xFF, 0x12, SLIP_END, } + output := [][]byte{ + {0xFF, 0x12}, + } + bytes := make(chan byte) frames := make(chan []byte) @@ -25,9 +29,10 @@ func TestUnslip(t *testing.T) { } }() - frame := <-frames - expected := []byte{0xFF, 0x12} - if !reflect.DeepEqual(frame, expected) { - t.Fatalf("Frame '%v' does not match expected '%v'\n", frame, expected) + for _, v := range output { + frame := <-frames + if !reflect.DeepEqual(frame, v) { + t.Fatalf("Frame '%v' does not match expected '%v'\n", frame, v); + } } } |