We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c950dd0 commit baab252Copy full SHA for baab252
gohex_test.go
@@ -642,4 +642,19 @@ func TestRemoveBinary(t *testing.T) {
642
if len(m.GetDataSegments()) != 3 {
643
t.Errorf("incorrect number of data segments: %v", len(m.GetDataSegments()))
644
}
645
+
646
+ m.Clear()
647
648
+ m.AddBinary(0x00, []byte{0, 1})
649
650
+ m.RemoveBinary(0x02, 2)
651
652
+ data = m.ToBinary(0, 4, 0xFF)
653
+ org = []byte{0, 1, 0xFF, 0xFF}
654
+ if reflect.DeepEqual(data, org) == false {
655
+ t.Errorf("incorrect binary data: %v", data)
656
+ }
657
+ if len(m.GetDataSegments()) != 1 {
658
+ t.Errorf("incorrect number of data segments: %v", len(m.GetDataSegments()))
659
660
0 commit comments