mirror of https://github.com/ftl/tetra-pei
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
282 B
Go
18 lines
282 B
Go
3 years ago
|
package tetra
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestHexBinaryRoundtrip(t *testing.T) {
|
||
|
hex := "82000201546573746E6163687269636874"
|
||
|
|
||
|
pdu, err := HexToBinary(hex)
|
||
|
assert.NoError(t, err)
|
||
|
|
||
|
actual := BinaryToHex(pdu)
|
||
|
assert.Equal(t, hex, actual)
|
||
|
}
|