GeezerVison is showing github.com — deps: update googletest to 8a6feab · nodejs/node@cd99ee1
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 +25-2Lines changed: 25 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 122 | 122 | #include "gtest/internal/gtest-internal.h" | 123 | 123 | #include "gtest/internal/gtest-port.h" | 124 | 124 |
| | 125 | +#if GTEST_INTERNAL_HAS_STD_SPAN | | 126 | +#include <span> // NOLINT | | 127 | +#endif // GTEST_INTERNAL_HAS_STD_SPAN | | 128 | + | 125 | 129 | namespace testing { | 126 | 130 |
| 127 | 131 | // Definitions in the internal* namespaces are subject to change without notice. | @@ -131,13 +135,32 @@ namespace internal { | 131 | 135 | template <typename T> | 132 | 136 | void UniversalPrint(const T& value, ::std::ostream* os); | 133 | 137 |
| | 138 | +template <typename T> | | 139 | +struct IsStdSpan { | | 140 | + static constexpr bool value = false; | | 141 | +}; | | 142 | + | | 143 | +#if GTEST_INTERNAL_HAS_STD_SPAN | | 144 | +template <typename E> | | 145 | +struct IsStdSpan<std::span<E>> { | | 146 | + static constexpr bool value = true; | | 147 | +}; | | 148 | +#endif // GTEST_INTERNAL_HAS_STD_SPAN | | 149 | + | 134 | 150 | // Used to print an STL-style container when the user doesn't define | 135 | 151 | // a PrintTo() for it. | | 152 | +// | | 153 | +// NOTE: Since std::span does not have const_iterator until C++23, it would | | 154 | +// fail IsContainerTest before C++23. However, IsContainerTest only uses | | 155 | +// the presence of const_iterator to avoid treating iterators as containers | | 156 | +// because of iterator::iterator. Which means std::span satisfies the *intended* | | 157 | +// condition of IsContainerTest. | 136 | 158 | struct ContainerPrinter { | 137 | 159 | template <typename T, | 138 | 160 | typename = typename std::enable_if< | 139 | | - (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) && | 140 | | - !IsRecursiveContainer<T>::value>::type> | | 161 | + ((sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) && | | 162 | + !IsRecursiveContainer<T>::value) || | | 163 | + IsStdSpan<T>::value>::type> | 141 | 164 | static void PrintValue(const T& container, std::ostream* os) { | 142 | 165 | const size_t kMaxCount = 32; // The maximum number of elements to print. | 143 | 166 | *os << '{'; | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-internal.h +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 78 | 78 | // | 79 | 79 | // will result in the token foo__LINE__, instead of foo followed by | 80 | 80 | // the current line number. For more details, see | 81 | | -// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6 | | 81 | +// https://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6 | 82 | 82 | #define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar) | 83 | 83 | #define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo##bar | 84 | 84 |
| @@ -169,7 +169,7 @@ namespace edit_distance { | 169 | 169 | // All edits cost the same, with replace having lower priority than | 170 | 170 | // add/remove. | 171 | 171 | // Simple implementation of the Wagner-Fischer algorithm. | 172 | | -// See http://en.wikipedia.org/wiki/Wagner-Fischer_algorithm | | 172 | +// See https://en.wikipedia.org/wiki/Wagner-Fischer_algorithm | 173 | 173 | enum EditType { kMatch, kAdd, kRemove, kReplace }; | 174 | 174 | GTEST_API_ std::vector<EditType> CalculateOptimalEdits( | 175 | 175 | const std::vector<size_t>& left, const std::vector<size_t>& right); | @@ -236,7 +236,7 @@ GTEST_API_ std::string GetBoolAssertionFailureMessage( | 236 | 236 | // For double, there are 11 exponent bits and 52 fraction bits. | 237 | 237 | // | 238 | 238 | // More details can be found at | 239 | | -// http://en.wikipedia.org/wiki/IEEE_floating-point_standard. | | 239 | +// https://en.wikipedia.org/wiki/IEEE_floating-point_standard. | 240 | 240 | // | 241 | 241 | // Template parameter: | 242 | 242 | // | @@ -281,7 +281,7 @@ class FloatingPoint { | 281 | 281 | // bits. Therefore, 4 should be enough for ordinary use. | 282 | 282 | // | 283 | 283 | // See the following article for more details on ULP: | 284 | | - // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ | | 284 | + // https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ | 285 | 285 | static const uint32_t kMaxUlps = 4; | 286 | 286 |
| 287 | 287 | // Constructs a FloatingPoint from a raw floating-point number. | @@ -362,7 +362,7 @@ class FloatingPoint { | 362 | 362 | // N - 1 (the biggest number representable using | 363 | 363 | // sign-and-magnitude) is represented by 2N - 1. | 364 | 364 | // | 365 | | - // Read http://en.wikipedia.org/wiki/Signed_number_representations | | 365 | + // Read https://en.wikipedia.org/wiki/Signed_number_representations | 366 | 366 | // for more details on signed number representations. | 367 | 367 | static Bits SignAndMagnitudeToBiased(const Bits& sam) { | 368 | 368 | if (kSignBitMask & sam) { | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-param-util.h +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -584,7 +584,9 @@ class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase { | 584 | 584 |
| 585 | 585 | GTEST_CHECK_(IsValidParamName(param_name)) | 586 | 586 | << "Parameterized test name '" << param_name | 587 | | - << "' is invalid, in " << file << " line " << line << std::endl; | | 587 | + << "' is invalid (contains spaces, dashes, underscores, or " | | 588 | + "non-alphanumeric characters), in " | | 589 | + << file << " line " << line << "" << std::endl; | 588 | 590 |
| 589 | 591 | GTEST_CHECK_(test_param_names.count(param_name) == 0) | 590 | 592 | << "Duplicate parameterized test name '" << param_name << "', in " | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/include/gtest/internal/gtest-port.h +13-1Lines changed: 13 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 208 | 208 | // or | 209 | 209 | // UniversalPrinter<absl::optional> | 210 | 210 | // specializations. Always defined to 0 or 1. | | 211 | +// GTEST_INTERNAL_HAS_STD_SPAN - for enabling UniversalPrinter<std::span> | | 212 | +// specializations. Always defined to 0 or 1 | 211 | 213 | // GTEST_INTERNAL_HAS_STRING_VIEW - for enabling Matcher<std::string_view> or | 212 | 214 | // Matcher<absl::string_view> | 213 | 215 | // specializations. Always defined to 0 or 1. | @@ -609,7 +611,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; | 609 | 611 | // Determines whether clone(2) is supported. | 610 | 612 | // Usually it will only be available on Linux, excluding | 611 | 613 | // Linux on the Itanium architecture. | 612 | | -// Also see http://linux.die.net/man/2/clone. | | 614 | +// Also see https://linux.die.net/man/2/clone. | 613 | 615 | #ifndef GTEST_HAS_CLONE | 614 | 616 | // The user didn't tell us, so we need to figure it out. | 615 | 617 |
| @@ -2407,6 +2409,16 @@ inline ::std::nullopt_t Nullopt() { return ::std::nullopt; } | 2407 | 2409 | #define GTEST_INTERNAL_HAS_OPTIONAL 0 | 2408 | 2410 | #endif | 2409 | 2411 |
| | 2412 | +#ifdef __has_include | | 2413 | +#if __has_include(<span>) && GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L | | 2414 | +#define GTEST_INTERNAL_HAS_STD_SPAN 1 | | 2415 | +#endif // __has_include(<span>) && GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L | | 2416 | +#endif // __has_include | | 2417 | + | | 2418 | +#ifndef GTEST_INTERNAL_HAS_STD_SPAN | | 2419 | +#define GTEST_INTERNAL_HAS_STD_SPAN 0 | | 2420 | +#endif | | 2421 | + | 2410 | 2422 | #ifdef GTEST_HAS_ABSL | 2411 | 2423 | // Always use absl::string_view for Matcher<> specializations if googletest | 2412 | 2424 | // is built with absl support. | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/src/gtest-death-test.cc +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -783,7 +783,7 @@ DeathTest::TestRole WindowsDeathTest::AssumeRole() { | 783 | 783 | StreamableToString(static_cast<unsigned int>(::GetCurrentProcessId())) + | 784 | 784 | // size_t has the same width as pointers on both 32-bit and 64-bit | 785 | 785 | // Windows platforms. | 786 | | - // See http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx. | | 786 | + // See https://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx. | 787 | 787 | "|" + StreamableToString(reinterpret_cast<size_t>(write_handle)) + "|" + | 788 | 788 | StreamableToString(reinterpret_cast<size_t>(event_handle_.Get())); | 789 | 789 |
| |
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 |
|---|
@@ -312,7 +312,7 @@ void ShuffleRange(internal::Random* random, int begin, int end, | 312 | 312 | << begin << ", " << size << "]."; | 313 | 313 |
| 314 | 314 | // Fisher-Yates shuffle, from | 315 | | - // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle | | 315 | + // https://en.wikipedia.org/wiki/Fisher-Yates_shuffle | 316 | 316 | for (int range_width = end - begin; range_width >= 2; range_width--) { | 317 | 317 | const int last_in_range = begin + range_width - 1; | 318 | 318 | const int selected = | |
Collapse file Copy file name to clipboardExpand all lines: deps/googletest/src/gtest.cc +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -879,7 +879,7 @@ int UnitTestOptions::GTestProcessSEH(DWORD seh_code, const char* location) { | 879 | 879 | // apparently). | 880 | 880 | // | 881 | 881 | // SEH exception code for C++ exceptions. | 882 | | - // (see http://support.microsoft.com/kb/185294 for more information). | | 882 | + // (see https://support.microsoft.com/kb/185294 for more information). | 883 | 883 | const DWORD kCxxExceptionCode = 0xe06d7363; | 884 | 884 |
| 885 | 885 | if (!GTEST_FLAG_GET(catch_exceptions) || seh_code == kCxxExceptionCode || | @@ -3228,7 +3228,8 @@ static const char* GetAnsiColorCode(GTestColor color) { | 3228 | 3228 | case GTestColor::kYellow: | 3229 | 3229 | return "3"; | 3230 | 3230 | default: | 3231 | | - return nullptr; | | 3231 | + assert(false); | | 3232 | + return "9"; | 3232 | 3233 | } | 3233 | 3234 | } | 3234 | 3235 |
| |
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 7e33b6a][] | | 18 | +* [googletest 8a6feab][] | 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 7e33b6a | | 190 | +### googletest 8a6feab | 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 7e33b6a]: #googletest-7e33b6a | | 322 | +[googletest 8a6feab]: #googletest-8a6feab | 323 | 323 | [histogram]: #histogram | 324 | 324 | [icu-small]: #icu-small | 325 | 325 | [llhttp]: #llhttp | |
|