aboutsummaryrefslogtreecommitdiff
path: root/syscall_darwin_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-03-21 13:21:33 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-03-21 13:21:33 -0600
commitd2173f5f0ecbf4ed93c768e975435b04df3186ec (patch)
treeae6279c471e965b1ad14ac68a5621de00aad22b4 /syscall_darwin_test.go
parentMerge pull request #68 from benbjohnson/remove-db-functions (diff)
downloaddedo-d2173f5f0ecbf4ed93c768e975435b04df3186ec.tar.gz
dedo-d2173f5f0ecbf4ed93c768e975435b04df3186ec.tar.xz
Fix db.munmap() to return an error.
Changes munmap to return an error and the DB now implements io.Closer. I also removed all the OS and Syscall mocking because it's causing issues. Corrupt file tests need to be recreated but directly using the file system instead.
Diffstat (limited to 'syscall_darwin_test.go')
-rw-r--r--syscall_darwin_test.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/syscall_darwin_test.go b/syscall_darwin_test.go
deleted file mode 100644
index 6b468f6..0000000
--- a/syscall_darwin_test.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package bolt
-
-import (
- "github.com/stretchr/testify/mock"
-)
-
-type mocksyscall struct {
- mock.Mock
-}
-
-func (m *mocksyscall) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- args := m.Called(fd, offset, length, prot, flags)
- return args.Get(0).([]byte), args.Error(1)
-}
-
-func (m *mocksyscall) Munmap(b []byte) error {
- args := m.Called(b)
- return args.Error(0)
-}