Skip to content

Commit

Permalink
use gcopen in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffleyland committed Sep 6, 2016
1 parent 2515a16 commit 444a1f1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions spec/mmapfile_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,13 @@ describe("gcmmap", function()

collectgarbage()

local ptr, size = mmapfile.open("test3", "uint32_t")
assert.equal(1024, size)
for i = 0, 1023 do
assert.equal(i+4, ptr[i])
do
local ptr, size = mmapfile.gcopen("test3", "uint32_t")
assert.equal(1024, size)
for i = 0, 1023 do
assert.equal(i+4, ptr[i])
end
end
collectgarbage()
end)
end)

0 comments on commit 444a1f1

Please sign in to comment.