You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
610 B

package memory
import (
"testing"
"github.com/iden3/go-merkletree/db"
"github.com/iden3/go-merkletree/db/test"
"github.com/stretchr/testify/require"
)
func TestMemoryStorageInterface(t *testing.T) {
var db db.Storage //nolint:gosimple
db = NewMemoryStorage()
require.NotNil(t, db)
}
func TestMemory(t *testing.T) {
test.TestReturnKnownErrIfNotExists(t, NewMemoryStorage())
test.TestStorageInsertGet(t, NewMemoryStorage())
test.TestStorageWithPrefix(t, NewMemoryStorage())
test.TestConcatTx(t, NewMemoryStorage())
test.TestList(t, NewMemoryStorage())
test.TestIterate(t, NewMemoryStorage())
}