diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 21:50:34 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 21:50:34 -0700 |
commit | 7fb06feea4012543b6a1b0726a09e9a4c4a84933 (patch) | |
tree | 057b2bf9d7487343f477f62726919421dc66b6b6 /db_test.go | |
parent | Merge pull request #32 from benbjohnson/blocks (diff) | |
download | dedo-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.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 +} |