diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-07-10 14:00:32 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-07-10 14:00:32 -0600 |
commit | cc8004c98058ad9a70bd3181cab57b4c72a26cb8 (patch) | |
tree | 1b7e4df114c5e1348b5dd34851f00fb7c17024ad /db_test.go | |
parent | Add freelist cache. (diff) | |
parent | Fix test for path errors. (diff) | |
download | dedo-cc8004c98058ad9a70bd3181cab57b4c72a26cb8.tar.gz dedo-cc8004c98058ad9a70bd3181cab57b4c72a26cb8.tar.xz |
Merge branch 'master' of https://github.com/boltdb/bolt into free-cache
Diffstat (limited to 'db_test.go')
-rw-r--r-- | db_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -21,7 +21,7 @@ var statsFlag = flag.Bool("stats", false, "show performance stats") // Ensure that opening a database with a bad path returns an error. func TestOpen_BadPath(t *testing.T) { - db, err := Open("/../bad-path", 0666, nil) + db, err := Open("", 0666, nil) assert.Error(t, err) assert.Nil(t, db) } @@ -297,7 +297,8 @@ func TestDB_mmapSize(t *testing.T) { assert.Equal(t, db.mmapSize(0), minMmapSize) assert.Equal(t, db.mmapSize(16384), minMmapSize) assert.Equal(t, db.mmapSize(minMmapSize-1), minMmapSize) - assert.Equal(t, db.mmapSize(minMmapSize), minMmapSize*2) + assert.Equal(t, db.mmapSize(minMmapSize), minMmapSize) + assert.Equal(t, db.mmapSize(minMmapSize+1), (minMmapSize*2)+4096) assert.Equal(t, db.mmapSize(10000000), 20000768) assert.Equal(t, db.mmapSize((1<<30)-1), 2147483648) assert.Equal(t, db.mmapSize(1<<30), 1<<31) |