aboutsummaryrefslogtreecommitdiff
path: root/db_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-15 21:50:34 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-15 21:50:34 -0700
commit7fb06feea4012543b6a1b0726a09e9a4c4a84933 (patch)
tree057b2bf9d7487343f477f62726919421dc66b6b6 /db_test.go
parentMerge pull request #32 from benbjohnson/blocks (diff)
downloaddedo-7fb06feea4012543b6a1b0726a09e9a4c4a84933.tar.gz
dedo-7fb06feea4012543b6a1b0726a09e9a4c4a84933.tar.xz
Add parallel usage test and race detector.
Diffstat (limited to 'db_test.go')
-rw-r--r--db_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/db_test.go b/db_test.go
index 1a9aa02..666ba4a 100644
--- a/db_test.go
+++ b/db_test.go
@@ -259,3 +259,10 @@ func withOpenDB(fn func(*DB, string)) {
fn(db, path)
})
}
+
+func trunc(b []byte, length int) []byte {
+ if length < len(b) {
+ return b[:length]
+ }
+ return b
+}