Don't test quite so many values for BtreeSeek and BtreeDelete

BtreeSeek is O(N^2) on its N, and there's not a ton of extra utility
to testing a larger range of values, so we reduce N by a bit, cutting
runtime from ~10s to <1s on my laptop. Also reduce the scale of the
BtreeDelete1/BtreeDelete2 tests a bit because, again, lots of runtime
for little marginal information.
This commit is contained in:
Seebs 2020-06-05 13:09:33 -05:00
parent e223c79ace
commit 3f0c9925f4

View file

@ -689,7 +689,7 @@ func TestBtreeDelete0(t *testing.T) {
}
func TestBtreeDelete1(t *testing.T) {
const N = 130000
const N = 13000
for _, x := range []int{0, -1, 0x555555, 0xaaaaaa, 0x333333, 0xcccccc, 0x314159} {
r := treeNew()
set := r.Set
@ -788,7 +788,7 @@ func benchmarkDelRnd(b *testing.B, n int) {
}
func TestBtreeDelete2(t *testing.T) {
const N = 100000
const N = 10000
for _, x := range []int{0, -1, 0x555555, 0xaaaaaa, 0x333333, 0xcccccc, 0x314159} {
r := treeNew()
set := r.Set
@ -1468,7 +1468,7 @@ func TestBtreePut(t *testing.T) {
}
func TestBtreeSeek(t *testing.T) {
const N = 1 << 13
const N = 1 << 11
tr := treeNew()
for i := 0; i < N; i++ {
k := 2*i + 1