Skip to content

Commit 5e181c8

Browse files
committed
luzer: hide private functions
Needed for the following commit.
1 parent e39cef7 commit 5e181c8

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

luzer/init.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ return {
5252
Fuzz = Fuzz,
5353
FuzzedDataProvider = luzer_impl.FuzzedDataProvider,
5454

55-
_LLVM_VERSION = luzer_impl._LLVM_VERSION,
56-
_LUA_VERSION = luzer_impl._LUA_VERSION,
57-
_LUZER_VERSION = luzer_impl._LUZER_VERSION,
58-
59-
_set_custom_mutator = luzer_impl._set_custom_mutator,
60-
_mutate = luzer_impl._mutate,
55+
_internal = {
56+
LLVM_VERSION = luzer_impl._LLVM_VERSION,
57+
LUA_VERSION = luzer_impl._LUA_VERSION,
58+
LUZER_VERSION = luzer_impl._LUZER_VERSION,
59+
60+
set_custom_mutator = luzer_impl._set_custom_mutator,
61+
mutate = luzer_impl._mutate,
62+
}
6163
}

luzer/tests/test_unit.lua

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ end
77

88
debug.sethook(trace, "l")
99

10-
-- luzer._LUZER_VERSION
11-
assert(type(luzer._LUZER_VERSION) == "string")
12-
assert(type(luzer._LLVM_VERSION) == "string")
13-
assert(type(luzer._LUA_VERSION) == "string")
10+
assert(type(luzer._internal.LUZER_VERSION) == "string")
11+
assert(type(luzer._internal.LLVM_VERSION) == "string")
12+
assert(type(luzer._internal.LUA_VERSION) == "string")
1413

1514
local ok
1615
local err
@@ -185,19 +184,19 @@ local function custom_mutator(data, size, max_size, seed)
185184
return data
186185
end
187186

188-
-- luzer._set_custom_mutator()
187+
-- luzer._internal.set_custom_mutator()
189188
assert(luzer_custom_mutator == nil)
190-
luzer._set_custom_mutator(custom_mutator)
189+
luzer._internal.set_custom_mutator(custom_mutator)
191190
assert(luzer_custom_mutator ~= nil)
192191
assert(type(luzer_custom_mutator) == "function")
193192
local buf = "data"
194193
assert(luzer_custom_mutator(buf, #buf, #buf, math.random(1, 10)) == buf)
195194
luzer_custom_mutator = nil -- Clean up.
196195

197-
-- luzer._mutate()
198-
luzer._set_custom_mutator(custom_mutator)
196+
-- luzer._internal.mutate()
197+
luzer._internal.set_custom_mutator(custom_mutator)
199198
assert(luzer_custom_mutator ~= nil)
200-
-- luzer._mutate(buf, #buf, #buf, math.random(1, 10)) -- TODO
199+
-- luzer._internal.mutate(buf, #buf, #buf, math.random(1, 10)) -- TODO
201200
luzer_custom_mutator = nil -- Clean up.
202201

203202
print("Success!")

0 commit comments

Comments
 (0)