Skip to content

Commit 36f4de5

Browse files
committed
Remove obsolete fix in test helper
1 parent 0d492f7 commit 36f4de5

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

spec/helpers.lua

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,6 @@ require "vips"
44
local assert = require "luassert.assert"
55
local say = require "say"
66

7-
-- TODO: Wait for https://github.com/Olivine-Labs/luassert/issues/148
8-
-- Meanwhile, we're applying patch #150 here.
9-
10-
-- Pre-load the ffi module, such that it becomes part of the environment
11-
-- and Busted will not try to GC and reload it. The ffi is not suited
12-
-- for that and will occasionally segfault if done so.
13-
local ffi = require "ffi"
14-
15-
-- Patch ffi.cdef to only be called once with each definition, as it
16-
-- will error on re-registering.
17-
local old_cdef = ffi.cdef
18-
local exists = {}
19-
ffi.cdef = function(def)
20-
if exists[def] then
21-
return
22-
end
23-
exists[def] = true
24-
return old_cdef(def)
25-
end
26-
277
local function almost_equal(_, arguments)
288
local threshold = arguments[3] or 0.001
299

0 commit comments

Comments
 (0)