-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Description
Problem
When there are more than one test with the same name,
- the results (test, failed test, asserts, passed, failed) can be incorrect.
- the formatting of the warning messages can be improved.
For example
#include <boost/ut.hpp>
int main(int argc, const char* argv[]) {
using namespace boost::ut;
"test 1"_test = [] {
expect(1 == 1_i);
expect(2 != 2_i); //false
};
"test 1"_test = [] {
expect(3 == 3_i);
};
}
Expected Behavior
UT starts =====================================================================
Running test "test 1"...
FAILED in: C:\Users\CIL\Desktop\Test folder\BoostUtTest\example.cpp:8 - test condition: [2 != 2]
===============================================================================
Suite global
tests: 2 | 1 failed
asserts: 3 | 2 passed | 1 failed
Completed =====================================================================
Actual Behavior
UT starts =====================================================================
Running test "test 1"...
FAILED in: ...\example.cpp:8 - test condition: [2 != 2]WARNING test 'test 1' for test suite 'global' already present
Running test "test 1"...
===============================================================================
Suite global
tests: 2 | 2 failed
asserts: 5 | 3 passed | 2 failed
Completed =====================================================================
Metadata
Metadata
Assignees
Labels
No labels