aboutsummaryrefslogtreecommitdiff
path: root/bucket_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-03-24 08:32:38 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-03-24 08:32:38 -0600
commit0866abf73389b826d61c6096c5f46cd19d947f94 (patch)
tree5151a76ed8b98e87f12252bf86189135f4f3d2b0 /bucket_test.go
parentMerge pull request #86 from benbjohnson/mock (diff)
parentError refactoring. (diff)
downloaddedo-0866abf73389b826d61c6096c5f46cd19d947f94.tar.gz
dedo-0866abf73389b826d61c6096c5f46cd19d947f94.tar.xz
Merge pull request #87 from benbjohnson/errors
Error refactoring
Diffstat (limited to 'bucket_test.go')
-rw-r--r--bucket_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/bucket_test.go b/bucket_test.go
index 92d5288..359a98f 100644
--- a/bucket_test.go
+++ b/bucket_test.go
@@ -2,6 +2,7 @@ package bolt
import (
"bytes"
+ "errors"
"fmt"
"os"
"strconv"
@@ -203,12 +204,12 @@ func TestBucketForEachShortCircuit(t *testing.T) {
err := tx.Bucket("widgets").ForEach(func(k, v []byte) error {
index++
if bytes.Equal(k, []byte("baz")) {
- return &Error{"marker", nil}
+ return errors.New("marker")
}
return nil
})
- assert.Equal(t, err, &Error{"marker", nil})
- assert.Equal(t, index, 2)
+ assert.Equal(t, errors.New("marker"), err)
+ assert.Equal(t, 2, index)
return nil
})
})