Skip to content

Commit

Permalink
Mark comparison tests against brute ranger skippable in mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Yulin Chen committed Dec 23, 2019
1 parent 81d4354 commit 6947c07
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cidranger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func TestCoveredNetworksAgainstBaseIPv6(t *testing.T) {
}

func testContainsAgainstBase(t *testing.T, iterations int, ipGen ipGenerator) {
if testing.Short() {
t.Skip("Skipping memory test in `-short` mode")
}
rangers := []Ranger{NewPCTrieRanger()}
baseRanger := newBruteRanger()
for _, ranger := range rangers {
Expand All @@ -66,6 +69,9 @@ func testContainsAgainstBase(t *testing.T, iterations int, ipGen ipGenerator) {
}

func testContainingNetworksAgainstBase(t *testing.T, iterations int, ipGen ipGenerator) {
if testing.Short() {
t.Skip("Skipping memory test in `-short` mode")
}
rangers := []Ranger{NewPCTrieRanger()}
baseRanger := newBruteRanger()
for _, ranger := range rangers {
Expand All @@ -89,6 +95,9 @@ func testContainingNetworksAgainstBase(t *testing.T, iterations int, ipGen ipGen
}

func testCoversNetworksAgainstBase(t *testing.T, iterations int, netGen networkGenerator) {
if testing.Short() {
t.Skip("Skipping memory test in `-short` mode")
}
rangers := []Ranger{NewPCTrieRanger()}
baseRanger := newBruteRanger()
for _, ranger := range rangers {
Expand Down

0 comments on commit 6947c07

Please sign in to comment.