Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for dang-lua Convert and State. #64

Draft
wants to merge 157 commits into
base: master
Choose a base branch
from
Draft

Conversation

Possseidon
Copy link
Owner

No description provided.

Convert::at doesn't work properly, as you can't have an optional of nullopt_t.
- Split Convert enum and class using SFINAE.
  - TODO: Fix comments!
- Added enum_name instead of using ClassInfo.
- Use SFINAE instead of subclassing for const and ref.
Now also testing const/ref types when appropriate.
Accidentally added null functions into Lua... oups! Also added another safety assert for normal methods.
- Now checking the error string returned by shouldThrow.
  - This will break tests when Lua changes some messages unfortunately.
  - Not checking errors at all is pretty bad though, as a lot of other things can go wrong.
- Added a test for pushing/checking userdata with ClassInfo.
- Added another huge test for various ClassInfo specializations.
  - All combinations of table, metatable and properties.
- Convert now split between can_check and can_push.
- All ClassInfo Lua types can now be closed (freed).
- A whole bunch of other stuff...
And a lot of other stuff... Why can I not commit more frequently.
- Also added a note as to why in Convert.h.
- It can cause issues with new partial specializations after an instantiation.
Also removed some existing inlines that are already implied by constexpr.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When running tests using gcc, test-State.cpp reports 12 assertions less.
1 participant