OSDN Git Service

Hulk did something
[bytom/vapor.git] / vendor / github.com / syndtr / goleveldb / leveldb / iterator / array_iter_test.go
1 // Copyright (c) 2014, Suryandaru Triandana <syndtr@gmail.com>
2 // All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file.
6
7 package iterator_test
8
9 import (
10         . "github.com/onsi/ginkgo"
11
12         . "github.com/syndtr/goleveldb/leveldb/iterator"
13         "github.com/syndtr/goleveldb/leveldb/testutil"
14 )
15
16 var _ = testutil.Defer(func() {
17         Describe("Array iterator", func() {
18                 It("Should iterates and seeks correctly", func() {
19                         // Build key/value.
20                         kv := testutil.KeyValue_Generate(nil, 70, 1, 1, 5, 3, 3)
21
22                         // Test the iterator.
23                         t := testutil.IteratorTesting{
24                                 KeyValue: kv.Clone(),
25                                 Iter:     NewArrayIterator(kv),
26                         }
27                         testutil.DoIteratorTesting(&t)
28                 })
29         })
30 })