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

Stumbling over semantics of AssertionInfoMatcher::CheckMessageMatches #77701

Open
hawkinsw opened this issue Jan 10, 2024 · 0 comments
Open

Stumbling over semantics of AssertionInfoMatcher::CheckMessageMatches #77701

hawkinsw opened this issue Jan 10, 2024 · 0 comments
Assignees
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

Comments

@hawkinsw
Copy link
Contributor

I just got bit by a nasty oddity in the semantics of AssertionInfoMatcher::CheckMessageMatches where

// Allow any match

(see [1] below)

was not the behavior that I expected.

I was getting a positive match for

nnot increment an iterator already at the end.

when attempting to check that

Cannot increment an iterator already at the end.

was the assertion's message.

Would there be any willingness to change the semantics of the this matcher? Maybe "anchored at the beginning"? Or "must match entirely"?

If so, I am happy to take the lead on making that change. I hope that this is not a bother.

[1]

@EugeneZelenko EugeneZelenko added question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead! libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. and removed new issue labels Jan 10, 2024
hawkinsw added a commit that referenced this issue Jan 12, 2024
…#77721)

Rather than allow for a message to be considered a match for the actual
assertion if it is anywhere in the assertion text, make sure that the
expected and the actual assertion are identical.

Addresses #77701
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this issue Jan 28, 2024
…llvm#77721)

Rather than allow for a message to be considered a match for the actual
assertion if it is anywhere in the assertion text, make sure that the
expected and the actual assertion are identical.

Addresses llvm#77701
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Projects
None yet
Development

No branches or pull requests

2 participants