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

C++: slightly tweak KST generator to generate more automatic tests #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Mingun
Copy link
Contributor

@Mingun Mingun commented Apr 6, 2024

While working on #108 I decided to split out a couple of fixes for the C++ generator in its own PR, because the one of commits are discussional.

The first commit tweaks the generator to generate correct tests for checking _parent and _root for nulls, thus the test nested_types_import no longer to be manual.

The second commit makes tests switch_manual_enum_invalid and switch_manual_enum_invalid_else automatically generated, similar to the tests enum_invalid and enum_to_i_invalid. If you think, that instead enum_invalid and enum_to_i_invalid needs to be fixed, I already implemented such logic in the generator, just say and I'll replace the second commit.

The test was initially introduced with that logic in 3bdfb59,
however the similar tests `enum_invalid` and `enum_to_i_invalid` uses the numerical values
and passes successfully, which means that such manual edits in tests are not required.

Regenerate those tests from KST with command:
./spec_kst_to_all -t cpp_stl_98 -t cpp_stl_11 --all-specs -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant