aboutsummaryrefslogtreecommitdiff
path: root/syscall_darwin_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-01-12 15:50:35 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-01-12 15:50:35 -0700
commit47224c438732d021e5aef74af30c7fd5801621d2 (patch)
tree86c3ed57636dc0794b61e6764c08ea5777bef072 /syscall_darwin_test.go
parentMock OS and File. (diff)
downloaddedo-47224c438732d021e5aef74af30c7fd5801621d2.tar.gz
dedo-47224c438732d021e5aef74af30c7fd5801621d2.tar.xz
Mock syscall.
Diffstat (limited to 'syscall_darwin_test.go')
-rw-r--r--syscall_darwin_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/syscall_darwin_test.go b/syscall_darwin_test.go
new file mode 100644
index 0000000..9e64cf7
--- /dev/null
+++ b/syscall_darwin_test.go
@@ -0,0 +1,14 @@
+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)
+}