C++: slightly tweak KST generator to generate more automatic tests#110
Open
Mingun wants to merge 6 commits intokaitai-io:masterfrom
Open
C++: slightly tweak KST generator to generate more automatic tests#110Mingun wants to merge 6 commits intokaitai-io:masterfrom
Mingun wants to merge 6 commits intokaitai-io:masterfrom
Conversation
d1586f5 to
732b4c2
Compare
732b4c2 to
5e6c776
Compare
…e scenarios C++: to add check for value of pointer and do not add it for primitives
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. Tests regenerated using this command and manually cleaned up from unnecessary changes: ./spec_kst_to_all -t cpp_stl_98 -t cpp_stl_11 --all-specs -f
Changes probably related to several commints, most notable is kaitai-io/kaitai_struct_compiler@762cda5 Tests regenerated using this command and manually cleaned up from unnecessary changes: ./spec_kst_to_all -t cpp_stl_98 -t cpp_stl_11 --all-specs -f
`at()` is always used since implementing index operator for C++ in kaitai-io/kaitai_struct_compiler@e59eb56 Tests regenerated using this command and manually cleaned up from unnecessary changes: ./spec_kst_to_all -t cpp_stl_98 -t cpp_stl_11 --all-specs -f
…_parent` Tests regenerated using this command and manually cleaned up from unnecessary changes: ./spec_kst_to_all -t cpp_stl_98 -t cpp_stl_11 --all-specs -f
… commit Tests regenerated using this command and manually cleaned up from unnecessary changes: ./spec_kst_to_all -t cpp_stl_98 -t cpp_stl_11 --all-specs -f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 5th commit tweaks the generator to generate correct tests for checking
_parentand_rootfor nulls, thus the testnested_types_importno longer to be manual. The 6th commit makes another two tests KST adopted and fixes situation for several tests that was manually changed, but marked as automatically generated..The second commit makes tests
switch_manual_enum_invalidandswitch_manual_enum_invalid_elseautomatically generated, similar to the testsenum_invalidandenum_to_i_invalid. If you think, that insteadenum_invalidandenum_to_i_invalidneeds to be fixed, I already implemented such logic in the generator, just say and I'll replace the second commit.