attr: improve coverage

This commit is contained in:
Aleksandr Razumov
2016-04-29 00:06:50 +03:00
parent 58afb75eb1
commit 2759c33d30

View File

@@ -8,6 +8,7 @@ import (
//"encoding/binary"
"encoding/binary"
"strings"
)
func TestMessage_AddSoftware(t *testing.T) {
@@ -26,6 +27,12 @@ func TestMessage_AddSoftware(t *testing.T) {
if vRead != v {
t.Errorf("Expected %s, got %s.", v, vRead)
}
sAttr := m.Attributes.Get(AttrSoftware)
s := sAttr.String()
if !strings.HasPrefix(s, "SOFTWARE:") {
t.Error("bad string representation", s)
}
}
func TestMessage_AddSoftwareBytes(t *testing.T) {