MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / TestDB_NewIterator

Function TestDB_NewIterator

engine/iterator_test.go:11–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestDB_NewIterator(t *testing.T) {
12 opt := config.DefaultOptions
13 dir, _ := os.MkdirTemp("", "flydb-iterator-1")
14 opt.DirPath = dir
15 db, err := NewDB(opt)
16 defer db.Clean()
17 assert.Nil(t, err)
18 assert.NotNil(t, db)
19
20 iterator := db.NewIterator(config.DefaultIteratorOptions)
21 assert.NotNil(t, iterator)
22 assert.Equal(t, false, iterator.Valid())
23}
24
25func TestDB_Iterator_One_Value(t *testing.T) {
26 opt := config.DefaultOptions

Callers

nothing calls this directly

Calls 4

CleanMethod · 0.95
NewIteratorMethod · 0.95
ValidMethod · 0.95
NewDBFunction · 0.85

Tested by

no test coverage detected