This commit is contained in:
Todd Gruben 2020-07-16 08:31:09 -05:00
parent e68f0a0d8f
commit bbd83e4618
3 changed files with 9 additions and 8 deletions

View file

@ -14,13 +14,15 @@
package rbf
import "testing"
import (
"testing"
)
// This function exists to mark debugging helper function as "used" by the linter.
func TestUsed(t *testing.T) {
t.Skip("This function is always skipped")
dump(nil)
hexdump(nil)
//hexdump(nil)
pagedumpi(nil, "", nil)
treedump(nil, 0, "", nil)
}

View file

@ -486,12 +486,6 @@ func search(n int, f func(int) int) (index int, exact bool) {
return i, false
}
/* lint
func itohex(v int) string { return fmt.Sprintf("0x%x", v) }
func hexdump(b []byte) { println(hex.Dump(b)) }
*/
func pagedumpi(b []byte, indent string, writer io.Writer) {
pgno := readPageNo(b)
if pgno == Magic32() {

View file

@ -17,6 +17,7 @@ package rbf_test
import (
"bytes"
"encoding/hex"
"fmt"
"io/ioutil"
"math/rand"
"os"
@ -26,6 +27,10 @@ import (
"github.com/pilosa/pilosa/v2/rbf"
)
func itohex(v int) string { return fmt.Sprintf("0x%x", v) }
func hexdump(b []byte) { println(hex.Dump(b)) }
func TestWALSegment_Open(t *testing.T) {
t.Run("OK", func(t *testing.T) {
s := MustOpenWALSegment(t, 10)