-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Description
The below code generates strange output.
Multiple times the Failed tests are listed in an incremental manner.
I would expect each check to be listed once.
Code:
#define BOOST_UT_DISABLE_MODULE
#include "ut.hpp"
#define EXPECT_THAT(expr) expect(that % expr) << "\"" #expr "\"\n"
int main() {
using namespace boost::ut;
using namespace boost::ut::literals;
"basic"_test = [] {
int a1 = 1, a2 = 1, a3 = 1, a4 = 1, a5 = 1, a6 = 1;
int b1 = 0, b2 = 0, b3 = 0, b4 = 0, b5 = 0, b6 = 0;
EXPECT_THAT(a1 == b1);
EXPECT_THAT(a2 == b2);
EXPECT_THAT(a3 == b3);
EXPECT_THAT(a4 == b4) << fatal;
EXPECT_THAT(a5 == b5);
EXPECT_THAT(a6 == b6);
};
}Output:
Running test "basic"... FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:17 - test condition: [1 == 0]
"a1 == b1"
Running test "basic"... FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:17 - test condition: [1 == 0] "a1 == b1"
FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:18 - test condition: [1 == 0]
"a2 == b2"
Running test "basic"... FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:17 - test condition: [1 == 0] "a1 == b1"
FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:18 - test condition: [1 == 0] "a2 == b2"
FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:19 - test condition: [1 == 0]
"a3 == b3"
Running test "basic"... FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:17 - test condition: [1 == 0] "a1 == b1"
FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:18 - test condition: [1 == 0] "a2 == b2"
FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:19 - test condition: [1 == 0] "a3 == b3"
FAILED
in: C:\Github\beman\scope\tests\beman\scope\scope.test.cpp:20 - test condition: [1 == 0]
"a4 == b4"
===============================================================================
Suite global
tests: 1 | 5 failed
asserts: 5 | 0 passed | 5 failed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels