aboutsummaryrefslogtreecommitdiff
path: root/error_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-10 16:58:16 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-10 16:58:16 -0700
commita68bd301db09ef5465f12ff4242696799da5b14d (patch)
treeb6dc2efd0908df4ca7ff270181e46a1e4d85a77c /error_test.go
parentClean up. (diff)
parentAdd freelist. (diff)
downloaddedo-a68bd301db09ef5465f12ff4242696799da5b14d.tar.gz
dedo-a68bd301db09ef5465f12ff4242696799da5b14d.tar.xz
Merge pull request #20 from benbjohnson/freelist
Freelist
Diffstat (limited to 'error_test.go')
-rw-r--r--error_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/error_test.go b/error_test.go
new file mode 100644
index 0000000..0306985
--- /dev/null
+++ b/error_test.go
@@ -0,0 +1,12 @@
+package bolt
+
+import (
+ "github.com/stretchr/testify/assert"
+ "testing"
+)
+
+// Ensure that nested errors are appropriately formatted.
+func TestError(t *testing.T) {
+ e := &Error{"one error", &Error{"two error", nil}}
+ assert.Equal(t, e.Error(), "one error: two error")
+}