mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
deps: update googletest to cc36671
PR-URL: https://github.com/nodejs/node/pull/48789 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
1 parent
373848a457
commit
db56f02ea3
8 files changed
+55
-64
No files matched your search
+6
-6
@@ -298,8 +298,8 @@ struct FindFirstPrinter<
|
||||
// - Print containers (they have begin/end/etc).
|
||||
// - Print function pointers.
|
||||
// - Print object pointers.
|
||||
// - Use the stream operator, if available.
|
||||
// - Print protocol buffers.
|
||||
// - Use the stream operator, if available.
|
||||
// - Print types convertible to BiggestInt.
|
||||
// - Print types convertible to StringView, if available.
|
||||
// - Fallback to printing the raw bytes of the object.
|
||||
@@ -475,7 +475,7 @@ GTEST_API_ void PrintTo(char32_t c, ::std::ostream* os);
|
||||
inline void PrintTo(char16_t c, ::std::ostream* os) {
|
||||
PrintTo(ImplicitCast_<char32_t>(c), os);
|
||||
}
|
||||
#ifdef __cpp_char8_t
|
||||
#ifdef __cpp_lib_char8_t
|
||||
inline void PrintTo(char8_t c, ::std::ostream* os) {
|
||||
PrintTo(ImplicitCast_<char32_t>(c), os);
|
||||
}
|
||||
@@ -531,7 +531,7 @@ int AppropriateResolution(FloatType val) {
|
||||
} else if (val >= 0.0001) {
|
||||
mulfor6 = 1e9;
|
||||
}
|
||||
if (static_cast<float>(static_cast<int32_t>(val * mulfor6 + 0.5)) /
|
||||
if (static_cast<FloatType>(static_cast<int32_t>(val * mulfor6 + 0.5)) /
|
||||
mulfor6 ==
|
||||
val)
|
||||
return 6;
|
||||
@@ -546,7 +546,7 @@ int AppropriateResolution(FloatType val) {
|
||||
} else if (val >= 1e6) { // 1,000,000 to 9,999,999
|
||||
divfor6 = 10;
|
||||
}
|
||||
if (static_cast<float>(static_cast<int32_t>(val / divfor6 + 0.5)) *
|
||||
if (static_cast<FloatType>(static_cast<int32_t>(val / divfor6 + 0.5)) *
|
||||
divfor6 ==
|
||||
val)
|
||||
return 6;
|
||||
@@ -588,7 +588,7 @@ inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
|
||||
inline void PrintTo(unsigned char* s, ::std::ostream* os) {
|
||||
PrintTo(ImplicitCast_<const void*>(s), os);
|
||||
}
|
||||
#ifdef __cpp_char8_t
|
||||
#ifdef __cpp_lib_char8_t
|
||||
// Overloads for u8 strings.
|
||||
GTEST_API_ void PrintTo(const char8_t* s, ::std::ostream* os);
|
||||
inline void PrintTo(char8_t* s, ::std::ostream* os) {
|
||||
@@ -908,7 +908,7 @@ void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
|
||||
GTEST_API_ void UniversalPrintArray(const char* begin, size_t len,
|
||||
::std::ostream* os);
|
||||
|
||||
#ifdef __cpp_char8_t
|
||||
#ifdef __cpp_lib_char8_t
|
||||
// This overload prints a (const) char8_t array compactly.
|
||||
GTEST_API_ void UniversalPrintArray(const char8_t* begin, size_t len,
|
||||
::std::ostream* os);
|
||||
|
||||
@@ -113,6 +113,8 @@
|
||||
#define GTEST_OS_XTENSA 1
|
||||
#elif defined(__hexagon__)
|
||||
#define GTEST_OS_QURT 1
|
||||
#elif defined(CPU_QN9090) || defined(CPU_QN9090HN)
|
||||
#define GTEST_OS_NXP_QN9090 1
|
||||
#endif // __CYGWIN__
|
||||
|
||||
#endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
|
||||
+7
-4
@@ -505,7 +505,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
#if (!(defined(GTEST_OS_LINUX_ANDROID) || defined(GTEST_OS_CYGWIN) || \
|
||||
defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU) || \
|
||||
defined(GTEST_OS_ESP32) || defined(GTEST_OS_ESP8266) || \
|
||||
defined(GTEST_OS_XTENSA) || defined(GTEST_OS_QURT)))
|
||||
defined(GTEST_OS_XTENSA) || defined(GTEST_OS_QURT) || \
|
||||
defined(GTEST_OS_NXP_QN9090)))
|
||||
#define GTEST_HAS_STD_WSTRING 1
|
||||
#else
|
||||
#define GTEST_HAS_STD_WSTRING 0
|
||||
@@ -924,9 +925,11 @@ using std::tuple_size;
|
||||
namespace internal {
|
||||
|
||||
// A secret type that Google Test users don't know about. It has no
|
||||
// definition on purpose. Therefore it's impossible to create a
|
||||
// accessible constructors on purpose. Therefore it's impossible to create a
|
||||
// Secret object, which is what we want.
|
||||
class Secret;
|
||||
class Secret {
|
||||
Secret(const Secret&) = delete;
|
||||
};
|
||||
|
||||
// A helper for suppressing warnings on constant condition. It just
|
||||
// returns 'condition'.
|
||||
@@ -1995,7 +1998,7 @@ inline bool IsUpper(char ch) {
|
||||
inline bool IsXDigit(char ch) {
|
||||
return isxdigit(static_cast<unsigned char>(ch)) != 0;
|
||||
}
|
||||
#ifdef __cpp_char8_t
|
||||
#ifdef __cpp_lib_char8_t
|
||||
inline bool IsXDigit(char8_t ch) {
|
||||
return isxdigit(static_cast<unsigned char>(ch)) != 0;
|
||||
}
|
||||
|
||||
+2
-2
@@ -102,7 +102,7 @@ FilePath FilePath::GetCurrentDir() {
|
||||
#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
|
||||
defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_ESP8266) || \
|
||||
defined(GTEST_OS_ESP32) || defined(GTEST_OS_XTENSA) || \
|
||||
defined(GTEST_OS_QURT)
|
||||
defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090)
|
||||
// These platforms do not have a current directory, so we just return
|
||||
// something reasonable.
|
||||
return FilePath(kCurrentDirectoryString);
|
||||
@@ -356,7 +356,7 @@ bool FilePath::CreateFolder() const {
|
||||
#elif defined(GTEST_OS_WINDOWS)
|
||||
int result = _mkdir(pathname_.c_str());
|
||||
#elif defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \
|
||||
defined(GTEST_OS_QURT)
|
||||
defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090)
|
||||
// do nothing
|
||||
int result = 0;
|
||||
#else
|
||||
|
||||
+3
-3
@@ -387,10 +387,10 @@ class GTEST_API_ UnitTestOptions {
|
||||
#ifdef GTEST_OS_WINDOWS
|
||||
// Function for supporting the gtest_catch_exception flag.
|
||||
|
||||
// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
|
||||
// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
|
||||
// Returns EXCEPTION_EXECUTE_HANDLER if given SEH exception was handled, or
|
||||
// EXCEPTION_CONTINUE_SEARCH otherwise.
|
||||
// This function is useful as an __except condition.
|
||||
static int GTestShouldProcessSEH(DWORD exception_code);
|
||||
static int GTestProcessSEH(DWORD seh_code, const char* location);
|
||||
#endif // GTEST_OS_WINDOWS
|
||||
|
||||
// Returns true if "name" matches the ':' separated list of glob-style
|
||||
|
||||
+4
-4
@@ -216,7 +216,7 @@ static const char* GetCharWidthPrefix(signed char) { return ""; }
|
||||
|
||||
static const char* GetCharWidthPrefix(unsigned char) { return ""; }
|
||||
|
||||
#ifdef __cpp_char8_t
|
||||
#ifdef __cpp_lib_char8_t
|
||||
static const char* GetCharWidthPrefix(char8_t) { return "u8"; }
|
||||
#endif
|
||||
|
||||
@@ -232,7 +232,7 @@ static CharFormat PrintAsStringLiteralTo(char c, ostream* os) {
|
||||
return PrintAsStringLiteralTo(ToChar32(c), os);
|
||||
}
|
||||
|
||||
#ifdef __cpp_char8_t
|
||||
#ifdef __cpp_lib_char8_t
|
||||
static CharFormat PrintAsStringLiteralTo(char8_t c, ostream* os) {
|
||||
return PrintAsStringLiteralTo(ToChar32(c), os);
|
||||
}
|
||||
@@ -395,7 +395,7 @@ void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
|
||||
UniversalPrintCharArray(begin, len, os);
|
||||
}
|
||||
|
||||
#ifdef __cpp_char8_t
|
||||
#ifdef __cpp_lib_char8_t
|
||||
// Prints a (const) char8_t array of 'len' elements, starting at address
|
||||
// 'begin'.
|
||||
void UniversalPrintArray(const char8_t* begin, size_t len, ostream* os) {
|
||||
@@ -438,7 +438,7 @@ void PrintCStringTo(const Char* s, ostream* os) {
|
||||
|
||||
void PrintTo(const char* s, ostream* os) { PrintCStringTo(s, os); }
|
||||
|
||||
#ifdef __cpp_char8_t
|
||||
#ifdef __cpp_lib_char8_t
|
||||
void PrintTo(const char8_t* s, ostream* os) { PrintCStringTo(s, os); }
|
||||
#endif
|
||||
|
||||
|
||||
Vendored
+28
-42
@@ -863,13 +863,18 @@ bool UnitTestOptions::FilterMatchesTest(const std::string& test_suite_name,
|
||||
}
|
||||
|
||||
#if GTEST_HAS_SEH
|
||||
// Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
|
||||
// given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
|
||||
// This function is useful as an __except condition.
|
||||
int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) {
|
||||
static std::string FormatSehExceptionMessage(DWORD exception_code,
|
||||
const char* location) {
|
||||
Message message;
|
||||
message << "SEH exception with code 0x" << std::setbase(16) << exception_code
|
||||
<< std::setbase(10) << " thrown in " << location << ".";
|
||||
return message.GetString();
|
||||
}
|
||||
|
||||
int UnitTestOptions::GTestProcessSEH(DWORD seh_code, const char* location) {
|
||||
// Google Test should handle a SEH exception if:
|
||||
// 1. the user wants it to, AND
|
||||
// 2. this is not a breakpoint exception, AND
|
||||
// 2. this is not a breakpoint exception or stack overflow, AND
|
||||
// 3. this is not a C++ exception (VC++ implements them via SEH,
|
||||
// apparently).
|
||||
//
|
||||
@@ -877,16 +882,20 @@ int UnitTestOptions::GTestShouldProcessSEH(DWORD exception_code) {
|
||||
// (see http://support.microsoft.com/kb/185294 for more information).
|
||||
const DWORD kCxxExceptionCode = 0xe06d7363;
|
||||
|
||||
bool should_handle = true;
|
||||
if (!GTEST_FLAG_GET(catch_exceptions) || seh_code == kCxxExceptionCode ||
|
||||
seh_code == EXCEPTION_BREAKPOINT ||
|
||||
seh_code == EXCEPTION_STACK_OVERFLOW) {
|
||||
return EXCEPTION_CONTINUE_SEARCH; // Don't handle these exceptions
|
||||
}
|
||||
|
||||
if (!GTEST_FLAG_GET(catch_exceptions))
|
||||
should_handle = false;
|
||||
else if (exception_code == EXCEPTION_BREAKPOINT)
|
||||
should_handle = false;
|
||||
else if (exception_code == kCxxExceptionCode)
|
||||
should_handle = false;
|
||||
internal::ReportFailureInUnknownLocation(
|
||||
TestPartResult::kFatalFailure,
|
||||
FormatSehExceptionMessage(seh_code, location) +
|
||||
"\n"
|
||||
"Stack trace:\n" +
|
||||
::testing::internal::GetCurrentOsStackTraceExceptTop(1));
|
||||
|
||||
return should_handle ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
|
||||
return EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
#endif // GTEST_HAS_SEH
|
||||
|
||||
@@ -2553,23 +2562,6 @@ bool Test::HasSameFixtureClass() {
|
||||
return true;
|
||||
}
|
||||
|
||||
#if GTEST_HAS_SEH
|
||||
|
||||
// Adds an "exception thrown" fatal failure to the current test. This
|
||||
// function returns its result via an output parameter pointer because VC++
|
||||
// prohibits creation of objects with destructors on stack in functions
|
||||
// using __try (see error C2712).
|
||||
static std::string* FormatSehExceptionMessage(DWORD exception_code,
|
||||
const char* location) {
|
||||
Message message;
|
||||
message << "SEH exception with code 0x" << std::setbase(16) << exception_code
|
||||
<< std::setbase(10) << " thrown in " << location << ".";
|
||||
|
||||
return new std::string(message.GetString());
|
||||
}
|
||||
|
||||
#endif // GTEST_HAS_SEH
|
||||
|
||||
namespace internal {
|
||||
|
||||
#if GTEST_HAS_EXCEPTIONS
|
||||
@@ -2611,16 +2603,8 @@ Result HandleSehExceptionsInMethodIfSupported(T* object, Result (T::*method)(),
|
||||
#if GTEST_HAS_SEH
|
||||
__try {
|
||||
return (object->*method)();
|
||||
} __except (internal::UnitTestOptions::GTestShouldProcessSEH( // NOLINT
|
||||
GetExceptionCode())) {
|
||||
// We create the exception message on the heap because VC++ prohibits
|
||||
// creation of objects with destructors on stack in functions using __try
|
||||
// (see error C2712).
|
||||
std::string* exception_message =
|
||||
FormatSehExceptionMessage(GetExceptionCode(), location);
|
||||
internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure,
|
||||
*exception_message);
|
||||
delete exception_message;
|
||||
} __except (internal::UnitTestOptions::GTestProcessSEH( // NOLINT
|
||||
GetExceptionCode(), location)) {
|
||||
return static_cast<Result>(0);
|
||||
}
|
||||
#else
|
||||
@@ -5655,8 +5639,10 @@ void UnitTestImpl::ConfigureXmlOutput() {
|
||||
<< output_format << "\" ignored.";
|
||||
}
|
||||
#else
|
||||
GTEST_LOG_(ERROR) << "ERROR: alternative output formats require "
|
||||
<< "GTEST_HAS_FILE_SYSTEM to be enabled";
|
||||
if (!output_format.empty()) {
|
||||
GTEST_LOG_(ERROR) << "ERROR: alternative output formats require "
|
||||
<< "GTEST_HAS_FILE_SYSTEM to be enabled";
|
||||
}
|
||||
#endif // GTEST_HAS_FILE_SYSTEM
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ This a list of all the dependencies:
|
||||
* [c-ares 1.19.0][]
|
||||
* [cjs-module-lexer 1.2.2][]
|
||||
* [corepack][]
|
||||
* [googletest ec4fed9][]
|
||||
* [googletest cc36671][]
|
||||
* [histogram 0.11.8][]
|
||||
* [icu-small 73.2][]
|
||||
* [libuv 1.46.0][]
|
||||
@@ -189,7 +189,7 @@ In practical terms, Corepack will let you use Yarn and pnpm without having to
|
||||
install them - just like what currently happens with npm, which is shipped
|
||||
by Node.js by default.
|
||||
|
||||
### googletest ec4fed9
|
||||
### googletest cc36671
|
||||
|
||||
The [googletest](https://github.com/google/googletest) dependency is Google’s
|
||||
C++ testing and mocking framework.
|
||||
@@ -326,7 +326,7 @@ performance improvements not currently available in standard zlib.
|
||||
[cjs-module-lexer 1.2.2]: #cjs-module-lexer-122
|
||||
[corepack]: #corepack
|
||||
[dependency-update-action]: ../../../.github/workflows/tools.yml
|
||||
[googletest ec4fed9]: #googletest-ec4fed9
|
||||
[googletest cc36671]: #googletest-cc36671
|
||||
[histogram 0.11.8]: #histogram-0118
|
||||
[icu-small 73.2]: #icu-small-732
|
||||
[libuv 1.46.0]: #libuv-1460
|
||||
|
||||
Reference in new issue
Block a user