mirror of
https://github.com/pion/stun.git
synced 2025-10-05 07:47:00 +08:00
attr: improve coverage
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user