Skip to content

Commit

Permalink
Add tests for networks which cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Jan 15, 2020
1 parent 5e7ecc7 commit 5800f39
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions traverse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,23 @@ var tests = []networkTest{
"1.1.1.1/32",
},
},
networkTest{
Network: "255.255.255.0/24",
Database: "ipv4",
Expected: []string(nil),
},
networkTest{
Network: "1.1.1.1/32",
Database: "mixed",
Expected: []string{
"1.1.1.1/32",
},
},
networkTest{
Network: "255.255.255.0/24",
Database: "mixed",
Expected: []string(nil),
},
networkTest{
Network: "::1:ffff:ffff/128",
Database: "ipv6",
Expand Down Expand Up @@ -116,6 +126,11 @@ var tests = []networkTest{
"::2:0:58/127",
},
},
networkTest{
Network: "0:0:0:0:0:ffff:ffff:ff00/120",
Database: "ipv6",
Expected: []string(nil),
},
networkTest{
Network: "0.0.0.0/0",
Database: "mixed",
Expand Down

0 comments on commit 5800f39

Please sign in to comment.