Closed dgavedissian closed 3 months ago
When I initially implemented this, I was too tired (and lazy :P ) to add more test
I completely understand :D it was a struggle to write tests here too, but I was afraid to accidentally break something without adding them first.
This makes it far more explicit when we handle plain types vs options vs boxes etc. I think this structure also makes sense as not all types (box, functions, etc) support refs.
I used the opportunity to massively increase our test coverage for luajit-ffi-gen. My goal was to attempt to cover almost all cases in the tests.
I also added the ability to configure the location of the Lua FFI code generation, which allowed me to actually generate and commit the Lua FFI code for the unit test structs. Obviously, this code is not used in the game itself, but it does mean that we can see the ffi_gen and ffi_meta files for all possible cases without relying on the game code itself.