-
Notifications
You must be signed in to change notification settings - Fork 570
Description
The following test is not executed correctly in the current testing framework.
const auto expected = std::vector<int>{3, 6, 13};
OUTLINE("comparing numbers") {
GIVEN("the numbers <x> and <y>") {
auto [x, y] = block_parameters<double, double>();
WHEN("adding both numbers") {
auto result = x + y;
THEN("the sum: <sum> should be in expected") {
const auto index = block_parameters_index();
auto sum = block_parameters<double>();
check_eq(result, caf::test::approx{sum});
check_eq(result, expected[index]);
}
}
}
EXAMPLES = R"(
| x | y | sum |
| 1 | 2 | 3 |
| 2.5 | 3.5 | 6 |
| 9.5 | 3.5 | 13 |
)";
}
The expectation is that the test will pass after executing each line in the example once. But, the first line is executed twice and the last line is not executed at all. Which fails all of the test except the first one.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels