diff options
author | Sean Karlage <skarlage@fb.com> | 2018-03-04 10:59:15 -0800 |
---|---|---|
committer | Sean Karlage <skarlage@fb.com> | 2018-03-05 15:08:56 -0800 |
commit | 6491fc7ec777dbdfdfe05365c85878bb6e4d691d (patch) | |
tree | 0de605d9df238a604272afa31e1831fc1cc7eee2 /dhcpv4/dhcpv4_test.go | |
parent | 6cfb183f6e3c8496a80aad03b8f47423eeac1123 (diff) |
Move bsdp functionality to its own subpackage. Bring in stretchr/testify/assert for nicer asserts
Diffstat (limited to 'dhcpv4/dhcpv4_test.go')
-rw-r--r-- | dhcpv4/dhcpv4_test.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/dhcpv4/dhcpv4_test.go b/dhcpv4/dhcpv4_test.go index a3a1955..0d569c8 100644 --- a/dhcpv4/dhcpv4_test.go +++ b/dhcpv4/dhcpv4_test.go @@ -17,29 +17,6 @@ func AssertEqual(t *testing.T, a, b interface{}, what string) { } } -func AssertNotNil(t *testing.T, a interface{}, what string) { - if a == nil { - t.Fatalf("Expected %s to not be nil. %v", what, a) - } -} - -func AssertNil(t *testing.T, a interface{}, what string) { - if a != nil { - t.Fatalf("Expected %s to be nil. %v", what, a) - } -} - -func AssertEqualSlice(t *testing.T, a, b []interface{}, what string) { - if len(a) != len(b) { - t.Fatalf("Invalid %s. %v != %v", what, a, b) - } - for i := range a { - if a[i] != b[i] { - t.Fatalf("Invalid %s. %v != %v at index %d", what, a, b, i) - } - } -} - func AssertEqualBytes(t *testing.T, a, b []byte, what string) { if !bytes.Equal(a, b) { t.Fatalf("Invalid %s. %v != %v", what, a, b) |