Describe the bug
when I turn on CATCH_CONFIG_DISABLE, all CAPTURE(i,j) , i.e. more than one arg will err.
Expected behavior
No such error
Reproduction steps
Build below code with -DCATCH_CONFIG_DISABLE
#include "catch.hpp"
TEST_CASE("generators") {
auto i = GENERATE(as<std::string>(), "a", "b", "c");
SECTION("one") {
auto j = GENERATE(range(8, 11), 2);
CAPTURE(i, j);
SUCCEED();
}
SECTION("two") {
auto j = GENERATE(3, 141, 1.379);
CAPTURE(i, j);
SUCCEED();
}
}
// cross-product of two ranges.
TEST_CASE("100x100 ints", "[.][approvals]") {
auto x = GENERATE(range(0, 100));
auto y = GENERATE(range(200, 300));
CHECK(x < y);
}
will lead to below errs:
generate.cpp:7:21: error: macro "CAPTURE" passed 2 arguments, but takes just 1
7 | CAPTURE(i, j);
| ^
In file included from generate.cpp:1:
catch.hpp:17887: note: macro "CAPTURE" defined here
17887 | #define CAPTURE( msg ) (void)(0)
|
generate.cpp:12:21: error: macro "CAPTURE" passed 2 arguments, but takes just 1
12 | CAPTURE(i, j);
| ^
In file included from generate.cpp:1:
catch.hpp:17887: note: macro "CAPTURE" defined here
17887 | #define CAPTURE( msg ) (void)(0)
|
generate.cpp: In function ‘void ____C_A_T_C_H____T_E_S_T____0()’:
generate.cpp:7:9: error: ‘CAPTURE’ was not declared in this scope
7 | CAPTURE(i, j);
| ^~~~~~~
generate.cpp:12:9: error: ‘CAPTURE’ was not declared in this scope
12 | CAPTURE(i, j);
Describe the bug
when I turn on CATCH_CONFIG_DISABLE, all CAPTURE(i,j) , i.e. more than one arg will err.
Expected behavior
No such error
Reproduction steps
Build below code with -DCATCH_CONFIG_DISABLE
will lead to below errs:
Platform information:
Additional context
My fix is below to get it working:
The text was updated successfully, but these errors were encountered: