Menu

Google Test ASSERT_ macros not modelled ideally

2021-06-10
2021-06-10
  • Timothy Brackett

    assert is not a particularly appropriate model for Google Test's ASSERT_ macros. ASSERT_ macros are evaluated in Release builds, so the diagnostic assertWithSideEffect does not reasonably apply.

    I don't know what the ideal model would be, but at least the model used for EXPECT_ macros would avoid the false-positive assertWithSideEffect findings.

     
  • Daniel Marjamäki

    Thanks! Sounds reasonable. I guess something that uses throw/exit would be a better idea. If you have time to look into this feel free to provide a github pull request.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.