unified-memory-framework
unified-memory-framework copied to clipboard
Inconsistency in Usage of Assertion Methods in Tests
Current Situation
Our test suite currently uses two different assertion frameworks:
- Google Test (GTEST) Assertions: These assertions use
ASSERTandEXPECTmacros. - UT_ASSERTs: These assertions call
abort()on failure, which undesirably terminates the execution of any subsequent tests within the same file. - Some test constructors utilize only EXPECT macro, and after initialization fails, it continue test execution, causing it fail in different place.
Problems Identified
- Test Execution Interruption: The use of
UT_ASSERTcan prematurely end test execution upon failure, preventing full test suite runs. - Incompatibility in Test Initialization: Google Test's
ASSERTmacros are not suitable for use in initialization routines (like in helper functions or within test class constructors) because they employreturnstatements that is supposed to exit test "main function"
Proposed Solution
- Standardize on GTEST Assertions: Transition all assertions to GTest.