From 395888c8eef927141d0baebc625827fdfba3121c Mon Sep 17 00:00:00 2001 From: Oliver Herms <oliver.herms@exaring.de> Date: Fri, 5 Oct 2018 17:30:18 +0200 Subject: [PATCH] Adding test --- protocols/bmp/packet/information_tlv_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/protocols/bmp/packet/information_tlv_test.go b/protocols/bmp/packet/information_tlv_test.go index 2e42f5b0..f718a1b5 100644 --- a/protocols/bmp/packet/information_tlv_test.go +++ b/protocols/bmp/packet/information_tlv_test.go @@ -28,13 +28,20 @@ func TestDecodeInformationTLV(t *testing.T) { }, }, { - name: "Incomplete", + name: "Incomplete Value", input: []byte{ 0, 10, 0, 5, 1, 2, 3, 4, }, wantFail: true, }, + { + name: "Incomplete Header", + input: []byte{ + 0, 10, + }, + wantFail: true, + }, } for _, test := range tests { -- GitLab