Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented Dec 5, 2023

For the isSameExpression() test we were tokenizing the code as C++ but were treating it as C later on.

@firewave
Copy link
Collaborator Author

firewave commented Dec 5, 2023

Extracted from #5725. Still needs to actual fixes/improvements done. Could need some help with the failures though as I don't really understand what it tests.

@firewave
Copy link
Collaborator Author

firewave commented Dec 11, 2023

There's lots of more inconsistencies in these tests. All of these need to be tested with C and C++ tokenizing. But I have no idea how to do this without duplicating most of the code. It is not ass simple as the executor tests which can simply get a global boolean passed in.

e.g. the isNullOperand() implementation is checking for C++ casts no matter the configured one.

@firewave firewave force-pushed the astutils-test branch 2 times, most recently from 12c4f60 to 2173eb4 Compare December 12, 2023 15:40
@firewave firewave force-pushed the astutils-test branch 2 times, most recently from 6ec5ac1 to 60fb50b Compare January 15, 2024 13:52
@firewave firewave marked this pull request as ready for review January 15, 2024 13:52
@firewave
Copy link
Collaborator Author

firewave commented Jan 15, 2024

The changes in the tests are expected. In case of C++ a + b and b + a are not being treated as being the same.

@firewave firewave changed the title TestAstUtils: fixed consistency and improved coverage TestAstUtils: fixed consistency of language being used Jan 15, 2024
@firewave firewave changed the title TestAstUtils: fixed consistency of language being used TestAstUtils: fixed consistency of language being used in isSameExpressionTest Jan 15, 2024
@firewave firewave changed the title TestAstUtils: fixed consistency of language being used in isSameExpressionTest TestAstUtils: fixed consistency of language being used in isSameExpressionTest / added a few language checks Jan 15, 2024
firewave and others added 3 commits January 17, 2024 13:06
…nTest()` asserts / added some TODOs about missing test coverage
Co-authored-by: chrchr-github <78114321+chrchr-github@users.noreply.github.com>
@chrchr-github chrchr-github merged commit b7a43ff into danmar:main Jan 17, 2024
@firewave firewave deleted the astutils-test branch January 17, 2024 13:49
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.

2 participants