summaryrefslogtreecommitdiffstats
path: root/tests/LuaThreadStress/Test.lua
blob: 6053640b41038b6a19e2b5e21d33a8d9ea151ea2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- Test.lua

-- Implements the test support functions
-- This file is loaded into the cLuaState used for stress-testing





--- Returns a function that the C++ code can call
-- The callback takes a single number as param and returns the sum of the param and the seed, given to this factory function (for verification)
function getCallback(a_Seed)
	return function (a_Param)
		-- print("Callback " .. a_Seed .. " called with param " .. a_Param)
		return a_Param + a_Seed
	end
end