Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a855d4

Browse filesBrowse files
nodejs-github-botmarco-ippolito
authored andcommitted
deps: update googletest to 85087857ad10bd407cd6ed2f52f7ea9752db621f
PR-URL: #61417 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d8a9359 commit 1a855d4
Copy full SHA for 1a855d4

3 files changed

+22-10Lines changed: 22 additions & 10 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/googletest/include/gtest/internal/gtest-port-arch.h‎

Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-port-arch.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@
119119
#define GTEST_OS_NXP_QN9090 1
120120
#elif defined(NRF52)
121121
#define GTEST_OS_NRF52 1
122+
#elif defined(__EMSCRIPTEN__)
123+
#define GTEST_OS_EMSCRIPTEN 1
122124
#endif // __CYGWIN__
123125

124126
#endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
Collapse file

‎deps/googletest/include/gtest/internal/gtest-port.h‎

Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-port.h
+16-6Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,12 +664,22 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
664664
defined(GTEST_OS_NETBSD) || defined(GTEST_OS_FUCHSIA) || \
665665
defined(GTEST_OS_DRAGONFLY) || defined(GTEST_OS_GNU_KFREEBSD) || \
666666
defined(GTEST_OS_HAIKU) || defined(GTEST_OS_GNU_HURD))
667+
667668
// Death tests require a file system to work properly.
668669
#if GTEST_HAS_FILE_SYSTEM
669670
#define GTEST_HAS_DEATH_TEST 1
670671
#endif // GTEST_HAS_FILE_SYSTEM
671672
#endif
672673

674+
// Determines whether the Premature Exit file can be created.
675+
// Created by default when Death tests are supported, but other platforms can
676+
// use the Premature exit file without Death test support (e.g. for detecting
677+
// crashes).
678+
#if GTEST_HAS_DEATH_TEST || \
679+
(defined(GTEST_OS_EMSCRIPTEN) && GTEST_HAS_FILE_SYSTEM)
680+
#define GTEST_INTERNAL_HAS_PREMATURE_EXIT_FILE 1
681+
#endif
682+
673683
// Determines whether to support type-driven tests.
674684

675685
// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
@@ -822,10 +832,10 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
822832
#ifndef GTEST_API_
823833

824834
#ifdef _MSC_VER
825-
#if defined(GTEST_LINKED_AS_SHARED_LIBRARY) && GTEST_LINKED_AS_SHARED_LIBRARY
826-
#define GTEST_API_ __declspec(dllimport)
827-
#elif defined(GTEST_CREATE_SHARED_LIBRARY) && GTEST_CREATE_SHARED_LIBRARY
835+
#if defined(GTEST_CREATE_SHARED_LIBRARY) && GTEST_CREATE_SHARED_LIBRARY
828836
#define GTEST_API_ __declspec(dllexport)
837+
#elif defined(GTEST_LINKED_AS_SHARED_LIBRARY) && GTEST_LINKED_AS_SHARED_LIBRARY
838+
#define GTEST_API_ __declspec(dllimport)
829839
#endif
830840
#elif GTEST_INTERNAL_HAVE_CPP_ATTRIBUTE(gnu::visibility)
831841
#define GTEST_API_ [[gnu::visibility("default")]]
@@ -2242,11 +2252,11 @@ using TimeInMillis = int64_t; // Represents time in milliseconds.
22422252

22432253
// Macros for declaring flags.
22442254
#define GTEST_DECLARE_bool_(name) \
2245-
ABSL_DECLARE_FLAG(bool, GTEST_FLAG_NAME_(name))
2255+
GTEST_API_ ABSL_DECLARE_FLAG(bool, GTEST_FLAG_NAME_(name))
22462256
#define GTEST_DECLARE_int32_(name) \
2247-
ABSL_DECLARE_FLAG(int32_t, GTEST_FLAG_NAME_(name))
2257+
GTEST_API_ ABSL_DECLARE_FLAG(int32_t, GTEST_FLAG_NAME_(name))
22482258
#define GTEST_DECLARE_string_(name) \
2249-
ABSL_DECLARE_FLAG(std::string, GTEST_FLAG_NAME_(name))
2259+
GTEST_API_ ABSL_DECLARE_FLAG(std::string, GTEST_FLAG_NAME_(name))
22502260

22512261
#define GTEST_FLAG_SAVER_ ::absl::FlagSaver
22522262

Collapse file

‎deps/googletest/src/gtest.cc‎

Copy file name to clipboardExpand all lines: deps/googletest/src/gtest.cc
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5132,7 +5132,7 @@ void OsStackTraceGetter::UponLeavingGTest() GTEST_LOCK_EXCLUDED_(mutex_) {
51325132
#endif // GTEST_HAS_ABSL
51335133
}
51345134

5135-
#ifdef GTEST_HAS_DEATH_TEST
5135+
#ifdef GTEST_INTERNAL_HAS_PREMATURE_EXIT_FILE
51365136
// A helper class that creates the premature-exit file in its
51375137
// constructor and deletes the file in its destructor.
51385138
class ScopedPrematureExitFile {
@@ -5170,7 +5170,7 @@ class ScopedPrematureExitFile {
51705170
ScopedPrematureExitFile(const ScopedPrematureExitFile&) = delete;
51715171
ScopedPrematureExitFile& operator=(const ScopedPrematureExitFile&) = delete;
51725172
};
5173-
#endif // GTEST_HAS_DEATH_TEST
5173+
#endif // GTEST_INTERNAL_HAS_PREMATURE_EXIT_FILE
51745174

51755175
} // namespace internal
51765176

@@ -5515,7 +5515,7 @@ void UnitTest::RecordProperty(const std::string& key,
55155515
// We don't protect this under mutex_, as we only support calling it
55165516
// from the main thread.
55175517
int UnitTest::Run() {
5518-
#ifdef GTEST_HAS_DEATH_TEST
5518+
#ifdef GTEST_INTERNAL_HAS_PREMATURE_EXIT_FILE
55195519
const bool in_death_test_child_process =
55205520
!GTEST_FLAG_GET(internal_run_death_test).empty();
55215521

@@ -5546,7 +5546,7 @@ int UnitTest::Run() {
55465546
: internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE"));
55475547
#else
55485548
const bool in_death_test_child_process = false;
5549-
#endif // GTEST_HAS_DEATH_TEST
5549+
#endif // GTEST_INTERNAL_HAS_PREMATURE_EXIT_FILE
55505550

55515551
// Captures the value of GTEST_FLAG(catch_exceptions). This value will be
55525552
// used for the duration of the program.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.