diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 22:09:35 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 22:09:35 -0700 |
commit | 3f0daf11ca5f232baa9a891b4301822d2b0cbeeb (patch) | |
tree | 057b2bf9d7487343f477f62726919421dc66b6b6 /db_test.go | |
parent | Merge pull request #32 from benbjohnson/blocks (diff) | |
parent | Add parallel usage test and race detector. (diff) | |
download | dedo-3f0daf11ca5f232baa9a891b4301822d2b0cbeeb.tar.gz dedo-3f0daf11ca5f232baa9a891b4301822d2b0cbeeb.tar.xz |
Merge pull request #34 from benbjohnson/multithreading
Race Detection
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 +} |