summaryrefslogtreecommitdiff
path: root/indra/llcommon/hexdump.h
AgeCommit message (Collapse)Author
2023-10-04DRTVWR-589: Add tests for LLSD-to-Lua round-trip conversions.Nat Goodspeed
Add from_lua() function to run a small Lua script that constructs a specified Lua object and posts it back to the test program via a temporary LLEventPump. Call this with a variety of Lua objects, comparing to the expected LLSD. Add round_trip() function to run another small Lua script that listens for incoming LLEventPump events and, for each, posts the received Lua data back to the test program as LLSD. Call this with a variety of LLSD objects, comparing to the expected LLSD. Also collect these objects into an LLSD array and send that for a round trip; also collect into an LLSD map and send that. Sadly, tests currently drive an access violation when trying to convert a nested Lua table to LLSD. Add verbose debug logging to lua_tollsd() to identify the context at which we hit the access violation. Add comments describing further exceptions to LLSD-to-Lua round trip identity. Add lua_what() iostream manipulator to stream whatever we can readily discover about a value at a specified Lua stack index. Add lua_stack() to report the contents of the Lua stack. Since the stack is created anew for every call to a C function, this shouldn't usually be enormous. Add hexdump.h with iostream manipulators to dump a byte range as hex digits, or to produce readable text from a mix of printing and nonprinting ASCII characters.