You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug summary
When using GoogleTest's EXPECT_DEATH/ASSERT_DEATH functions, it should be possible to specify the error message printed to stderr that should be emitted if a specific assertion fails.
However, when setting --acpp-stdpar and ACPP_VISIBILITY_MASK to something else than omp, the assertion message is always reported to be empty.
To Reproduce
Using the CMakeLists.txt:
project(
DeathTestExample
VERSION 1.0
LANGUAGES CXX)
find_package(TBB)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --acpp-stdpar")
include(FetchContent)
FetchContent_Declare(googletest
GIT_REPOSITORY https://github.com/google/googletest
GIT_TAG v1.14.0
GIT_SHALLOW TRUE
QUIET
)
FetchContent_MakeAvailable(googletest)
add_executable(test main.cpp)
target_link_libraries(test PUBLIC TBB::tbb)
target_link_libraries(test PUBLIC GTest::gtest_main)
[==========] Running 2 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 1 test from FooDeathTest
[ RUN ] FooDeathTest.bar
/home/username/Documents/test/sycl/stdpar_death_test/main.cpp:28: Failure
Death test: func(nullptr)
Result: died but not with expected error.
Expected: contains regular expression "nullptr"
Actual msg:
[ DEATH ]
[ FAILED ] FooDeathTest.bar (4 ms)
[----------] 1 test from FooDeathTest (4 ms total)
[----------] 1 test from Foo
[ RUN ] Foo.bar
[ OK ] Foo.bar (0 ms)
[----------] 1 test from Foo (0 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 2 test suites ran. (4 ms total)
[ PASSED ] 1 test.
[ FAILED ] 1 test, listed below:
[ FAILED ] FooDeathTest.bar
1 FAILED TEST
Note that the Actual msg: is empty although it should contain the string "nullptr".
However, everything works when setting ACPP_VISIBILITY_MASK="omp".
Expected behavior
The Actual msg: should contain the string "nullptr".
Describe your setup
I used AdaptiveCpp in release version v24.2.0 build with clang 16.0.2 and CUDA enabled.
Additional context
I'm unsure whether this is an AdaptiveCpp error or a general problem with how GoogleTest's DeahtTests work.
Nevertheless, I thought it may be worthwhile to ask here whether it is a known problem and/or can be fixed. If this isn't the case, feel free to close this issue. It is easily possible to disable all DeathTests to work around this error.
The text was updated successfully, but these errors were encountered:
Bug summary
When using GoogleTest's
EXPECT_DEATH
/ASSERT_DEATH
functions, it should be possible to specify the error message printed to stderr that should be emitted if a specific assertion fails.However, when setting
--acpp-stdpar
andACPP_VISIBILITY_MASK
to something else thanomp
, the assertion message is always reported to be empty.To Reproduce
Using the
CMakeLists.txt
:And then compiling the following code:
with
and then running
./test
outputs:Note that the
Actual msg:
is empty although it should contain the string"nullptr"
.However, everything works when setting
ACPP_VISIBILITY_MASK="omp"
.Expected behavior
The
Actual msg:
should contain the string"nullptr"
.Describe your setup
I used AdaptiveCpp in release version v24.2.0 build with clang 16.0.2 and CUDA enabled.
Additional context
I'm unsure whether this is an AdaptiveCpp error or a general problem with how GoogleTest's DeahtTests work.
Nevertheless, I thought it may be worthwhile to ask here whether it is a known problem and/or can be fixed. If this isn't the case, feel free to close this issue. It is easily possible to disable all DeathTests to work around this error.
The text was updated successfully, but these errors were encountered: