0

I have a custom macro

#define MYMACRO(a, b) ({if (a>b) {return a;}}b;)

I want to be able to test this macro with CATCH2. Something like:

TEST_CASE("Check inequality") {
int result = MYMACRO(1, 2);

REQUIRE(result==2);
}

This does not work. I get the error error: void function 'CATCH2_INTERNAL_TEST_2' should not return a value [-Wreturn-type] What would be the best way to do this?

devOrange
  • 11
  • 2

0 Answers0