Skip to content

Commit a8944e6

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update googletest to e882c36410197464e3429546e6a7d5e217bde51e
PR-URL: #67477 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
1 parent 41c0b95 commit a8944e6

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎deps/googletest/include/gtest/gtest.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,12 @@ class GTEST_API_ [[nodiscard]] Test {
300300
// global context (before or after invocation of RUN_ALL_TESTS and from
301301
// SetUp/TearDown method of Environment objects registered with Google
302302
// Test) will be output as attributes of the <testsuites> element.
303-
static void RecordProperty(const std::string& key, const std::string& value);
303+
static void RecordProperty(std::string_view key, std::string_view value);
304304
// We do not define a custom serialization except for values that can be
305305
// converted to int64_t, but other values could be logged in this way.
306306
template <typename T, std::enable_if_t<std::is_convertible<T, int64_t>::value,
307307
bool> = true>
308-
static void RecordProperty(const std::string& key, const T& value) {
308+
static void RecordProperty(std::string_view key, const T& value) {
309309
RecordProperty(key, (Message() << value).GetString());
310310
}
311311

@@ -376,7 +376,7 @@ class [[nodiscard]] TestProperty {
376376
// C'tor. TestProperty does NOT have a default constructor.
377377
// Always use this constructor (with parameters) to create a
378378
// TestProperty object.
379-
TestProperty(const std::string& a_key, const std::string& a_value)
379+
TestProperty(std::string_view a_key, std::string_view a_value)
380380
: key_(a_key), value_(a_value) {}
381381

382382
// Gets the user supplied key.
@@ -386,7 +386,7 @@ class [[nodiscard]] TestProperty {
386386
const char* value() const { return value_.c_str(); }
387387

388388
// Sets a new value, overriding the one supplied in the constructor.
389-
void SetValue(const std::string& new_value) { value_ = new_value; }
389+
void SetValue(std::string_view new_value) { value_ = new_value; }
390390

391391
private:
392392
// The key supplied by the user.
@@ -1261,7 +1261,7 @@ class GTEST_API_ [[nodiscard]] UnitTest {
12611261
// from SetUpTestSuite or TearDownTestSuite, or to the global property set
12621262
// when invoked elsewhere. If the result already contains a property with
12631263
// the same key, the value will be updated.
1264-
void RecordProperty(const std::string& key, const std::string& value);
1264+
void RecordProperty(std::string_view key, std::string_view value);
12651265

12661266
// Gets the i-th test suite among all the test suites. i can range from 0 to
12671267
// total_test_suite_count() - 1. If i is not in that range, returns NULL.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
676676
#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
677677
defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_WINDOWS_GAMES) || \
678678
defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \
679-
defined(GTEST_OS_QURT) || !GTEST_HAS_FILE_SYSTEM
679+
defined(GTEST_OS_QURT) || defined(__wasi__) || !GTEST_HAS_FILE_SYSTEM
680680
#define GTEST_HAS_STREAM_REDIRECTION 0
681681
#else
682682
#define GTEST_HAS_STREAM_REDIRECTION 1
@@ -706,8 +706,9 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
706706
// Created by default when Death tests are supported, but other platforms can
707707
// use the Premature exit file without Death test support (e.g. for detecting
708708
// crashes).
709-
#if GTEST_HAS_DEATH_TEST || \
710-
(defined(GTEST_OS_EMSCRIPTEN) && GTEST_HAS_FILE_SYSTEM)
709+
#if GTEST_HAS_DEATH_TEST || \
710+
((defined(GTEST_OS_EMSCRIPTEN) || defined(GTEST_OS_IOS)) && \
711+
GTEST_HAS_FILE_SYSTEM)
711712
#define GTEST_INTERNAL_HAS_PREMATURE_EXIT_FILE 1
712713
#endif
713714

‎deps/googletest/src/gtest.cc‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,7 +2565,7 @@ void Test::SetUp() {}
25652565
void Test::TearDown() {}
25662566

25672567
// Allows user supplied key value pairs to be recorded for later output.
2568-
void Test::RecordProperty(const std::string& key, const std::string& value) {
2568+
void Test::RecordProperty(std::string_view key, std::string_view value) {
25692569
UnitTest::GetInstance()->RecordProperty(key, value);
25702570
}
25712571

@@ -5528,8 +5528,7 @@ void UnitTest::AddTestPartResult(TestPartResult::Type result_type,
55285528
// from SetUpTestSuite or TearDownTestSuite, or to the global property set
55295529
// when invoked elsewhere. If the result already contains a property with
55305530
// the same key, the value will be updated.
5531-
void UnitTest::RecordProperty(const std::string& key,
5532-
const std::string& value) {
5531+
void UnitTest::RecordProperty(std::string_view key, std::string_view value) {
55335532
impl_->RecordProperty(TestProperty(key, value));
55345533
}
55355534

0 commit comments

Comments
 (0)