test icon indicating copy to clipboard operation
test copied to clipboard

unit_test.hpp successfully compiles invalid code

Open zethon opened this issue 4 years ago • 0 comments

I'm resubmitting this bug because the last one was closed and I'm afraid the nature of the issue was not clear.

Consider this invalid code:

BOOST_TEST(1 = somestring.size());

Assignment to a literal should be a compilation error, however the code above compiles successfully when using unit_test.hpp.

See: https://gcc.godbolt.org/z/MT8xrdesh

zethon avatar Jul 09 '21 00:07 zethon