diff options
author | Martin Kobetic <mkobetic@gmail.com> | 2014-06-27 17:38:06 +0000 |
---|---|---|
committer | Martin Kobetic <mkobetic@gmail.com> | 2014-06-27 17:38:06 +0000 |
commit | 8c386e72f31126638236f4c642230b7ca4d84236 (patch) | |
tree | 73df1db1cc49f25cef36eb876758bcd818fd8e2a /db_test.go | |
parent | Minor fix. (diff) | |
download | dedo-8c386e72f31126638236f4c642230b7ca4d84236.tar.gz dedo-8c386e72f31126638236f4c642230b7ca4d84236.tar.xz |
Copy the free pages stats from the receiver
Diffstat (limited to 'db_test.go')
-rw-r--r-- | db_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -354,9 +354,13 @@ func TestDB_String(t *testing.T) { func TestDBStats_Sub(t *testing.T) { var a, b Stats a.TxStats.PageCount = 3 + a.FreePageN = 4 b.TxStats.PageCount = 10 + b.FreePageN = 14 diff := b.Sub(&a) assert.Equal(t, 7, diff.TxStats.PageCount) + // free page stats are copied from the receiver and not subtracted + assert.Equal(t, 14, diff.FreePageN) } // Ensure that meta with bad magic is invalid. |