Add test that runs through GetPrefixes() contents, and verifies

they are registered in prefixRegistry.
This commit is contained in:
Jonathan Moody 2022-08-12 14:18:41 -04:00
parent 9e72f9c4bc
commit 84caed6b17

View file

@ -18,6 +18,14 @@ import (
"github.com/linxGnu/grocksdb"
)
func TestPrefixRegistry(t *testing.T) {
for _, prefix := range prefixes.GetPrefixes() {
if prefixes.GetSerializationAPI(prefix) == nil {
t.Errorf("prefix %c not registered", prefix)
}
}
}
func testInit(filePath string) (*grocksdb.DB, [][]string, func(), *grocksdb.ColumnFamilyHandle) {
log.Println(filePath)
file, err := os.Open(filePath)