Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.out
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ func main() {
}
```

## Testing

```sh
go test -v -coverprofile coverage.out && go tool cover -html coverage.out -o coverage.html
```

## Performance

See [tidwall/btree-benchmark](https://github.com/tidwall/btree-benchmark) for benchmark numbers.
Expand Down
6 changes: 6 additions & 0 deletions btreeg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ func kindsAreEqual(a, b []testKind) bool {
return true
}

func TestDegreeToMinMax(t *testing.T) {
if min, max := degreeToMinMax(1); min != 1 || max != 3 {
panic("mismatch")
}
}

func TestGenericMakeItemOrder(t *testing.T) {
tr := testNewBTree()
ints := []int{0, 1, 2, 3, 4, 10, 20, 30, 40, 100, 200, 300, 400}
Expand Down