GeezerVison is showing github.com — deps: update googletest to 7e33b6a · nodejs/node@374ec3d
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-message.h +34-2Lines changed: 34 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 56 | 56 |
| 57 | 57 | #include "gtest/internal/gtest-port.h" | 58 | 58 |
| | 59 | +#ifdef GTEST_HAS_ABSL | | 60 | +#include <type_traits> | | 61 | + | | 62 | +#include "absl/strings/internal/has_absl_stringify.h" | | 63 | +#include "absl/strings/str_cat.h" | | 64 | +#endif // GTEST_HAS_ABSL | | 65 | + | 59 | 66 | GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ | 60 | 67 | /* class A needs to have dll-interface to be used by clients of class B */) | 61 | 68 |
| @@ -111,8 +118,17 @@ class GTEST_API_ Message { | 111 | 118 | *ss_ << str; | 112 | 119 | } | 113 | 120 |
| 114 | | - // Streams a non-pointer value to this object. | 115 | | - template <typename T> | | 121 | + // Streams a non-pointer value to this object. If building a version of | | 122 | + // GoogleTest with ABSL, this overload is only enabled if the value does not | | 123 | + // have an AbslStringify definition. | | 124 | + template <typename T | | 125 | +#ifdef GTEST_HAS_ABSL | | 126 | + , | | 127 | + typename std::enable_if< | | 128 | + !absl::strings_internal::HasAbslStringify<T>::value, // NOLINT | | 129 | + int>::type = 0 | | 130 | +#endif // GTEST_HAS_ABSL | | 131 | + > | 116 | 132 | inline Message& operator<<(const T& val) { | 117 | 133 | // Some libraries overload << for STL containers. These | 118 | 134 | // overloads are defined in the global namespace instead of ::std. | @@ -133,6 +149,22 @@ class GTEST_API_ Message { | 133 | 149 | return *this; | 134 | 150 | } | 135 | 151 |
| | 152 | +#ifdef GTEST_HAS_ABSL | | 153 | + // Streams a non-pointer value with an AbslStringify definition to this | | 154 | + // object. | | 155 | + template <typename T, | | 156 | + typename std::enable_if< | | 157 | + absl::strings_internal::HasAbslStringify<T>::value, // NOLINT | | 158 | + int>::type = 0> | | 159 | + inline Message& operator<<(const T& val) { | | 160 | + // ::operator<< is needed here for a similar reason as with the non-Abseil | | 161 | + // version above | | 162 | + using ::operator<<; | | 163 | + *ss_ << absl::StrCat(val); | | 164 | + return *this; | | 165 | + } | | 166 | +#endif // GTEST_HAS_ABSL | | 167 | + | 136 | 168 | // Streams a pointer value to this object. | 137 | 169 | // | 138 | 170 | // This function is an overload of the previous one. When you | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/gtest.h +4-5Lines changed: 4 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 51 | 51 |
| 52 | 52 | #include <cstddef> | 53 | 53 | #include <cstdint> | 54 | | -#include <iomanip> | 55 | 54 | #include <limits> | 56 | 55 | #include <memory> | 57 | 56 | #include <ostream> | @@ -1574,12 +1573,12 @@ AssertionResult CmpHelperFloatingPointEQ(const char* lhs_expression, | 1574 | 1573 | } | 1575 | 1574 |
| 1576 | 1575 | ::std::stringstream lhs_ss; | 1577 | | - lhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) | 1578 | | - << lhs_value; | | 1576 | + lhs_ss.precision(std::numeric_limits<RawType>::digits10 + 2); | | 1577 | + lhs_ss << lhs_value; | 1579 | 1578 |
| 1580 | 1579 | ::std::stringstream rhs_ss; | 1581 | | - rhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) | 1582 | | - << rhs_value; | | 1580 | + rhs_ss.precision(std::numeric_limits<RawType>::digits10 + 2); | | 1581 | + rhs_ss << rhs_value; | 1583 | 1582 |
| 1584 | 1583 | return EqFailure(lhs_expression, rhs_expression, | 1585 | 1584 | StringStreamToString(&lhs_ss), StringStreamToString(&rhs_ss), | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-internal.h -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 58 | 58 |
| 59 | 59 | #include <cstdint> | 60 | 60 | #include <functional> | 61 | | -#include <iomanip> | 62 | 61 | #include <limits> | 63 | 62 | #include <map> | 64 | 63 | #include <set> | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-port.h +4-14Lines changed: 4 additions & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 220 | 220 | // GTEST_HAS_ALT_PATH_SEP_ - Always defined to 0 or 1. | 221 | 221 | // GTEST_WIDE_STRING_USES_UTF16_ - Always defined to 0 or 1. | 222 | 222 | // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Always defined to 0 or 1. | 223 | | -// GTEST_HAS_DOWNCAST_ - Always defined to 0 or 1. | 224 | 223 | // GTEST_HAS_NOTIFICATION_- Always defined to 0 or 1. | 225 | 224 | // | 226 | 225 | // Synchronization: | | 313 | 312 | #include "gtest/internal/custom/gtest-port.h" | 314 | 313 | #include "gtest/internal/gtest-port-arch.h" | 315 | 314 |
| 316 | | -#ifndef GTEST_HAS_DOWNCAST_ | 317 | | -#define GTEST_HAS_DOWNCAST_ 0 | 318 | | -#endif | 319 | | - | 320 | 315 | #ifndef GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ | 321 | 316 | #define GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ 0 | 322 | 317 | #endif | @@ -1153,17 +1148,12 @@ inline To ImplicitCast_(To x) { | 1153 | 1148 | // check to enforce this. | 1154 | 1149 | template <class Derived, class Base> | 1155 | 1150 | Derived* CheckedDowncastToActualType(Base* base) { | | 1151 | + static_assert(std::is_base_of<Base, Derived>::value, | | 1152 | + "target type not derived from source type"); | 1156 | 1153 | #if GTEST_HAS_RTTI | 1157 | | - GTEST_CHECK_(typeid(*base) == typeid(Derived)); | 1158 | | -#endif | 1159 | | - | 1160 | | -#if GTEST_HAS_DOWNCAST_ | 1161 | | - return ::down_cast<Derived*>(base); | 1162 | | -#elif GTEST_HAS_RTTI | 1163 | | - return dynamic_cast<Derived*>(base); // NOLINT | 1164 | | -#else | 1165 | | - return static_cast<Derived*>(base); // Poor man's downcast. | | 1154 | + GTEST_CHECK_(base == nullptr || dynamic_cast<Derived*>(base) != nullptr); | 1166 | 1155 | #endif | | 1156 | + return static_cast<Derived*>(base); | 1167 | 1157 | } | 1168 | 1158 |
| 1169 | 1159 | #if GTEST_HAS_STREAM_REDIRECTION | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/src/gtest-internal-inl.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -672,7 +672,7 @@ class GTEST_API_ UnitTestImpl { | 672 | 672 | void AddTestInfo(internal::SetUpTestSuiteFunc set_up_tc, | 673 | 673 | internal::TearDownTestSuiteFunc tear_down_tc, | 674 | 674 | TestInfo* test_info) { | 675 | | -#ifdef GTEST_HAS_FILE_SYSTEM | | 675 | +#if GTEST_HAS_FILE_SYSTEM | 676 | 676 | // In order to support thread-safe death tests, we need to | 677 | 677 | // remember the original working directory when the test program | 678 | 678 | // was first invoked. We cannot do this in RUN_ALL_TESTS(), as | |
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 c875c4e][] | | 18 | +* [googletest 7e33b6a][] | 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 c875c4e | | 190 | +### googletest 7e33b6a | 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 c875c4e]: #googletest-c875c4e | | 322 | +[googletest 7e33b6a]: #googletest-7e33b6a | 323 | 323 | [histogram]: #histogram | 324 | 324 | [icu-small]: #icu-small | 325 | 325 | [llhttp]: #llhttp | |
|