Skip to content

Commit

Permalink
Issue #5 - additional tests for endian problems
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed May 18, 2020
1 parent b622f5f commit 714be3e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ func TestFromDotsErrors(t *testing.T) {
}
}

func TestEndian(t *testing.T) {
val, err := FromNetIP(net.ParseIP("0.0.0.1"))
if err != nil {
t.Fatalf("unable to parse 0.0.0.1")
}
if val != 1 {
t.Fatalf("endian problem parsing 0.0.0.1")
}
}

func TestRoundTrip(t *testing.T) {
cases := []string{
"0.0.0.0",
Expand Down

0 comments on commit 714be3e

Please sign in to comment.