db: cleveldb iterator

This commit is contained in:
Ethan Buchman
2017-12-12 20:58:35 -05:00
parent 3e5dbef6a2
commit bcacaf164b
2 changed files with 22 additions and 15 deletions

View File

@ -5,18 +5,19 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
cmn "github.com/tendermint/tmlibs/common"
)
func checkValid(t *testing.T, itr Iterator, expected bool) {
valid := itr.Valid()
assert.Equal(t, expected, valid)
require.Equal(t, expected, valid)
}
func checkNext(t *testing.T, itr Iterator, expected bool) {
itr.Next()
valid := itr.Valid()
assert.Equal(t, expected, valid)
require.Equal(t, expected, valid)
}
func checkNextPanics(t *testing.T, itr Iterator) {