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
The issue is that in UnitTest::Run(), in_death_test_child_process is defined inside conditional block guarded by GTEST_HAS_DEATH_TEST, but later on, it is referred to from another conditional code block, this one guarded by GTEST_OS_WINDOWS. Since UWP is Windows, but GTEST_HAS_DEATH_TEST (likely correctly) is false on UWP, this fails the compilation.
Steps to reproduce the problem
Compile GTest for UWP.
What version of GoogleTest are you using?
1.13.0
What operating system and version are you using?
Windows
What compiler and version are you using?
MSVC, but the version is irrelevant.
What build system are you using?
cmake 3.25 + ninja, but again, irrelevant
Additional context
The current main branch still has the same issue, see
// Either the user wants Google Test to catch exceptions thrown by the
// tests or this is executing in the context of death test child
// process. In either case the user does not want to see pop-up dialogs
// about crashes - they are expected.
if (impl()->catch_exceptions() || in_death_test_child_process) {
I think the simplest way to fix this would be to change the main #if GTEST_OS_WINDOWS to #if GTEST_OS_WINDOWS && GTEST_HAS_DEATH_TEST, so that all the death test related set up is skipped when it is not supported.
The text was updated successfully, but these errors were encountered:
Describe the issue
Compiling GTest 1.13 for UWP (Universal Windows Platform) fails, with the following error message
The issue is that in
UnitTest::Run()
,in_death_test_child_process
is defined inside conditional block guarded byGTEST_HAS_DEATH_TEST
, but later on, it is referred to from another conditional code block, this one guarded byGTEST_OS_WINDOWS
. Since UWP is Windows, butGTEST_HAS_DEATH_TEST
(likely correctly) is false on UWP, this fails the compilation.Steps to reproduce the problem
Compile GTest for UWP.
What version of GoogleTest are you using?
1.13.0
What operating system and version are you using?
Windows
What compiler and version are you using?
MSVC, but the version is irrelevant.
What build system are you using?
cmake 3.25 + ninja, but again, irrelevant
Additional context
The current main branch still has the same issue, see
googletest/googletest/src/gtest.cc
Lines 5383 to 5385 in 750d67d
googletest/googletest/src/gtest.cc
Lines 5418 to 5423 in 750d67d
I think the simplest way to fix this would be to change the main
#if GTEST_OS_WINDOWS
to#if GTEST_OS_WINDOWS && GTEST_HAS_DEATH_TEST
, so that all the death test related set up is skipped when it is not supported.The text was updated successfully, but these errors were encountered: