GeezerVison is showing github.com — deps: update googletest to c875c4e · nodejs/node@588bd5e
File treeExpand file treeCollapse file tree Open diff view settings doc/contributing/maintaining
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/gtest-printers.h +22Lines changed: 22 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 43 | 43 | // 1. foo::PrintTo(const T&, ostream*) | 44 | 44 | // 2. operator<<(ostream&, const T&) defined in either foo or the | 45 | 45 | // global namespace. | | 46 | +// * Prefer AbslStringify(..) to operator<<(..), per https://abseil.io/tips/215. | | 47 | +// * Define foo::PrintTo(..) if the type already has AbslStringify(..), but an | | 48 | +// alternative presentation in test results is of interest. | 46 | 49 | // | 47 | 50 | // However if T is an STL-style container then it is printed element-wise | 48 | 51 | // unless foo::PrintTo(const T&, ostream*) is defined. Note that | | 112 | 115 | #include <utility> | 113 | 116 | #include <vector> | 114 | 117 |
| | 118 | +#ifdef GTEST_HAS_ABSL | | 119 | +#include "absl/strings/internal/has_absl_stringify.h" | | 120 | +#include "absl/strings/str_cat.h" | | 121 | +#endif // GTEST_HAS_ABSL | 115 | 122 | #include "gtest/internal/gtest-internal.h" | 116 | 123 | #include "gtest/internal/gtest-port.h" | 117 | 124 |
| @@ -260,6 +267,18 @@ struct ConvertibleToStringViewPrinter { | 260 | 267 | #endif | 261 | 268 | }; | 262 | 269 |
| | 270 | +#ifdef GTEST_HAS_ABSL | | 271 | +struct ConvertibleToAbslStringifyPrinter { | | 272 | + template < | | 273 | + typename T, | | 274 | + typename = typename std::enable_if< | | 275 | + absl::strings_internal::HasAbslStringify<T>::value>::type> // NOLINT | | 276 | + static void PrintValue(const T& value, ::std::ostream* os) { | | 277 | + *os << absl::StrCat(value); | | 278 | + } | | 279 | +}; | | 280 | +#endif // GTEST_HAS_ABSL | | 281 | + | 263 | 282 | // Prints the given number of bytes in the given object to the given | 264 | 283 | // ostream. | 265 | 284 | GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes, | @@ -308,6 +327,9 @@ void PrintWithFallback(const T& value, ::std::ostream* os) { | 308 | 327 | using Printer = typename FindFirstPrinter< | 309 | 328 | T, void, ContainerPrinter, FunctionPointerPrinter, PointerPrinter, | 310 | 329 | ProtobufPrinter, | | 330 | +#ifdef GTEST_HAS_ABSL | | 331 | + ConvertibleToAbslStringifyPrinter, | | 332 | +#endif // GTEST_HAS_ABSL | 311 | 333 | internal_stream_operator_without_lexical_name_lookup::StreamPrinter, | 312 | 334 | ConvertibleToIntegerPrinter, ConvertibleToStringViewPrinter, | 313 | 335 | RawBytesPrinter, FallbackPrinter>::type; | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/gtest.h +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -2101,8 +2101,8 @@ class GTEST_API_ ScopedTrace { | 2101 | 2101 | // Assuming that each thread maintains its own stack of traces. | 2102 | 2102 | // Therefore, a SCOPED_TRACE() would (correctly) only affect the | 2103 | 2103 | // assertions in its own thread. | 2104 | | -#define SCOPED_TRACE(message) \ | 2105 | | - ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \ | | 2104 | +#define SCOPED_TRACE(message) \ | | 2105 | + const ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)( \ | 2106 | 2106 | __FILE__, __LINE__, (message)) | 2107 | 2107 |
| 2108 | 2108 | // Compile-time assertion for type equality. | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-internal.h +14-13Lines changed: 14 additions & 13 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1497,19 +1497,20 @@ class NeverThrown { | 1497 | 1497 | gtest_ar_, text, #actual, #expected) \ | 1498 | 1498 | .c_str()) | 1499 | 1499 |
| 1500 | | -#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ | 1501 | | - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ | 1502 | | - if (::testing::internal::AlwaysTrue()) { \ | 1503 | | - ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \ | 1504 | | - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ | 1505 | | - if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \ | 1506 | | - goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \ | 1507 | | - } \ | 1508 | | - } else \ | 1509 | | - GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__) \ | 1510 | | - : fail("Expected: " #statement \ | 1511 | | - " doesn't generate new fatal " \ | 1512 | | - "failures in the current thread.\n" \ | | 1500 | +#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ | | 1501 | + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ | | 1502 | + if (::testing::internal::AlwaysTrue()) { \ | | 1503 | + const ::testing::internal::HasNewFatalFailureHelper \ | | 1504 | + gtest_fatal_failure_checker; \ | | 1505 | + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ | | 1506 | + if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \ | | 1507 | + goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \ | | 1508 | + } \ | | 1509 | + } else /* NOLINT */ \ | | 1510 | + GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__) \ | | 1511 | + : fail("Expected: " #statement \ | | 1512 | + " doesn't generate new fatal " \ | | 1513 | + "failures in the current thread.\n" \ | 1513 | 1514 | " Actual: it does.") | 1514 | 1515 |
| 1515 | 1516 | // Expands to the name of the class that implements the given test. | |
Collapse file 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 number | Diff line number | Diff line change |
|---|
| 115 | 115 | #define GTEST_OS_QURT 1 | 116 | 116 | #elif defined(CPU_QN9090) || defined(CPU_QN9090HN) | 117 | 117 | #define GTEST_OS_NXP_QN9090 1 | | 118 | +#elif defined(NRF52) | | 119 | +#define GTEST_OS_NRF52 1 | 118 | 120 | #endif // __CYGWIN__ | 119 | 121 |
| 120 | 122 | #endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-port.h +1-42Lines changed: 1 addition & 42 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -506,7 +506,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; | 506 | 506 | defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU) || \ | 507 | 507 | defined(GTEST_OS_ESP32) || defined(GTEST_OS_ESP8266) || \ | 508 | 508 | defined(GTEST_OS_XTENSA) || defined(GTEST_OS_QURT) || \ | 509 | | - defined(GTEST_OS_NXP_QN9090))) | | 509 | + defined(GTEST_OS_NXP_QN9090) || defined(GTEST_OS_NRF52))) | 510 | 510 | #define GTEST_HAS_STD_WSTRING 1 | 511 | 511 | #else | 512 | 512 | #define GTEST_HAS_STD_WSTRING 0 | @@ -1146,47 +1146,6 @@ inline To ImplicitCast_(To x) { | 1146 | 1146 | return x; | 1147 | 1147 | } | 1148 | 1148 |
| 1149 | | -// When you upcast (that is, cast a pointer from type Foo to type | 1150 | | -// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts | 1151 | | -// always succeed. When you downcast (that is, cast a pointer from | 1152 | | -// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because | 1153 | | -// how do you know the pointer is really of type SubclassOfFoo? It | 1154 | | -// could be a bare Foo, or of type DifferentSubclassOfFoo. Thus, | 1155 | | -// when you downcast, you should use this macro. In debug mode, we | 1156 | | -// use dynamic_cast<> to double-check the downcast is legal (we die | 1157 | | -// if it's not). In normal mode, we do the efficient static_cast<> | 1158 | | -// instead. Thus, it's important to test in debug mode to make sure | 1159 | | -// the cast is legal! | 1160 | | -// This is the only place in the code we should use dynamic_cast<>. | 1161 | | -// In particular, you SHOULDN'T be using dynamic_cast<> in order to | 1162 | | -// do RTTI (eg code like this: | 1163 | | -// if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo); | 1164 | | -// if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo); | 1165 | | -// You should design the code some other way not to need this. | 1166 | | -// | 1167 | | -// This relatively ugly name is intentional. It prevents clashes with | 1168 | | -// similar functions users may have (e.g., down_cast). The internal | 1169 | | -// namespace alone is not enough because the function can be found by ADL. | 1170 | | -template <typename To, typename From> // use like this: DownCast_<T*>(foo); | 1171 | | -inline To DownCast_(From* f) { // so we only accept pointers | 1172 | | - // Ensures that To is a sub-type of From *. This test is here only | 1173 | | - // for compile-time type checking, and has no overhead in an | 1174 | | - // optimized build at run-time, as it will be optimized away | 1175 | | - // completely. | 1176 | | - GTEST_INTENTIONAL_CONST_COND_PUSH_() | 1177 | | - if (false) { | 1178 | | - GTEST_INTENTIONAL_CONST_COND_POP_() | 1179 | | - const To to = nullptr; | 1180 | | - ::testing::internal::ImplicitCast_<From*>(to); | 1181 | | - } | 1182 | | - | 1183 | | -#if GTEST_HAS_RTTI | 1184 | | - // RTTI: debug mode only! | 1185 | | - GTEST_CHECK_(f == nullptr || dynamic_cast<To>(f) != nullptr); | 1186 | | -#endif | 1187 | | - return static_cast<To>(f); | 1188 | | -} | 1189 | | - | 1190 | 1149 | // Downcasts the pointer of type Base to Derived. | 1191 | 1150 | // Derived must be a subclass of Base. The parameter MUST | 1192 | 1151 | // point to a class of type Derived, not any subclass of it. | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/src/gtest-filepath.cc +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -102,7 +102,8 @@ FilePath FilePath::GetCurrentDir() { | 102 | 102 | #if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \ | 103 | 103 | defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_ESP8266) || \ | 104 | 104 | defined(GTEST_OS_ESP32) || defined(GTEST_OS_XTENSA) || \ | 105 | | - defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) | | 105 | + defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) || \ | | 106 | + defined(GTEST_OS_NRF52) | 106 | 107 | // These platforms do not have a current directory, so we just return | 107 | 108 | // something reasonable. | 108 | 109 | return FilePath(kCurrentDirectoryString); | @@ -356,7 +357,8 @@ bool FilePath::CreateFolder() const { | 356 | 357 | #elif defined(GTEST_OS_WINDOWS) | 357 | 358 | int result = _mkdir(pathname_.c_str()); | 358 | 359 | #elif defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \ | 359 | | - defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) | | 360 | + defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) || \ | | 361 | + defined(GTEST_OS_NRF52) | 360 | 362 | // do nothing | 361 | 363 | int result = 0; | 362 | 364 | #else | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/src/gtest_main.cc +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 31 | 31 |
| 32 | 32 | #include "gtest/gtest.h" | 33 | 33 |
| 34 | | -#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32) | | 34 | +#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32) || \ | | 35 | + (defined(GTEST_OS_NRF52) && defined(ARDUINO)) | 35 | 36 | // Arduino-like platforms: program entry points are setup/loop instead of main. | 36 | 37 |
| 37 | 38 | #ifdef GTEST_OS_ESP8266 | |
Collapse file Copy file name to clipboardExpand all lines: doc/contributing/maintaining/maintaining-dependencies.md +3-3Lines changed: 3 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ This a list of all the dependencies: | 15 | 15 | * [c-ares 1.20.1][] | 16 | 16 | * [cjs-module-lexer][] | 17 | 17 | * [corepack][] | 18 | | -* [googletest cc36671][] | | 18 | +* [googletest c875c4e][] | 19 | 19 | * [histogram][] | 20 | 20 | * [icu-small][] | 21 | 21 | * [llhttp][] | @@ -187,7 +187,7 @@ In practical terms, Corepack will let you use Yarn and pnpm without having to | 187 | 187 | install them - just like what currently happens with npm, which is shipped | 188 | 188 | by Node.js by default. | 189 | 189 |
| 190 | | -### googletest cc36671 | | 190 | +### googletest c875c4e | 191 | 191 |
| 192 | 192 | The [googletest](https://github.com/google/googletest) dependency is Google’s | 193 | 193 | C++ testing and mocking framework. | @@ -319,7 +319,7 @@ performance improvements not currently available in standard zlib. | 319 | 319 | [cjs-module-lexer]: #cjs-module-lexer | 320 | 320 | [corepack]: #corepack | 321 | 321 | [dependency-update-action]: ../../../.github/workflows/tools.yml | 322 | | -[googletest cc36671]: #googletest-cc36671 | | 322 | +[googletest c875c4e]: #googletest-c875c4e | 323 | 323 | [histogram]: #histogram | 324 | 324 | [icu-small]: #icu-small | 325 | 325 | [llhttp]: #llhttp | |
|