diff options
author | Mattes D <github@xoft.cz> | 2017-01-15 15:11:18 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-01-15 15:11:18 +0100 |
commit | 30756e3f952cfb790b5c5f503d82eea3ea938814 (patch) | |
tree | 637f9430a4e49d6ac2e3612cb1c8b8cbeb2d3f9d /tests/LuaThreadStress/Test.lua | |
parent | LuaState: Fixed untracking references. (diff) | |
download | cuberite-30756e3f952cfb790b5c5f503d82eea3ea938814.tar cuberite-30756e3f952cfb790b5c5f503d82eea3ea938814.tar.gz cuberite-30756e3f952cfb790b5c5f503d82eea3ea938814.tar.bz2 cuberite-30756e3f952cfb790b5c5f503d82eea3ea938814.tar.lz cuberite-30756e3f952cfb790b5c5f503d82eea3ea938814.tar.xz cuberite-30756e3f952cfb790b5c5f503d82eea3ea938814.tar.zst cuberite-30756e3f952cfb790b5c5f503d82eea3ea938814.zip |
Diffstat (limited to '')
-rw-r--r-- | tests/LuaThreadStress/Test.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/LuaThreadStress/Test.lua b/tests/LuaThreadStress/Test.lua new file mode 100644 index 000000000..6053640b4 --- /dev/null +++ b/tests/LuaThreadStress/Test.lua @@ -0,0 +1,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 |