summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_4rd_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/option_4rd_test.go')
-rw-r--r--dhcpv6/option_4rd_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/dhcpv6/option_4rd_test.go b/dhcpv6/option_4rd_test.go
index 6af9b67..8cd5e01 100644
--- a/dhcpv6/option_4rd_test.go
+++ b/dhcpv6/option_4rd_test.go
@@ -2,6 +2,7 @@ package dhcpv6
import (
"net"
+ "reflect"
"testing"
"github.com/stretchr/testify/require"
@@ -171,4 +172,14 @@ func TestOpt4RDRoundTrip(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, rtOpt)
require.Equal(t, opt, rtOpt)
+
+ var mo MessageOptions
+ mo.Options.Add(&opt)
+
+ var got MessageOptions
+ if err := got.FromBytes(mo.ToBytes()); err != nil {
+ t.Errorf("FromBytes = %v", err)
+ } else if !reflect.DeepEqual(mo, got) {
+ t.Errorf("FromBytes = %v, want %v", got, mo)
+ }
}