Skip to content

testrunner: actually bail out on failed assert#7436

Merged
firewave merged 1 commit intocppcheck-opensource:mainfrom
firewave:assert-test
Apr 7, 2025
Merged

testrunner: actually bail out on failed assert#7436
firewave merged 1 commit intocppcheck-opensource:mainfrom
firewave:assert-test

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Apr 7, 2025

No description provided.

Comment thread test/fixture.h
#define ASSERT_LOC_MSG( CONDITION, MSG, FILE_, LINE_ ) assert_(FILE_, LINE_, (CONDITION), MSG)
// *INDENT-OFF*
#define ASSERT_EQUALS( EXPECTED, ACTUAL ) do { try { assertEquals(__FILE__, __LINE__, (EXPECTED), (ACTUAL)); } catch (...) { assertNoThrowFail(__FILE__, __LINE__); } } while (false)
#define ASSERT_EQUALS( EXPECTED, ACTUAL ) do { try { assertEquals(__FILE__, __LINE__, (EXPECTED), (ACTUAL)); } catch(const AssertFailedError&) { throw; } catch (...) { assertNoThrowFail(__FILE__, __LINE__, true); } } while (false)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncrustify is inconsistent with the whitespaces compared to other macros.

@firewave firewave merged commit c78d1f2 into cppcheck-opensource:main Apr 7, 2025
60 checks passed
@firewave firewave deleted the assert-test branch April 7, 2025 11:14
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