summaryrefslogtreecommitdiff
path: root/search/search_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'search/search_test.go')
-rw-r--r--search/search_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/search/search_test.go b/search/search_test.go
index 36ef4bf..b2c167a 100644
--- a/search/search_test.go
+++ b/search/search_test.go
@@ -45,7 +45,15 @@ func TestGoMap(t *testing.T) {
}
}
+// shortMaxLength caps the largest input size exercised under `go test -short`
+// (used by `make verify`, which runs under the race detector). The full range
+// still runs in a plain `make test`.
+const shortMaxLength int = 1000
+
func test[K ds.Integer, V ds.Number](s Set[K,V], l int, t *testing.T) {
+ if testing.Short() && l > shortMaxLength {
+ t.Skipf("skipping size %d in -short mode", l)
+ }
keys := ds.NewRandomArrayList[K](l, l)
randoms := ds.NewRandomArrayList[V](l, -1)
mapping := make(map[K]V, l)