eclipse-iceoryx / iceoryx

Eclipse iceoryx™ - true zero-copy inter-process-communication
https://iceoryx.io
Apache License 2.0
1.62k stars 383 forks source link

Apply the workaround for the VectorCAST tool error #934

Closed dongilchang closed 2 years ago

dongilchang commented 2 years ago

Brief feature description

Motivation

Apex.AI uses the VectorCAST to measure the code coverage of iceoryx.

While the VectorCAST tool processes 68 line of test_cxx_newtype.cpp to measure the code coverage, the error is detected by the VectorCAST tool.

The root cause seems to come from the front end of the compiler. It cannot process the multi-line in the raw string format in EXPECT_FALSE macro of CPP code.

Workaround

The workaround is to insert the pointer of the raw string.

TEST(NewType, DISABLED_NoComparableDoesNotCompile)
{
    const char* p = R"(
        Sut<NewType<int, newtype::ConstructByValueCopy>> a(123), b(456);
        if ( a == b ) {}
    )";
    EXPECT_FALSE(compileTest.verify(p));
}
elfenpiff commented 2 years ago

@dongilchang I created a PR with your proposal. It should be merged soon.