From 84a6137d6c7a6de89e1de7010eb6d003290f89c2 Mon Sep 17 00:00:00 2001 From: Christopher Koch Date: Thu, 10 Jan 2019 18:14:28 -0800 Subject: bsdp: simplify version type. --- dhcpv4/bsdp/bsdp_option_version_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'dhcpv4/bsdp/bsdp_option_version_test.go') diff --git a/dhcpv4/bsdp/bsdp_option_version_test.go b/dhcpv4/bsdp/bsdp_option_version_test.go index 8b592a8..69d4c86 100644 --- a/dhcpv4/bsdp/bsdp_option_version_test.go +++ b/dhcpv4/bsdp/bsdp_option_version_test.go @@ -7,7 +7,7 @@ import ( ) func TestOptVersionInterfaceMethods(t *testing.T) { - o := OptVersion{Version1_1} + o := Version1_1 require.Equal(t, OptionVersion, o.Code(), "Code") require.Equal(t, []byte{1, 1}, o.ToBytes(), "ToBytes") } @@ -16,7 +16,7 @@ func TestParseOptVersion(t *testing.T) { data := []byte{1, 1} o, err := ParseOptVersion(data) require.NoError(t, err) - require.Equal(t, &OptVersion{Version1_1}, o) + require.Equal(t, Version1_1, o) // Short byte stream data = []byte{2} @@ -25,7 +25,5 @@ func TestParseOptVersion(t *testing.T) { } func TestOptVersionString(t *testing.T) { - // known - o := OptVersion{Version1_1} - require.Equal(t, "BSDP Version -> 1.1", o.String()) + require.Equal(t, "BSDP Version -> 1.1", Version1_1.String()) } -- cgit v1.2.3