deps: update googletest to e54519b · nodejs/node@9761e7d · GitHub
Skip to content

Commit 9761e7d

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update googletest to e54519b
PR-URL: #56370 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent c99de1f commit 9761e7d

3 files changed

Lines changed: 50 additions & 3 deletions

File tree

deps/googletest/include/gtest/gtest-matchers.h

Lines changed: 3 additions & 3 deletions

deps/googletest/include/gtest/gtest-printers.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@
126126
#include <span> // NOLINT
127127
#endif // GTEST_INTERNAL_HAS_STD_SPAN
128128

129+
#if GTEST_INTERNAL_HAS_COMPARE_LIB
130+
#include <compare> // NOLINT
131+
#endif // GTEST_INTERNAL_HAS_COMPARE_LIB
132+
129133
namespace testing {
130134

131135
// Definitions in the internal* namespaces are subject to change without notice.
@@ -782,6 +786,41 @@ void PrintTo(const std::shared_ptr<T>& ptr, std::ostream* os) {
782786
(PrintSmartPointer<T>)(ptr, os, 0);
783787
}
784788

789+
#if GTEST_INTERNAL_HAS_COMPARE_LIB
790+
template <typename T>
791+
void PrintOrderingHelper(T ordering, std::ostream* os) {
792+
if (ordering == T::less) {
793+
*os << "(less)";
794+
} else if (ordering == T::greater) {
795+
*os << "(greater)";
796+
} else if (ordering == T::equivalent) {
797+
*os << "(equivalent)";
798+
} else {
799+
*os << "(unknown ordering)";
800+
}
801+
}
802+
803+
inline void PrintTo(std::strong_ordering ordering, std::ostream* os) {
804+
if (ordering == std::strong_ordering::equal) {
805+
*os << "(equal)";
806+
} else {
807+
PrintOrderingHelper(ordering, os);
808+
}
809+
}
810+
811+
inline void PrintTo(std::partial_ordering ordering, std::ostream* os) {
812+
if (ordering == std::partial_ordering::unordered) {
813+
*os << "(unordered)";
814+
} else {
815+
PrintOrderingHelper(ordering, os);
816+
}
817+
}
818+
819+
inline void PrintTo(std::weak_ordering ordering, std::ostream* os) {
820+
PrintOrderingHelper(ordering, os);
821+
}
822+
#endif
823+
785824
// Helper function for printing a tuple. T must be instantiated with
786825
// a tuple type.
787826
template <typename T>

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

Lines changed: 8 additions & 0 deletions

0 commit comments

Comments
 (0)