(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func TestIterator_Release(t *testing.T) { |
| 111 | bucket := "bucket" |
| 112 | |
| 113 | runNutsDBTest(t, nil, func(t *testing.T, db *DB) { |
| 114 | txCreateBucket(t, db, DataStructureBTree, bucket, nil) |
| 115 | |
| 116 | for i := 0; i < 100; i++ { |
| 117 | txPut(t, db, bucket, testutils.GetTestBytes(i), testutils.GetTestBytes(i), Persistent, nil, nil) |
| 118 | } |
| 119 | |
| 120 | _ = db.View(func(tx *Tx) error { |
| 121 | iterator := NewIterator(tx, bucket, IteratorOptions{Reverse: true}) |
| 122 | defer iterator.Release() |
| 123 | return nil |
| 124 | }) |
| 125 | |
| 126 | for i := 0; i < 100; i++ { |
| 127 | txDel(t, db, bucket, testutils.GetTestBytes(i), nil) |
| 128 | } |
| 129 | }) |
| 130 | } |
| 131 | |
| 132 | func TestIterator_Item(t *testing.T) { |
| 133 | bucket := "bucket" |
nothing calls this directly
no test coverage detected