summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-02-07 22:50:03 -0500
committerNat Goodspeed <nat@lindenlab.com>2024-02-07 22:50:03 -0500
commit0c14c8a372a5d4639de3365f69e566962493fe78 (patch)
treebea2dd4376a66286874df1991b8e242d502c9d0c /README.md
parent4ecfd706bce5c45556eaf2833f89fd9f2f5b07a9 (diff)
Fix tests broken by switching from Lua 5.4 to Luau.
Add a new test<1>() that tests returning values from a Lua chunk using LLLUAmanager::waitScriptLine(). This exercises lua_tollsd() without yet involving LLEventPump machinery. For that purpose, extract from test<2>() the sequence of (description, expression, LLSD expected) triples into a static C array. The new test<1>() returns each such expression as a result; test<2>() posts each such expression to a test LLEventPump. test<2>() now uses waitScriptLine() instead of pumping the coroutine scheduler a few times and hoping. The pump-and-hope tactic worked before, but no longer does. waitScriptLine() is more robust anyway. Move the former test<1>() to test<3>() because it exercises still more machinery, specifically listen_events() and await_event(). Because this test involves a handshake with C++ code, use startScriptLine() to launch the Lua coroutine while providing a definite way to wait for completion later. Again, startScriptLine() followed by get() on the returned future is more robust than the previous pump-and-hope code. Similarly, the former test<3>(), now renamed test<4>(), uses startScriptLine() and Future::get() instead of pump-and-hope.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions