test: make diagnostic helper name match behavior - #1054
Conversation
There was a problem hiding this comment.
Code Review
This pull request inverts the boolean logic of the check_code_for function within the test library, resulting in a widespread update to assertions across the test suite to ensure tests continue to validate the presence or absence of diagnostics correctly. I have no feedback to provide.
|
If the logic is to be completely reversed, that usually means the current name is not appropriate. I would suggest renaming it rather than reversing the judgment logic. |
|
A better name with the old logic would be |
The problem with reversing the logic is that it would result in unmerged code, which would naturally be reversed in terms of logic precisely because of this PR, and cannot be easily fixed by simple text replacement. |
Rename check_code_for to has_no_diagnostic so assertions describe the existing behavior directly. Assisted-by: Codex
fd63feb to
e866608
Compare
Rename check_code_for to has_no_diagnostic so assertions describe the
existing behavior directly.
Assisted-by: Codex