fix: 'AwkwardForth testing E' should use the last fields
/formats
, not first
#1224
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.
We've never before had a C++ class with members in the following pattern:
but it came up in #1221. It revealed a bug in which AwkwardForth statements are supposed to be generated from the last
fields
/formats
list to be filled (these variables are both lists of lists), but the old code was looking at the first.This was in the "AwkwardForth testing E" block, for the case in which there's more than just one
fields
/formats
.fields[-1][0]
andformats[-1][0]
, with the-1
in the first index).fields[0] is fields[-1]
andformats[0] is formats[-1]
, and it worked by accident.All of the tests/test_0637_setup_tests_for_AwkwardForth.py tests are insensitive to the code change, so this case doesn't exist in our test suite. It would be great to get example files from #1221 and add them to our test suite.