aboutsummaryrefslogtreecommitdiff
path: root/c/cursor_test.go
diff options
context:
space:
mode:
authorMartin Kobetic <mkobetic@gmail.com>2014-04-23 16:54:41 +0000
committerMartin Kobetic <mkobetic@gmail.com>2014-04-23 16:54:41 +0000
commit5612ea7694f3baac8112349d847d6b3d767e11ac (patch)
tree9942dbb5112eeeaef7b7d407a6cd7ada1ca13ccb /c/cursor_test.go
parentadd test for empty bucket handling (diff)
downloaddedo-5612ea7694f3baac8112349d847d6b3d767e11ac.tar.gz
dedo-5612ea7694f3baac8112349d847d6b3d767e11ac.tar.xz
fix empty byte vs nil test problems
Diffstat (limited to 'c/cursor_test.go')
-rw-r--r--c/cursor_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/c/cursor_test.go b/c/cursor_test.go
index 5a8f3e0..2528371 100644
--- a/c/cursor_test.go
+++ b/c/cursor_test.go
@@ -38,14 +38,14 @@ func TestCursor_Empty(t *testing.T) {
db.View(func(tx *bolt.Tx) error {
c := NewCursor(tx.Bucket([]byte("widgets")))
key, value := c.First()
- assert.Equal(t, nil, key)
- assert.Equal(t, nil, value)
+ assert.Nil(t, key)
+ assert.Nil(t, value)
key, value = c.Next()
- assert.Equal(t, nil, key)
- assert.Equal(t, nil, value)
+ assert.Nil(t, key)
+ assert.Nil(t, value)
key, value, flags := c.Seek([]byte("bar"))
- assert.Equal(t, nil, key)
- assert.Equal(t, nil, value)
+ assert.Nil(t, key)
+ assert.Nil(t, value)
assert.Equal(t, 0, flags)
return nil
})
@@ -204,7 +204,7 @@ func TestCursor_Iterate_Deep(t *testing.T) {
}
assert.Equal(t, 1000, index)
k, _ := c.Next()
- assert.Equal(t, nil, k)
+ assert.Nil(t, k)
return nil
})
})