diff --git a/.gitignore b/.gitignore index fe8a94c7..27c9f8d8 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ /third_party/fuchsia/clang /third_party/fuchsia/qemu /third_party/fuchsia/sdk -/third_party/gtest/gtest +/third_party/googletest/googletest /third_party/libfuzzer /third_party/linux/.cipd /third_party/linux/clang diff --git a/BUILD.gn b/BUILD.gn index 98218af1..3f0aa0aa 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -28,7 +28,7 @@ config("disable_ubsan") { visibility = [ "snapshot:snapshot", "minidump:minidump_test", - "third_party/gtest:gtest", + "third_party/googletest:googletest", "util:util", ] } @@ -38,7 +38,7 @@ if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) { deps = [ "client:client_test", "minidump:minidump_test", - "test:gmock_main", + "test:googlemock_main", "test:test_test", ] if (!crashpad_is_ios) { @@ -173,14 +173,14 @@ if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) { test("crashpad_client_test") { deps = [ "client:client_test", - "test:gmock_main", + "test:googlemock_main", ] } test("crashpad_handler_test") { deps = [ "handler:handler_test", - "test:gtest_main", + "test:googletest_main", ] if (crashpad_is_ios || crashpad_is_fuchsia) { deps -= [ "handler:handler_test" ] @@ -190,14 +190,14 @@ if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) { test("crashpad_minidump_test") { deps = [ "minidump:minidump_test", - "test:gtest_main", + "test:googletest_main", ] } test("crashpad_snapshot_test") { deps = [ "snapshot:snapshot_test", - "test:gtest_main", + "test:googletest_main", ] if (crashpad_is_ios) { deps -= [ "snapshot:snapshot_test" ] @@ -206,14 +206,14 @@ if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) { test("crashpad_test_test") { deps = [ - "test:gmock_main", + "test:googlemock_main", "test:test_test", ] } test("crashpad_util_test") { deps = [ - "test:gmock_main", + "test:googlemock_main", "util:util_test", ] } diff --git a/DEPS b/DEPS index 81b9583b..eb9df6ad 100644 --- a/DEPS +++ b/DEPS @@ -31,9 +31,9 @@ deps = { '243fc89ae95b24717d41f3786f6a9abeeef87c92', 'condition': 'checkout_ios', }, - 'crashpad/third_party/gtest/gtest': + 'crashpad/third_party/googletest/googletest': Var('chromium_git') + '/external/github.com/google/googletest@' + - 'e3f0319d89f4cbf32993de595d984183b1a9fc57', + 'e589a337170554c48bc658cc857cf15080c9eacc', 'crashpad/third_party/gyp/gyp': Var('chromium_git') + '/external/gyp@' + '8bee09f4a57807136593ddc906b0b213c21f9014', diff --git a/build/crashpad_dependencies.gypi b/build/crashpad_dependencies.gypi index 7fd1cf66..5bae11af 100644 --- a/build/crashpad_dependencies.gypi +++ b/build/crashpad_dependencies.gypi @@ -17,11 +17,12 @@ # by the crashpad_standalone GYP variable. It may have these values: # standalone # A “standalone” Crashpad build, where the dependencies are in the - # Crashpad tree. third_party/mini_chromium and third_party/gtest provide - # the base and gtest libraries. + # Crashpad tree. third_party/mini_chromium and third_party/googletest + # provide the base and Google Test libraries. # external # A build with external dependencies. mini_chromium provides the base - # library, but it’s located outside of the Crashpad tree, as is gtest. + # library, but it’s located outside of the Crashpad tree, as is Google + # Test. # # In order for Crashpad’s .gyp files to reference the correct versions # depending on how dependencies are being provided, include this .gypi file @@ -29,7 +30,7 @@ # # Note that Crashpad’s in-Chromium build uses GN instead of GYP, and # Chromium’s GN build configures Crashpad to use Chromium’s own base library - # and its copy of the gtest library. + # and its copy of the Google Test library. 'variables': { # When with external dependencies, build/gyp_crashpad.py sets diff --git a/build/ios/Unittest-Info.plist b/build/ios/Unittest-Info.plist index 9256fb44..fdca91fb 100644 --- a/build/ios/Unittest-Info.plist +++ b/build/ios/Unittest-Info.plist @@ -3,7 +3,7 @@ CFBundleIdentifier - ${IOS_BUNDLE_ID_PREFIX}.gtest.${GTEST_BUNDLE_ID_SUFFIX:rfc1034identifier} + ${IOS_BUNDLE_ID_PREFIX}.googletest.${GTEST_BUNDLE_ID_SUFFIX:rfc1034identifier} UIApplicationDelegate CrashpadUnitTestDelegate diff --git a/build/run_tests.py b/build/run_tests.py index 2f1919b5..02639783 100755 --- a/build/run_tests.py +++ b/build/run_tests.py @@ -289,11 +289,11 @@ def _RunOnAndroidTarget(binary_dir, test, android_device, extra_command_line): # environment. # # Because the test will not run with its standard output attached to a - # pseudo-terminal device, gtest will not normally enable colored output, - # so mimic gtest’s own logic for deciding whether to enable color by - # checking this script’s own standard output connection. The whitelist - # of TERM values comes from gtest googletest/src/gtest.cc - # testing::internal::ShouldUseColor(). + # pseudo-terminal device, Google Test will not normally enable colored + # output, so mimic Google Test’s own logic for deciding whether to + # enable color by checking this script’s own standard output connection. + # The whitelist of TERM values comes from Google Test’s + # googletest/src/gtest.cc testing::internal::ShouldUseColor(). env = {'CRASHPAD_TEST_DATA_ROOT': device_temp_dir} gtest_color = os.environ.get('GTEST_COLOR') if gtest_color in ('auto', None): @@ -525,8 +525,9 @@ def main(args): parser = argparse.ArgumentParser(description='Run Crashpad unittests.') parser.add_argument('binary_dir', help='Root of build dir') parser.add_argument('test', nargs='*', help='Specific test(s) to run.') - parser.add_argument('--gtest_filter', - help='GTest filter applied to GTest binary runs.') + parser.add_argument( + '--gtest_filter', + help='Google Test filter applied to Google Test binary runs.') args = parser.parse_args() # Tell 64-bit Windows tests where to find 32-bit test executables, for diff --git a/client/BUILD.gn b/client/BUILD.gn index b748c3fe..32b47fd5 100644 --- a/client/BUILD.gn +++ b/client/BUILD.gn @@ -157,8 +157,8 @@ source_set("client_test") { "../compat", "../snapshot", "../test", - "../third_party/gtest:gmock", - "../third_party/gtest:gtest", + "../third_party/googletest:googlemock", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../util", ] diff --git a/client/client_test.gyp b/client/client_test.gyp index 0686cc67..fefb8fc8 100644 --- a/client/client_test.gyp +++ b/client/client_test.gyp @@ -25,10 +25,10 @@ '../compat/compat.gyp:crashpad_compat', '../handler/handler.gyp:crashpad_handler', '../snapshot/snapshot.gyp:crashpad_snapshot', - '../test/test.gyp:crashpad_gmock_main', + '../test/test.gyp:crashpad_googlemock_main', '../test/test.gyp:crashpad_test', - '../third_party/gtest/gmock.gyp:gmock', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googlemock.gyp:googlemock', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', ], diff --git a/client/crashpad_client_ios_test.mm b/client/crashpad_client_ios_test.mm index 292b27f0..91d84cbf 100644 --- a/client/crashpad_client_ios_test.mm +++ b/client/crashpad_client_ios_test.mm @@ -36,19 +36,19 @@ TEST_F(CrashpadIOSClient, DumpWithoutCrash) { client.DumpWithoutCrash(&context); } -// This test is covered by a similar XCUITest, but for development purposes -// it's sometimes easier and faster to run as a gtest. However, there's no -// way to correctly run this as a gtest. Leave the test here, disabled, for use +// This test is covered by a similar XCUITest, but for development purposes it's +// sometimes easier and faster to run in Google Test. However, there's no way +// to correctly run this in Google Test. Leave the test here, disabled, for use // during development only. TEST_F(CrashpadIOSClient, DISABLED_ThrowNSException) { CrashpadClient client; client.StartCrashpadInProcessHandler(); - [NSException raise:@"GtestNSException" format:@"ThrowException"]; + [NSException raise:@"GoogleTestNSException" format:@"ThrowException"]; } -// This test is covered by a similar XCUITest, but for development purposes -// it's sometimes easier and faster to run as a gtest. However, there's no -// way to correctly run this as a gtest. Leave the test here, disabled, for use +// This test is covered by a similar XCUITest, but for development purposes it's +// sometimes easier and faster to run in Google Test. However, there's no way +// to correctly run this in Google Test. Leave the test here, disabled, for use // during development only. TEST_F(CrashpadIOSClient, DISABLED_ThrowException) { CrashpadClient client; diff --git a/client/prune_crash_reports_test.cc b/client/prune_crash_reports_test.cc index dbe8c0a5..32f83885 100644 --- a/client/prune_crash_reports_test.cc +++ b/client/prune_crash_reports_test.cc @@ -53,7 +53,7 @@ class MockDatabase : public CrashReportDatabase { MOCK_METHOD1(DeleteReport, OperationStatus(const UUID&)); MOCK_METHOD1(RequestUpload, OperationStatus(const UUID&)); - // gmock doesn't support mocking methods with non-copyable types such as + // Google Mock doesn't support mocking methods with non-copyable types such as // unique_ptr. OperationStatus FinishedWritingCrashReport(std::unique_ptr report, UUID* uuid) override { diff --git a/handler/BUILD.gn b/handler/BUILD.gn index 17c4cbd6..51ff2cf2 100644 --- a/handler/BUILD.gn +++ b/handler/BUILD.gn @@ -114,7 +114,7 @@ source_set("handler_test") { "../snapshot", "../snapshot:test_support", "../test", - "../third_party/gtest:gtest", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../util", ] @@ -231,7 +231,7 @@ if (crashpad_is_win) { deps = [ "../client", "../test", - "../third_party/gtest:gtest", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", ] } diff --git a/handler/crashpad_handler_test.cc b/handler/crashpad_handler_test.cc index afa12014..70e5da92 100644 --- a/handler/crashpad_handler_test.cc +++ b/handler/crashpad_handler_test.cc @@ -50,7 +50,7 @@ void StartAndCrashWithExtendedHandler(const base::FilePath& temp_dir) { false, false)); - // It appears that the GoogleTest fixture will catch and handle exceptions + // It appears that the Google Test fixture will catch and handle exceptions // from here. Hence the fabricated crash in favor of raising an exception. EXCEPTION_RECORD exception_record = {kExpectedExitCode, EXCEPTION_NONCONTINUABLE}; diff --git a/handler/handler_test.gyp b/handler/handler_test.gyp index c047e7c9..386ac294 100644 --- a/handler/handler_test.gyp +++ b/handler/handler_test.gyp @@ -27,9 +27,9 @@ '../compat/compat.gyp:crashpad_compat', '../snapshot/snapshot.gyp:crashpad_snapshot', '../snapshot/snapshot_test.gyp:crashpad_snapshot_test_lib', - '../test/test.gyp:crashpad_gtest_main', + '../test/test.gyp:crashpad_googletest_main', '../test/test.gyp:crashpad_test', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', ], @@ -86,7 +86,7 @@ 'dependencies': [ '../client/client.gyp:crashpad_client', '../test/test.gyp:crashpad_test', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', ], diff --git a/minidump/BUILD.gn b/minidump/BUILD.gn index 44425857..88227646 100644 --- a/minidump/BUILD.gn +++ b/minidump/BUILD.gn @@ -135,7 +135,7 @@ static_library("test_support") { deps = [ "../snapshot:test_support", "../test", - "../third_party/gtest:gtest", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../util", ] @@ -178,7 +178,7 @@ source_set("minidump_test") { ":test_support", "../snapshot:test_support", "../test", - "../third_party/gtest:gtest", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../util", ] diff --git a/minidump/minidump_exception_writer_test.cc b/minidump/minidump_exception_writer_test.cc index 75adbee2..eed8f104 100644 --- a/minidump/minidump_exception_writer_test.cc +++ b/minidump/minidump_exception_writer_test.cc @@ -61,7 +61,7 @@ void GetExceptionStream(const std::string& file_contents, } // The MINIDUMP_EXCEPTION_STREAMs |expected| and |observed| are compared against -// each other using gtest assertions. The context will be recovered from +// each other using Google Test assertions. The context will be recovered from // |file_contents| and stored in |context|. void ExpectExceptionStream(const MINIDUMP_EXCEPTION_STREAM* expected, const MINIDUMP_EXCEPTION_STREAM* observed, diff --git a/minidump/minidump_test.gyp b/minidump/minidump_test.gyp index cfc0606d..7c170632 100644 --- a/minidump/minidump_test.gyp +++ b/minidump/minidump_test.gyp @@ -22,7 +22,7 @@ 'type': 'static_library', 'dependencies': [ 'minidump.gyp:crashpad_minidump', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', ], 'include_dirs': [ @@ -54,9 +54,9 @@ 'crashpad_minidump_test_lib', 'minidump.gyp:crashpad_minidump', '../snapshot/snapshot_test.gyp:crashpad_snapshot_test_lib', - '../test/test.gyp:crashpad_gtest_main', + '../test/test.gyp:crashpad_googletest_main', '../test/test.gyp:crashpad_test', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', ], diff --git a/minidump/minidump_thread_writer_test.cc b/minidump/minidump_thread_writer_test.cc index 956d1005..e682b53d 100644 --- a/minidump/minidump_thread_writer_test.cc +++ b/minidump/minidump_thread_writer_test.cc @@ -97,7 +97,7 @@ TEST(MinidumpThreadWriter, EmptyThreadList) { } // The MINIDUMP_THREADs |expected| and |observed| are compared against each -// other using gtest assertions. If |stack| is not nullptr, |observed| is +// other using Google Test assertions. If |stack| is not nullptr, |observed| is // expected to contain a populated MINIDUMP_MEMORY_DESCRIPTOR in its Stack // field, otherwise, its Stack field is expected to be zeroed out. The memory // descriptor will be placed in |stack|. |observed| must contain a populated diff --git a/minidump/test/minidump_context_test_util.cc b/minidump/test/minidump_context_test_util.cc index c94fa20d..1125c962 100644 --- a/minidump/test/minidump_context_test_util.cc +++ b/minidump/test/minidump_context_test_util.cc @@ -274,7 +274,7 @@ void InitializeMinidumpContextMIPS64(MinidumpContextMIPS64* context, namespace { -// Using gtest assertions, compares |expected| to |observed|. This is +// Using Google Test assertions, compares |expected| to |observed|. This is // templatized because the CPUContextX86::Fxsave and CPUContextX86_64::Fxsave // are nearly identical but have different sizes for the members |xmm|, // |reserved_4|, and |available|. diff --git a/minidump/test/minidump_context_test_util.h b/minidump/test/minidump_context_test_util.h index 080e04a0..0c633dec 100644 --- a/minidump/test/minidump_context_test_util.h +++ b/minidump/test/minidump_context_test_util.h @@ -49,8 +49,8 @@ void InitializeMinidumpContextMIPS64(MinidumpContextMIPS* context, uint32_t seed); //! \} -//! \brief Verifies, via gtest assertions, that a context structure contains -//! expected values. +//! \brief Verifies, via Google Test assertions, that a context structure +//! contains expected values. //! //! \param[in] expect_seed The seed value used to initialize a context //! structure. This is the seed value used with diff --git a/minidump/test/minidump_file_writer_test_util.h b/minidump/test/minidump_file_writer_test_util.h index d1952583..4efe99e6 100644 --- a/minidump/test/minidump_file_writer_test_util.h +++ b/minidump/test/minidump_file_writer_test_util.h @@ -33,17 +33,17 @@ namespace test { //! \param[in] file_contents The contents of the minidump file. //! \param[out] directory The MINIDUMP_DIRECTORY referenced by the //! MINIDUMP_HEADER. If the MINIDUMP_HEADER does not reference a -//! MINIDUMP_DIRECTORY, `nullptr` without raising a gtest assertion. If the -//! referenced MINIDUMP_DIRECTORY is not valid, `nullptr` with a gtest -//! assertion raised. On failure, `nullptr`. +//! MINIDUMP_DIRECTORY, `nullptr` without raising a Google Test assertion. +//! If the referenced MINIDUMP_DIRECTORY is not valid, `nullptr` with a +//! Google Test assertion raised. On failure, `nullptr`. //! //! \return On success, the MINIDUMP_HEADER at the beginning of the minidump -//! file. On failure, raises a gtest assertion and returns `nullptr`. +//! file. On failure, raises a Google Test assertion and returns `nullptr`. const MINIDUMP_HEADER* MinidumpHeaderAtStart( const std::string& file_contents, const MINIDUMP_DIRECTORY** directory); -//! \brief Verifies, via gtest assertions, that a MINIDUMP_HEADER contains +//! \brief Verifies, via Google Test assertions, that a MINIDUMP_HEADER contains //! expected values. //! //! All fields in the MINIDUMP_HEADER will be evaluated except for the Signature diff --git a/minidump/test/minidump_memory_writer_test_util.h b/minidump/test/minidump_memory_writer_test_util.h index 0890cd0e..90c3b863 100644 --- a/minidump/test/minidump_memory_writer_test_util.h +++ b/minidump/test/minidump_memory_writer_test_util.h @@ -48,8 +48,8 @@ class TestMinidumpMemoryWriter final : public SnapshotMinidumpMemoryWriter { DISALLOW_COPY_AND_ASSIGN(TestMinidumpMemoryWriter); }; -//! \brief Verifies, via gtest assertions, that a MINIDUMP_MEMORY_DESCRIPTOR -//! structure contains expected values. +//! \brief Verifies, via Google Test assertions, that a +//! MINIDUMP_MEMORY_DESCRIPTOR structure contains expected values. //! //! In \a expected and \a observed, //! MINIDUMP_MEMORY_DESCRIPTOR::StartOfMemoryRange and @@ -64,10 +64,10 @@ class TestMinidumpMemoryWriter final : public SnapshotMinidumpMemoryWriter { void ExpectMinidumpMemoryDescriptor(const MINIDUMP_MEMORY_DESCRIPTOR* expected, const MINIDUMP_MEMORY_DESCRIPTOR* observed); -//! \brief Verifies, via gtest assertions, that a MINIDUMP_MEMORY_DESCRIPTOR -//! structure contains expected values, and that the memory region it points -//! to contains expected values assuming it was written by a -//! TestMinidumpMemoryWriter object. +//! \brief Verifies, via Google Test assertions, that a +//! MINIDUMP_MEMORY_DESCRIPTOR structure contains expected values, and that +//! the memory region it points to contains expected values assuming it was +//! written by a TestMinidumpMemoryWriter object. //! //! \a expected and \a observed are compared by //! ExpectMinidumpMemoryDescriptor(). diff --git a/minidump/test/minidump_rva_list_test_util.h b/minidump/test/minidump_rva_list_test_util.h index 4865d017..6b5a2a92 100644 --- a/minidump/test/minidump_rva_list_test_util.h +++ b/minidump/test/minidump_rva_list_test_util.h @@ -34,7 +34,7 @@ namespace test { //! file_contents. //! //! \return On success, the MinidumpRVAList at the beginning of the file. On -//! failure, raises a gtest assertion and returns `nullptr`. +//! failure, raises a Google Test assertion and returns `nullptr`. const MinidumpRVAList* MinidumpRVAListAtStart(const std::string& file_contents, size_t count); diff --git a/minidump/test/minidump_string_writer_test_util.h b/minidump/test/minidump_string_writer_test_util.h index 933ef33e..cf7c2ccc 100644 --- a/minidump/test/minidump_string_writer_test_util.h +++ b/minidump/test/minidump_string_writer_test_util.h @@ -39,7 +39,7 @@ namespace test { //! MINIDUMP_STRING. //! //! \return On success, a pointer to the MINIDUMP_STRING in \a file_contents. On -//! failure, raises a gtest assertion and returns `nullptr`. +//! failure, raises a Google Test assertion and returns `nullptr`. //! //! \sa MinidumpStringAtRVAAsString() //! \sa MinidumpUTF8StringAtRVA() @@ -58,7 +58,7 @@ const MINIDUMP_STRING* MinidumpStringAtRVA(const std::string& file_contents, //! MinidumpUTF8String. //! //! \return On success, a pointer to the MinidumpUTF8String in \a file_contents. -//! On failure, raises a gtest assertion and returns `nullptr`. +//! On failure, raises a Google Test assertion and returns `nullptr`. //! //! \sa MinidumpUTF8StringAtRVAAsString() //! \sa MinidumpStringAtRVA() @@ -76,7 +76,7 @@ const MinidumpUTF8String* MinidumpUTF8StringAtRVA( //! MINIDUMP_STRING. //! //! \return On success, the string read from \a file_writer at offset \a rva. On -//! failure, raises a gtest assertion and returns an empty string. +//! failure, raises a Google Test assertion and returns an empty string. //! //! \sa MinidumpUTF8StringAtRVAAsString() base::string16 MinidumpStringAtRVAAsString(const std::string& file_contents, @@ -92,7 +92,7 @@ base::string16 MinidumpStringAtRVAAsString(const std::string& file_contents, //! MinidumpUTF8String. //! //! \return On success, the string read from \a file_writer at offset \a rva. On -//! failure, raises a gtest assertion and returns an empty string. +//! failure, raises a Google Test assertion and returns an empty string. //! //! \sa MinidumpStringAtRVAAsString() std::string MinidumpUTF8StringAtRVAAsString(const std::string& file_contents, diff --git a/minidump/test/minidump_writable_test_util.cc b/minidump/test/minidump_writable_test_util.cc index db07b366..6443c3a5 100644 --- a/minidump/test/minidump_writable_test_util.cc +++ b/minidump/test/minidump_writable_test_util.cc @@ -35,7 +35,7 @@ namespace { //! \param[in] rva The offset within the minidump file of the desired object. //! //! \return If \a rva is within the range of \a file_contents, returns a pointer -//! into \a file_contents at offset \a rva. Otherwise, raises a gtest +//! into \a file_contents at offset \a rva. Otherwise, raises a Google Test //! assertion failure and returns `nullptr`. //! //! Do not call this function. Use the typed version, MinidumpWritableAtRVA<>(), diff --git a/minidump/test/minidump_writable_test_util.h b/minidump/test/minidump_writable_test_util.h index 6c706fba..84c10739 100644 --- a/minidump/test/minidump_writable_test_util.h +++ b/minidump/test/minidump_writable_test_util.h @@ -49,7 +49,7 @@ namespace test { //! //! \return If the size of \a location is agrees with \a expected_size, and if //! \a location is within the range of \a file_contents, returns a pointer -//! into \a file_contents at offset \a rva. Otherwise, raises a gtest +//! into \a file_contents at offset \a rva. Otherwise, raises a Google Test //! assertion failure and returns `nullptr`. //! //! Do not call this function. Use the typed version, @@ -159,7 +159,7 @@ const T* TMinidumpWritableAtLocationDescriptor( //! \return If the size of \a location is at least as big as the size of the //! requested object, and if \a location is within the range of \a //! file_contents, returns a pointer into \a file_contents at offset \a rva. -//! Otherwise, raises a gtest assertion failure and returns `nullptr`. +//! Otherwise, raises a Google Test assertion failure and returns `nullptr`. //! //! \sa MinidumpWritableAtRVA() template @@ -259,8 +259,8 @@ MinidumpWritableAtLocationDescriptor( //! //! \return If \a rva plus the size of an object of type \a T is within the //! range of \a file_contents, returns a pointer into \a file_contents at -//! offset \a rva. Otherwise, raises a gtest assertion failure and returns -//! `nullptr`. +//! offset \a rva. Otherwise, raises a Google Test assertion failure and +//! returns `nullptr`. //! //! \sa MinidumpWritableAtLocationDescriptor<>() template diff --git a/snapshot/BUILD.gn b/snapshot/BUILD.gn index 927158f2..5e8c767d 100644 --- a/snapshot/BUILD.gn +++ b/snapshot/BUILD.gn @@ -428,7 +428,7 @@ source_set("snapshot_test") { "../compat", "../minidump:format", "../test", - "../third_party/gtest:gtest", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../util", ] diff --git a/snapshot/snapshot_test.gyp b/snapshot/snapshot_test.gyp index cf7b8aec..43de7254 100644 --- a/snapshot/snapshot_test.gyp +++ b/snapshot/snapshot_test.gyp @@ -59,9 +59,9 @@ 'snapshot.gyp:crashpad_snapshot', '../client/client.gyp:crashpad_client', '../compat/compat.gyp:crashpad_compat', - '../test/test.gyp:crashpad_gtest_main', + '../test/test.gyp:crashpad_googletest_main', '../test/test.gyp:crashpad_test', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', ], diff --git a/test/BUILD.gn b/test/BUILD.gn index 047c786c..7b052f0a 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -124,7 +124,7 @@ static_library("test") { deps = [ "../compat", - "../third_party/gtest:gtest", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../util", ] @@ -203,8 +203,8 @@ source_set("test_test") { deps = [ ":test", "../compat", - "../third_party/gtest:gmock", - "../third_party/gtest:gtest", + "../third_party/googletest:googlemock", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../util", ] @@ -224,15 +224,15 @@ if (!crashpad_is_ios) { } } -static_library("gmock_main") { +static_library("googlemock_main") { testonly = true sources = [ "gtest_main.cc" ] configs += [ "../build:crashpad_is_in_chromium" ] - defines = [ "CRASHPAD_TEST_LAUNCHER_GMOCK" ] + defines = [ "CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK" ] deps = [ ":test", - "../third_party/gtest:gmock", - "../third_party/gtest:gtest", + "../third_party/googletest:googlemock", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../third_party/mini_chromium:base_test_support", ] @@ -244,14 +244,14 @@ static_library("gmock_main") { } } -static_library("gtest_main") { +static_library("googletest_main") { testonly = true sources = [ "gtest_main.cc" ] configs += [ "../build:crashpad_is_in_chromium" ] - defines = [ "CRASHPAD_TEST_LAUNCHER_GTEST" ] + defines = [ "CRASHPAD_TEST_LAUNCHER_GOOGLETEST" ] deps = [ ":test", - "../third_party/gtest:gtest", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../third_party/mini_chromium:base_test_support", ] diff --git a/test/errors.h b/test/errors.h index cf84ad64..471fbb5f 100644 --- a/test/errors.h +++ b/test/errors.h @@ -24,12 +24,12 @@ namespace test { // These functions format messages in a similar way to the PLOG and PCHECK // family of logging macros in base/logging.h. They exist to interoperate with -// gtest assertions, which don’t interoperate with logging but can be streamed -// to. +// Google Test assertions, which don’t interoperate with logging but can be +// streamed to. // // Where non-test code could do: // PCHECK(rv == 0) << "close"; -// gtest-based test code can do: +// Google Test-based test code can do: // EXPECT_EQ(rv, 0) << ErrnoMessage("close"); //! \brief Formats an error message using an `errno` value. diff --git a/test/file.h b/test/file.h index a9987b4d..918cc391 100644 --- a/test/file.h +++ b/test/file.h @@ -27,7 +27,7 @@ namespace test { //! //! \return `true` if \a path exists. `false` if it does not exist. If an error //! other than “file not found” occurs when searching for \a path, returns -//! `false` with a gtest failure added. +//! `false` with a Google Test failure added. bool FileExists(const base::FilePath& path); //! \brief Determines the size of a file. @@ -36,7 +36,7 @@ bool FileExists(const base::FilePath& path); //! //! \return The size of the file at \a path. If the file does not exist, or an //! error occurs when attempting to determine its size, returns `-1` with a -//! gtest failure added. +//! Google Test failure added. FileOffset FileSize(const base::FilePath& path); } // namespace test diff --git a/test/gtest_death.h b/test/gtest_death.h index f205a2f1..3b9d1f3b 100644 --- a/test/gtest_death.h +++ b/test/gtest_death.h @@ -27,7 +27,7 @@ #if (defined(OS_MACOSX) && !defined(OS_IOS)) || DOXYGEN -//! \brief Wraps the gtest `ASSERT_DEATH_IF_SUPPORTED()` macro to make +//! \brief Wraps the Google Test `ASSERT_DEATH_IF_SUPPORTED()` macro to make //! assertions about death caused by crashes. //! //! On macOS, this macro prevents the system’s crash reporter from handling @@ -35,10 +35,10 @@ //! system’s crash reporter, but it is undesirable for intentional //! ASSERT_DEATH_CRASH() crashes to be handled by any crash reporter. //! -//! `ASSERT_DEATH_IF_SUPPORTED()` is used instead of `ASSERT_DEATH()` to -//! support platforms where death tests are not implemented by gtest (e.g. -//! Fuchsia). On platforms where death tests are not implemented, a warning -//! will be logged and the remainder of the test body skipped. +//! `ASSERT_DEATH_IF_SUPPORTED()` is used instead of `ASSERT_DEATH()` to support +//! platforms where death tests are not implemented by Google Test (e.g. +//! Fuchsia). On platforms where death tests are not implemented, a warning will +//! be logged and the remainder of the test body skipped. //! //! \sa ASSERT_DEATH_CHECK() //! \sa EXPECT_DEATH_CRASH() @@ -50,7 +50,7 @@ { statement; }, regex); \ } while (false) -//! \brief Wraps the gtest `EXPECT_DEATH_IF_SUPPORTED()` macro to make +//! \brief Wraps the Google Test `EXPECT_DEATH_IF_SUPPORTED()` macro to make //! assertions about death caused by crashes. //! //! On macOS, this macro prevents the system’s crash reporter from handling @@ -58,10 +58,10 @@ //! system’s crash reporter, but it is undesirable for intentional //! EXPECT_DEATH_CRASH() crashes to be handled by any crash reporter. //! -//! `EXPECT_DEATH_IF_SUPPORTED()` is used instead of `EXPECT_DEATH()` to -//! support platforms where death tests are not implemented by gtest (e.g. -//! Fuchsia). On platforms where death tests are not implemented, a warning -//! will be logged and the remainder of the test body skipped. +//! `EXPECT_DEATH_IF_SUPPORTED()` is used instead of `EXPECT_DEATH()` to support +//! platforms where death tests are not implemented by Google Test (e.g. +//! Fuchsia). On platforms where death tests are not implemented, a warning will +//! be logged and the remainder of the test body skipped. //! //! \sa EXPECT_DEATH_CHECK() //! \sa ASSERT_DEATH_CRASH() diff --git a/test/gtest_main.cc b/test/gtest_main.cc index 73cdddfa..67cfa0d7 100644 --- a/test/gtest_main.cc +++ b/test/gtest_main.cc @@ -17,9 +17,9 @@ #include "test/main_arguments.h" #include "test/multiprocess_exec.h" -#if defined(CRASHPAD_TEST_LAUNCHER_GMOCK) +#if defined(CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK) #include "gmock/gmock.h" -#endif // CRASHPAD_TEST_LAUNCHER_GMOCK +#endif // CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK #if defined(OS_ANDROID) #include "util/linux/initial_signal_dispositions.h" @@ -77,7 +77,7 @@ int main(int argc, char* argv[]) { #if defined(OS_WIN) // Chromium’s test launcher interferes with WinMultiprocess-based tests. Allow - // their child processes to be launched by the standard gtest-based test + // their child processes to be launched by the standard Google Test-based test // runner. const bool use_chromium_test_launcher = !crashpad::test::WinChildProcess::IsChildProcess(); @@ -99,13 +99,14 @@ int main(int argc, char* argv[]) { #endif // CRASHPAD_IS_IN_CHROMIUM -#if defined(CRASHPAD_TEST_LAUNCHER_GMOCK) +#if defined(CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK) testing::InitGoogleMock(&argc, argv); -#elif defined(CRASHPAD_TEST_LAUNCHER_GTEST) +#elif defined(CRASHPAD_TEST_LAUNCHER_GOOGLETEST) testing::InitGoogleTest(&argc, argv); -#else // CRASHPAD_TEST_LAUNCHER_GMOCK -#error #define CRASHPAD_TEST_LAUNCHER_GTEST or CRASHPAD_TEST_LAUNCHER_GMOCK -#endif // CRASHPAD_TEST_LAUNCHER_GMOCK +#else // CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK +#error #define CRASHPAD_TEST_LAUNCHER_GOOGLETEST or \ + CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK +#endif // CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK #if defined(OS_IOS) // iOS needs to run tests within the context of an app, so call a helper that diff --git a/test/ios/BUILD.gn b/test/ios/BUILD.gn index d548a279..114acd88 100644 --- a/test/ios/BUILD.gn +++ b/test/ios/BUILD.gn @@ -56,7 +56,7 @@ source_set("google_test_setup") { deps = [ ":google_test_runner_shared_headers", "../../build:ios_enable_arc", - "../../third_party/gtest:gtest", + "../../third_party/googletest:googletest", "../../third_party/mini_chromium:base", ] libs = [ "UIKit.framework" ] diff --git a/test/ios/cptest_google_test_runner_delegate.h b/test/ios/cptest_google_test_runner_delegate.h index f88d63de..8be183db 100644 --- a/test/ios/cptest_google_test_runner_delegate.h +++ b/test/ios/cptest_google_test_runner_delegate.h @@ -17,12 +17,12 @@ @protocol CPTestGoogleTestRunnerDelegate -// Returns YES if this delegate supports running GoogleTests via a call to +// Returns YES if this delegate supports running Google Test tests via a call to // |runGoogleTests|. @property(nonatomic, readonly, assign) BOOL supportsRunningGoogleTestsWithXCTest; -// Runs GoogleTests and returns the final exit code. +// Runs Google Test tests and returns the final exit code. - (int)runGoogleTests; @end diff --git a/test/ios/google_test_setup.mm b/test/ios/google_test_setup.mm index 109c4b68..5dfbff54 100644 --- a/test/ios/google_test_setup.mm +++ b/test/ios/google_test_setup.mm @@ -30,8 +30,8 @@ namespace { -// The iOS watchdog timer will kill an app that doesn't spin the main event -// loop often enough. This uses a Gtest TestEventListener to spin the current +// The iOS watchdog timer will kill an app that doesn't spin the main event loop +// often enough. This uses a Google Test TestEventListener to spin the current // loop after each test finishes. However, if any individual test takes too // long, it is still possible that the app will get killed. class IOSRunLoopListener : public testing::EmptyTestEventListener { diff --git a/test/ios/host/Info.plist b/test/ios/host/Info.plist index 8944a2e4..4c62e969 100644 --- a/test/ios/host/Info.plist +++ b/test/ios/host/Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - ${IOS_BUNDLE_ID_PREFIX}.gtest.${EXECUTABLE_NAME:rfc1034identifier} + ${IOS_BUNDLE_ID_PREFIX}.googletest.${EXECUTABLE_NAME:rfc1034identifier} CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/test/mac/exception_swallower.cc b/test/mac/exception_swallower.cc index 946938fb..be530e78 100644 --- a/test/mac/exception_swallower.cc +++ b/test/mac/exception_swallower.cc @@ -117,9 +117,9 @@ ExceptionSwallower::ExceptionSwallower() : exception_swallower_thread_() { if (CheckedGetenv(kServiceEnvironmentVariable)) { // The environment variable is already set, so just proceed with the - // existing service. This normally happens when the gtest “threadsafe” death - // test style is chosen, because the test child process will re-execute code - // already run in the test parent process. See + // existing service. This normally happens when the Google Test “threadsafe” + // death test style is chosen, because the test child process will + // re-execute code already run in the test parent process. See // https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md#death-test-styles. return; } diff --git a/test/mac/mach_errors.h b/test/mac/mach_errors.h index 0afcdadb..19217d11 100644 --- a/test/mac/mach_errors.h +++ b/test/mac/mach_errors.h @@ -23,12 +23,12 @@ namespace crashpad { namespace test { // This function formats messages in a similar way to the Mach error logging -// macros in base/mac/mach_logging.h. It exists to interoperate with gtest +// macros in base/mac/mach_logging.h. It exists to interoperate with Google Test // assertions, which don’t interoperate with logging but can be streamed to. // // Where non-test code could do: // MACH_CHECK(kr == KERN_SUCCESS, kr) << "vm_deallocate"; -// gtest-based test code can do: +// Google Test-based test code can do: // EXPECT_EQ(kr, KERN_SUCCESS) << MachErrorMessage(kr, "vm_deallocate"); //! \brief Formats a Mach error message. diff --git a/test/mac/mach_multiprocess.h b/test/mac/mach_multiprocess.h index 0e3a8c42..8b7063d6 100644 --- a/test/mac/mach_multiprocess.h +++ b/test/mac/mach_multiprocess.h @@ -84,7 +84,7 @@ class MachMultiprocess : public Multiprocess { //! \brief Runs the child side of the test. //! //! This method establishes the child’s environment and calls - //! MachMultiprocessChild(). If any failure (via fatal or nonfatal gtest + //! MachMultiprocessChild(). If any failure (via fatal or nonfatal Google Test //! assertion) is detected, the child will exit with a failure status. //! //! Subclasses must override MachMultiprocessChild() instead of this method. @@ -92,8 +92,8 @@ class MachMultiprocess : public Multiprocess { //! \brief The subclass-provided parent routine. //! - //! Test failures should be reported via gtest: `EXPECT_*()`, `ASSERT_*()`, - //! `FAIL()`, etc. + //! Test failures should be reported via Google Test: `EXPECT_*()`, + //! `ASSERT_*()`, `FAIL()`, etc. //! //! This method must not use a `wait()`-family system call to wait for the //! child process to exit, as this is handled by the superclass. @@ -103,8 +103,8 @@ class MachMultiprocess : public Multiprocess { //! \brief The subclass-provided child routine. //! - //! Test failures should be reported via gtest: `EXPECT_*()`, `ASSERT_*()`, - //! `FAIL()`, etc. + //! Test failures should be reported via Google Test: `EXPECT_*()`, + //! `ASSERT_*()`, `FAIL()`, etc. //! //! Subclasses must implement this method to define how the child operates. virtual void MachMultiprocessChild() = 0; diff --git a/test/multiprocess.h b/test/multiprocess.h index 61df98b5..eb161616 100644 --- a/test/multiprocess.h +++ b/test/multiprocess.h @@ -60,7 +60,7 @@ class Multiprocess { //! \brief The child terminated by signal. //! //! Signal termination happens as a result of a crash, a call to `abort()`, - //! assertion failure (including gtest assertions), etc. + //! assertion failure (including Google Test assertions), etc. kTerminationSignal, #endif // !defined(OS_FUCHSIA) }; @@ -73,12 +73,13 @@ class Multiprocess { //! PreFork(), then calls `fork()`. In the parent process, it calls //! RunParent(), and in the child process, it calls RunChild(). //! - //! This method uses gtest assertions to validate the testing environment. If - //! the testing environment cannot be set up properly, it is possible that - //! MultiprocessParent() or MultiprocessChild() will not be called. In the - //! parent process, this method also waits for the child process to exit after - //! MultiprocessParent() returns, and verifies that it exited in accordance - //! with the expectations set by SetExpectedChildTermination(). + //! This method uses Google Test assertions to validate the testing + //! environment. If the testing environment cannot be set up properly, it is + //! possible that MultiprocessParent() or MultiprocessChild() will not be + //! called. In the parent process, this method also waits for the child + //! process to exit after MultiprocessParent() returns, and verifies that it + //! exited in accordance with the expectations set by + //! SetExpectedChildTermination(). void Run(); //! \brief Sets the expected termination reason and code. @@ -126,7 +127,7 @@ class Multiprocess { //! \endcode //! //! Subclass implementations may signal failure by raising their own fatal - //! gtest assertions. + //! Google Test assertions. virtual void PreFork() #if defined(OS_WIN) || defined(OS_FUCHSIA) = 0 @@ -190,14 +191,14 @@ class Multiprocess { //! //! This method establishes the child’s environment, calls //! MultiprocessChild(), and exits cleanly by calling `_exit(0)`. However, if - //! any failure (via fatal or nonfatal gtest assertion) is detected, the child - //! will exit with a failure status. + //! any failure (via fatal or nonfatal Google Test assertion) is detected, the + //! child will exit with a failure status. void RunChild(); //! \brief The subclass-provided parent routine. //! - //! Test failures should be reported via gtest: `EXPECT_*()`, `ASSERT_*()`, - //! `FAIL()`, etc. + //! Test failures should be reported via Google Test: `EXPECT_*()`, + //! `ASSERT_*()`, `FAIL()`, etc. //! //! This method must not use a `wait()`-family system call to wait for the //! child process to exit, as this is handled by this class. @@ -207,8 +208,8 @@ class Multiprocess { //! \brief The subclass-provided child routine. //! - //! Test failures should be reported via gtest: `EXPECT_*()`, `ASSERT_*()`, - //! `FAIL()`, etc. + //! Test failures should be reported via Google Test: `EXPECT_*()`, + //! `ASSERT_*()`, `FAIL()`, etc. //! //! Subclasses must implement this method to define how the child operates. //! Subclasses may exit with a failure status by using `LOG(FATAL)`, diff --git a/test/multiprocess_exec.h b/test/multiprocess_exec.h index 1168f800..1e17a07a 100644 --- a/test/multiprocess_exec.h +++ b/test/multiprocess_exec.h @@ -111,8 +111,8 @@ class MultiprocessExec : public Multiprocess { //! //! This uses the same launch mechanism as SetChildCommand(), but coordinates //! with test/gtest_main.cc to allow for simple registration of a child - //! processes' entry point via the helper macro, rather than needing to - //! create a separate build target. + //! processes' entry point via the helper macro, rather than needing to create + //! a separate build target. //! //! \param[in] function_name The name of the function as passed to //! CRASHPAD_CHILD_TEST_MAIN(). diff --git a/test/multiprocess_exec_posix.cc b/test/multiprocess_exec_posix.cc index 534013ca..54893ef6 100644 --- a/test/multiprocess_exec_posix.cc +++ b/test/multiprocess_exec_posix.cc @@ -107,7 +107,7 @@ void MultiprocessExec::MultiprocessChild() { ASSERT_EQ(fileno(stdout), STDOUT_FILENO); // Make a copy of the original stdout file descriptor so that in case there’s - // an execv() failure, the original stdout can be restored so that gtest + // an execv() failure, the original stdout can be restored so that Google Test // messages directed to stdout go to the right place. Mark it as // close-on-exec, so that the child won’t see it after a successful exec(), // but it will still be available in this process after an unsuccessful diff --git a/test/multiprocess_exec_test.cc b/test/multiprocess_exec_test.cc index d290efa8..4f5418ad 100644 --- a/test/multiprocess_exec_test.cc +++ b/test/multiprocess_exec_test.cc @@ -35,7 +35,8 @@ class TestMultiprocessExec final : public MultiprocessExec { private: void MultiprocessParent() override { // Use Logging*File() instead of Checked*File() so that the test can fail - // gracefully with a gtest assertion if the child does not execute properly. + // gracefully with a Google Test assertion if the child does not execute + // properly. char c = 'z'; ASSERT_TRUE(LoggingWriteFile(WritePipeHandle(), &c, 1)); diff --git a/test/multiprocess_posix.cc b/test/multiprocess_posix.cc index d2de3184..fac329eb 100644 --- a/test/multiprocess_posix.cc +++ b/test/multiprocess_posix.cc @@ -92,8 +92,8 @@ void Multiprocess::Run() { RunParent(); // Waiting for the child happens here instead of in RunParent() because even - // if RunParent() returns early due to a gtest fatal assertion failure, the - // child should still be reaped. + // if RunParent() returns early due to a Google Test fatal assertion + // failure, the child should still be reaped. // This will make the parent hang up on the child as much as would be // visible from the child’s perspective. The child’s side of the pipe will diff --git a/test/scoped_temp_dir.h b/test/scoped_temp_dir.h index 5e937e75..a6487580 100644 --- a/test/scoped_temp_dir.h +++ b/test/scoped_temp_dir.h @@ -47,7 +47,7 @@ class ScopedTempDir { //! \brief Removes all files and subdirectories at the given \a path, //! including the \a path itself. //! - //! Failures are recorded by gtest expectations. + //! Failures are recorded by Google Test expectations. //! //! \param[in] path The path to delete, along with its contents. This must //! reference a directory. diff --git a/test/test.gyp b/test/test.gyp index d00256a7..aea1675a 100644 --- a/test/test.gyp +++ b/test/test.gyp @@ -22,7 +22,7 @@ 'type': 'static_library', 'dependencies': [ '../compat/compat.gyp:crashpad_compat', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', ], @@ -114,37 +114,37 @@ ], }, { - 'target_name': 'crashpad_gmock_main', + 'target_name': 'crashpad_googlemock_main', 'type': 'static_library', 'dependencies': [ 'crashpad_test', - '../third_party/gtest/gmock.gyp:gmock', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googlemock.gyp:googlemock', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', ], 'include_dirs': [ '..', ], 'defines': [ - 'CRASHPAD_TEST_LAUNCHER_GMOCK=1', + 'CRASHPAD_TEST_LAUNCHER_GOOGLEMOCK=1', ], 'sources': [ 'gtest_main.cc', ], }, { - 'target_name': 'crashpad_gtest_main', + 'target_name': 'crashpad_googletest_main', 'type': 'static_library', 'dependencies': [ 'crashpad_test', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', ], 'include_dirs': [ '..', ], 'defines': [ - 'CRASHPAD_TEST_LAUNCHER_GTEST=1', + 'CRASHPAD_TEST_LAUNCHER_GOOGLETEST=1', ], 'sources': [ 'gtest_main.cc', diff --git a/test/test_test.gyp b/test/test_test.gyp index ddd920e9..59189158 100644 --- a/test/test_test.gyp +++ b/test/test_test.gyp @@ -22,11 +22,11 @@ 'type': 'executable', 'dependencies': [ 'crashpad_test_test_multiprocess_exec_test_child', - 'test.gyp:crashpad_gmock_main', + 'test.gyp:crashpad_googlemock_main', 'test.gyp:crashpad_test', '../compat/compat.gyp:crashpad_compat', - '../third_party/gtest/gmock.gyp:gmock', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googlemock.gyp:googlemock', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/mini_chromium/mini_chromium.gyp:base', '../util/util.gyp:crashpad_util', ], diff --git a/test/win/child_launcher.h b/test/win/child_launcher.h index 854e1247..273933e0 100644 --- a/test/win/child_launcher.h +++ b/test/win/child_launcher.h @@ -25,7 +25,7 @@ namespace crashpad { namespace test { -//! \brief Creates a child process for testing. Uses gtest `ASSERT_*` to +//! \brief Creates a child process for testing. Uses Google Test `ASSERT_*` to //! indicate failure. The child's output is passed through a pipe and is //! available via stdout_read_handle(), and the child's input is attached to //! a second pipe available via stdin_write_handle(). @@ -41,8 +41,8 @@ class ChildLauncher { //! \brief Starts the child process, after which the handle functions below //! will be valid. //! - //! Errors are signaled via gtest assertions. This method may be invoked via - //! `ASSERT_NO_FATAL_FAILURE()` to assert that it succeeds. + //! Errors are signaled via Google Test assertions. This method may be invoked + //! via `ASSERT_NO_FATAL_FAILURE()` to assert that it succeeds. void Start(); //! \brief Waits for the child process to exit. diff --git a/test/win/win_child_process.h b/test/win/win_child_process.h index 626a0e0b..a28da65e 100644 --- a/test/win/win_child_process.h +++ b/test/win/win_child_process.h @@ -63,7 +63,8 @@ class WinChildProcess { //! \brief Launches a child process and returns the Handles for that process. //! The process is guaranteed to be executing by the time this method - //! returns. Returns null and logs a GTest failure in case of failure. + //! returns. Returns `nullptr` and logs a Google Test failure in case of + //! failure. static std::unique_ptr Launch(); protected: diff --git a/test/win/win_multiprocess.h b/test/win/win_multiprocess.h index b9e1564c..d145563e 100644 --- a/test/win/win_multiprocess.h +++ b/test/win/win_multiprocess.h @@ -160,8 +160,8 @@ class WinMultiprocess { //! \brief The subclass-provided parent routine. //! - //! Test failures should be reported via gtest: `EXPECT_*()`, `ASSERT_*()`, - //! `FAIL()`, etc. + //! Test failures should be reported via Google Test: `EXPECT_*()`, + //! `ASSERT_*()`, `FAIL()`, etc. //! //! This method need not use `WaitForSingleObject()`-family call to wait for //! the child process to exit, as this is handled by this class. @@ -185,8 +185,8 @@ class WinMultiprocess { //! \brief The subclass-provided child routine. //! - //! Test failures should be reported via gtest: `EXPECT_*()`, `ASSERT_*()`, - //! `FAIL()`, etc. + //! Test failures should be reported via Google Test: `EXPECT_*()`, + //! `ASSERT_*()`, `FAIL()`, etc. //! //! Subclasses must implement this method to define how the child operates. //! Subclasses may exit with a failure status by using `LOG(FATAL)`, diff --git a/third_party/googletest/BUILD.gn b/third_party/googletest/BUILD.gn new file mode 100644 index 00000000..de2d26a1 --- /dev/null +++ b/third_party/googletest/BUILD.gn @@ -0,0 +1,372 @@ +# Copyright 2017 The Crashpad Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("../../build/crashpad_buildconfig.gni") +import("../../build/test.gni") + +if (crashpad_is_in_chromium) { + group("googletest") { + testonly = true + public_deps = [ "//testing/googletest" ] + } + group("googlemock") { + testonly = true + public_deps = [ "//testing/googlemock" ] + } +} else if (crashpad_is_in_dart || crashpad_is_in_fuchsia) { + group("googletest") { + testonly = true + public_deps = [ "//third_party/googletest:googletest" ] + public_configs = [ "../..:disable_ubsan" ] + } + group("googlemock") { + testonly = true + public_deps = [ "//third_party/googletest:googlemock" ] + } +} else if (crashpad_is_standalone) { + config("googletest_private_config") { + visibility = [ ":*" ] + include_dirs = [ "googletest/googletest" ] + defines = [ "GUNIT_NO_GOOGLE3=1" ] + } + + config("googletest_public_config") { + include_dirs = [ "googletest/googletest/include" ] + } + + static_library("googletest") { + testonly = true + sources = [ + "googletest/googletest/include/gtest/gtest-death-test.h", + "googletest/googletest/include/gtest/gtest-matchers.h", + "googletest/googletest/include/gtest/gtest-message.h", + "googletest/googletest/include/gtest/gtest-param-test.h", + "googletest/googletest/include/gtest/gtest-printers.h", + "googletest/googletest/include/gtest/gtest-spi.h", + "googletest/googletest/include/gtest/gtest-test-part.h", + "googletest/googletest/include/gtest/gtest-typed-test.h", + "googletest/googletest/include/gtest/gtest.h", + "googletest/googletest/include/gtest/gtest_pred_impl.h", + "googletest/googletest/include/gtest/gtest_prod.h", + "googletest/googletest/include/gtest/internal/custom/gtest-port.h", + "googletest/googletest/include/gtest/internal/custom/gtest-printers.h", + "googletest/googletest/include/gtest/internal/custom/gtest.h", + "googletest/googletest/include/gtest/internal/gtest-death-test-internal.h", + "googletest/googletest/include/gtest/internal/gtest-filepath.h", + "googletest/googletest/include/gtest/internal/gtest-internal.h", + "googletest/googletest/include/gtest/internal/gtest-param-util.h", + "googletest/googletest/include/gtest/internal/gtest-port-arch.h", + "googletest/googletest/include/gtest/internal/gtest-port.h", + "googletest/googletest/include/gtest/internal/gtest-string.h", + "googletest/googletest/include/gtest/internal/gtest-type-util.h", + "googletest/googletest/src/gtest-all.cc", + "googletest/googletest/src/gtest-death-test.cc", + "googletest/googletest/src/gtest-filepath.cc", + "googletest/googletest/src/gtest-internal-inl.h", + "googletest/googletest/src/gtest-matchers.cc", + "googletest/googletest/src/gtest-port.cc", + "googletest/googletest/src/gtest-printers.cc", + "googletest/googletest/src/gtest-test-part.cc", + "googletest/googletest/src/gtest-typed-test.cc", + "googletest/googletest/src/gtest.cc", + ] + sources -= [ "googletest/googletest/src/gtest-all.cc" ] + public_configs = [ ":googletest_public_config" ] + configs -= [ + "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", + ] + configs += [ ":googletest_private_config" ] + if (crashpad_is_fuchsia) { + deps = [ "../fuchsia" ] + } + } + + static_library("googletest_main") { + # Tests outside of this file should use ../../test:googletest_main instead. + visibility = [ ":*" ] + + testonly = true + sources = [ "googletest/googletest/src/gtest_main.cc" ] + deps = [ ":googletest" ] + } + + test("gtest_all_test") { + sources = [ + "googletest/googletest/test/googletest-death-test-test.cc", + "googletest/googletest/test/googletest-filepath-test.cc", + "googletest/googletest/test/googletest-message-test.cc", + "googletest/googletest/test/googletest-options-test.cc", + "googletest/googletest/test/googletest-port-test.cc", + "googletest/googletest/test/googletest-printers-test.cc", + "googletest/googletest/test/googletest-test-part-test.cc", + "googletest/googletest/test/gtest-typed-test2_test.cc", + "googletest/googletest/test/gtest-typed-test_test.cc", + "googletest/googletest/test/gtest-typed-test_test.h", + "googletest/googletest/test/gtest_main_unittest.cc", + "googletest/googletest/test/gtest_pred_impl_unittest.cc", + "googletest/googletest/test/gtest_prod_test.cc", + "googletest/googletest/test/gtest_skip_test.cc", + "googletest/googletest/test/gtest_unittest.cc", + "googletest/googletest/test/production.cc", + "googletest/googletest/test/production.h", + ] + configs -= [ + "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", + ] + configs += [ ":googletest_private_config" ] + deps = [ + ":googletest", + ":googletest_main", + ] + + if (crashpad_is_win) { + cflags = [ "/wd4702" ] # unreachable code + } + } + + test("gtest_environment_test") { + sources = [ "googletest/googletest/test/gtest_environment_test.cc" ] + configs += [ ":googletest_private_config" ] + deps = [ ":googletest" ] + } + + test("gtest_listener_test") { + sources = [ "googletest/googletest/test/googletest-listener-test.cc" ] + deps = [ ":googletest" ] + } + + test("gtest_macro_stack_footprint_test") { + sources = [ + "googletest/googletest/test/gtest_test_macro_stack_footprint_test.cc", + ] + deps = [ ":googletest" ] + } + + test("gtest_no_test") { + sources = [ "googletest/googletest/test/gtest_no_test_unittest.cc" ] + deps = [ ":googletest" ] + } + + test("gtest_param_test") { + sources = [ + "googletest/googletest/test/googletest-param-test-test.cc", + "googletest/googletest/test/googletest-param-test-test.h", + "googletest/googletest/test/googletest-param-test2-test.cc", + ] + configs -= [ + "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", + ] + configs += [ ":googletest_private_config" ] + deps = [ ":googletest" ] + + if (crashpad_is_clang) { + cflags_cc = [ + # For googletest/googlemock/test/gmock-matchers_test.cc’s + # Unstreamable::value_. + "-Wno-unused-private-field", + ] + } + } + + test("gtest_premature_exit_test") { + sources = [ "googletest/googletest/test/gtest_premature_exit_test.cc" ] + deps = [ ":googletest" ] + } + + test("gtest_repeat_test") { + sources = [ "googletest/googletest/test/gtest_repeat_test.cc" ] + configs += [ ":googletest_private_config" ] + deps = [ ":googletest" ] + } + + test("gtest_skip_in_environment_setup_test") { + sources = + [ "googletest/googletest/test/gtest_skip_in_environment_setup_test.cc" ] + deps = [ ":googletest" ] + } + + test("gtest_sole_header_test") { + sources = [ "googletest/googletest/test/gtest_sole_header_test.cc" ] + deps = [ + ":googletest", + ":googletest_main", + ] + } + + test("gtest_stress_test") { + sources = [ "googletest/googletest/test/gtest_stress_test.cc" ] + configs += [ ":googletest_private_config" ] + deps = [ ":googletest" ] + } + + test("gtest_unittest_api_test") { + sources = [ "googletest/googletest/test/gtest-unittest-api_test.cc" ] + deps = [ ":googletest" ] + } + + group("googletest_all_tests") { + testonly = true + deps = [ + ":gtest_all_test", + ":gtest_environment_test", + ":gtest_listener_test", + ":gtest_macro_stack_footprint_test", + ":gtest_no_test", + ":gtest_param_test", + ":gtest_premature_exit_test", + ":gtest_repeat_test", + ":gtest_skip_in_environment_setup_test", + ":gtest_sole_header_test", + ":gtest_stress_test", + ":gtest_unittest_api_test", + ] + } + + config("googlemock_private_config") { + visibility = [ ":*" ] + include_dirs = [ "googletest/googlemock" ] + } + + config("googlemock_public_config") { + include_dirs = [ "googletest/googlemock/include" ] + + if (crashpad_is_clang) { + cflags_cc = [ + # The MOCK_METHODn() macros do not specify “override”, which triggers + # this warning in users: “error: 'Method' overrides a member function + # but is not marked 'override' + # [-Werror,-Winconsistent-missing-override]”. Suppress these warnings + # until https://github.com/google/googletest/issues/533 is fixed. + "-Wno-inconsistent-missing-override", + ] + } + } + + static_library("googlemock") { + testonly = true + sources = [ + "googletest/googlemock/include/gmock/gmock-actions.h", + "googletest/googlemock/include/gmock/gmock-cardinalities.h", + "googletest/googlemock/include/gmock/gmock-function-mocker.h", + "googletest/googlemock/include/gmock/gmock-generated-actions.h", + "googletest/googlemock/include/gmock/gmock-matchers.h", + "googletest/googlemock/include/gmock/gmock-more-actions.h", + "googletest/googlemock/include/gmock/gmock-more-matchers.h", + "googletest/googlemock/include/gmock/gmock-nice-strict.h", + "googletest/googlemock/include/gmock/gmock-spec-builders.h", + "googletest/googlemock/include/gmock/gmock.h", + "googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h", + "googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h", + "googletest/googlemock/include/gmock/internal/custom/gmock-port.h", + "googletest/googlemock/include/gmock/internal/gmock-internal-utils.h", + "googletest/googlemock/include/gmock/internal/gmock-port.h", + "googletest/googlemock/include/gmock/internal/gmock-pp.h", + "googletest/googlemock/src/gmock-all.cc", + "googletest/googlemock/src/gmock-cardinalities.cc", + "googletest/googlemock/src/gmock-internal-utils.cc", + "googletest/googlemock/src/gmock-matchers.cc", + "googletest/googlemock/src/gmock-spec-builders.cc", + "googletest/googlemock/src/gmock.cc", + ] + sources -= [ "googletest/googlemock/src/gmock-all.cc" ] + public_configs = [ ":googlemock_public_config" ] + configs -= [ + "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", + ] + configs += [ ":googlemock_private_config" ] + deps = [ ":googletest" ] + } + + static_library("googlemock_main") { + # Tests outside of this file should use ../../test:googlemock_main instead. + visibility = [ ":*" ] + testonly = true + sources = [ "googletest/googlemock/src/gmock_main.cc" ] + deps = [ + ":googlemock", + ":googletest", + ] + } + + test("gmock_all_test") { + sources = [ + "googletest/googlemock/test/gmock-actions_test.cc", + "googletest/googlemock/test/gmock-cardinalities_test.cc", + "googletest/googlemock/test/gmock-function-mocker_test.cc", + "googletest/googlemock/test/gmock-generated-actions_test.cc", + "googletest/googlemock/test/gmock-generated-matchers_test.cc", + "googletest/googlemock/test/gmock-internal-utils_test.cc", + "googletest/googlemock/test/gmock-matchers_test.cc", + "googletest/googlemock/test/gmock-more-actions_test.cc", + "googletest/googlemock/test/gmock-nice-strict_test.cc", + "googletest/googlemock/test/gmock-port_test.cc", + "googletest/googlemock/test/gmock-pp-string_test.cc", + "googletest/googlemock/test/gmock-pp_test.cc", + "googletest/googlemock/test/gmock-spec-builders_test.cc", + "googletest/googlemock/test/gmock_test.cc", + ] + configs += [ + ":googlemock_private_config", + ":googletest_private_config", + ] + deps = [ + ":googlemock", + ":googlemock_main", + ":googletest", + ] + + if (crashpad_is_clang) { + cflags_cc = [ + # For googletest/googlemock/test/gmock-matchers_test.cc’s + # testing::googlemock_matchers_test::Unprintable::c_. + "-Wno-unused-private-field", + ] + } + } + + test("gmock_link_test") { + sources = [ + "googletest/googlemock/test/gmock_link2_test.cc", + "googletest/googlemock/test/gmock_link_test.cc", + "googletest/googlemock/test/gmock_link_test.h", + ] + configs += [ ":googlemock_private_config" ] + deps = [ + ":googlemock", + ":googlemock_main", + ":googletest", + ] + } + + test("gmock_stress_test") { + sources = [ "googletest/googlemock/test/gmock_stress_test.cc" ] + configs -= [ + "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", + ] + configs += [ ":googlemock_private_config" ] + deps = [ + ":googlemock", + ":googletest", + ] + } + + group("googlemock_all_tests") { + testonly = true + deps = [ + ":gmock_all_test", + ":gmock_link_test", + ":gmock_stress_test", + ] + } +} diff --git a/third_party/gtest/README.crashpad b/third_party/googletest/README.crashpad similarity index 79% rename from third_party/gtest/README.crashpad rename to third_party/googletest/README.crashpad index b862eda6..9a6ca6c6 100644 --- a/third_party/gtest/README.crashpad +++ b/third_party/googletest/README.crashpad @@ -1,9 +1,9 @@ -Name: Google Test (googletest) -Short Name: gtest +Name: Google Test +Short Name: googletest URL: https://github.com/google/googletest/ Revision: See DEPS License: BSD 3-clause -License File: gtest/googletest/LICENSE +License File: googletest/googletest/LICENSE Security Critical: no Description: diff --git a/third_party/gtest/gmock.gyp b/third_party/googletest/googlemock.gyp similarity index 50% rename from third_party/gtest/gmock.gyp rename to third_party/googletest/googlemock.gyp index 10c0879a..f49141dc 100644 --- a/third_party/gtest/gmock.gyp +++ b/third_party/googletest/googlemock.gyp @@ -21,17 +21,17 @@ 'variables': { 'conditions': [ ['crashpad_dependencies=="standalone"', { - 'gmock_dir': 'gtest/googlemock', + 'googlemock_dir': 'googletest/googlemock', }], ['crashpad_dependencies=="external"', { - 'gmock_dir': '../../../../gmock', + 'googlemock_dir': '../../../../googlemock', }], ], }, }], ], 'target_defaults': { - # gmock relies heavily on objects with static storage duration. + # Google Mock relies heavily on objects with static storage duration. 'xcode_settings': { 'WARNING_CFLAGS!': [ '-Wexit-time-destructors', @@ -44,47 +44,47 @@ 'targets': [ { - 'target_name': 'gmock', + 'target_name': 'googlemock', 'type': 'static_library', 'dependencies': [ - 'gtest.gyp:gtest', + 'googletest.gyp:googletest', ], 'include_dirs': [ - '<(gmock_dir)', - '<(gmock_dir)/include', + '<(googlemock_dir)', + '<(googlemock_dir)/include', ], 'sources': [ - '<(gmock_dir)/include/gmock/gmock-actions.h', - '<(gmock_dir)/include/gmock/gmock-cardinalities.h', - '<(gmock_dir)/include/gmock/gmock-function-mocker.h', - '<(gmock_dir)/include/gmock/gmock-generated-actions.h', - '<(gmock_dir)/include/gmock/gmock-matchers.h', - '<(gmock_dir)/include/gmock/gmock-more-actions.h', - '<(gmock_dir)/include/gmock/gmock-more-matchers.h', - '<(gmock_dir)/include/gmock/gmock-nice-strict.h', - '<(gmock_dir)/include/gmock/gmock-spec-builders.h', - '<(gmock_dir)/include/gmock/gmock.h', - '<(gmock_dir)/include/gmock/internal/custom/gmock-generated-actions.h', - '<(gmock_dir)/include/gmock/internal/custom/gmock-matchers.h', - '<(gmock_dir)/include/gmock/internal/custom/gmock-port.h', - '<(gmock_dir)/include/gmock/internal/custom/gmock-pp.h', - '<(gmock_dir)/include/gmock/internal/gmock-generated-internal-utils.h', - '<(gmock_dir)/include/gmock/internal/gmock-internal-utils.h', - '<(gmock_dir)/include/gmock/internal/gmock-port.h', - '<(gmock_dir)/src/gmock-all.cc', - '<(gmock_dir)/src/gmock-cardinalities.cc', - '<(gmock_dir)/src/gmock-internal-utils.cc', - '<(gmock_dir)/src/gmock-matchers.cc', - '<(gmock_dir)/src/gmock-spec-builders.cc', - '<(gmock_dir)/src/gmock.cc', + '<(googlemock_dir)/include/gmock/gmock-actions.h', + '<(googlemock_dir)/include/gmock/gmock-cardinalities.h', + '<(googlemock_dir)/include/gmock/gmock-function-mocker.h', + '<(googlemock_dir)/include/gmock/gmock-generated-actions.h', + '<(googlemock_dir)/include/gmock/gmock-matchers.h', + '<(googlemock_dir)/include/gmock/gmock-more-actions.h', + '<(googlemock_dir)/include/gmock/gmock-more-matchers.h', + '<(googlemock_dir)/include/gmock/gmock-nice-strict.h', + '<(googlemock_dir)/include/gmock/gmock-spec-builders.h', + '<(googlemock_dir)/include/gmock/gmock.h', + '<(googlemock_dir)/include/gmock/internal/custom/gmock-generated-actions.h', + '<(googlemock_dir)/include/gmock/internal/custom/gmock-matchers.h', + '<(googlemock_dir)/include/gmock/internal/custom/gmock-port.h', + '<(googlemock_dir)/include/gmock/internal/custom/gmock-pp.h', + '<(googlemock_dir)/include/gmock/internal/gmock-generated-internal-utils.h', + '<(googlemock_dir)/include/gmock/internal/gmock-internal-utils.h', + '<(googlemock_dir)/include/gmock/internal/gmock-port.h', + '<(googlemock_dir)/src/gmock-all.cc', + '<(googlemock_dir)/src/gmock-cardinalities.cc', + '<(googlemock_dir)/src/gmock-internal-utils.cc', + '<(googlemock_dir)/src/gmock-matchers.cc', + '<(googlemock_dir)/src/gmock-spec-builders.cc', + '<(googlemock_dir)/src/gmock.cc', ], 'sources!': [ - '<(gmock_dir)/src/gmock-all.cc', + '<(googlemock_dir)/src/gmock-all.cc', ], 'direct_dependent_settings': { 'include_dirs': [ - '<(gmock_dir)/include', + '<(googlemock_dir)/include', ], 'conditions': [ ['clang!=0', { @@ -112,66 +112,66 @@ ], }, 'export_dependent_settings': [ - 'gtest.gyp:gtest', + 'googletest.gyp:googletest', ], }, { - 'target_name': 'gmock_main', + 'target_name': 'googlemock_main', 'type': 'static_library', 'dependencies': [ - 'gmock', - 'gtest.gyp:gtest', + 'googlemock', + 'googletest.gyp:googletest', ], 'sources': [ - '<(gmock_dir)/src/gmock_main.cc', + '<(googlemock_dir)/src/gmock_main.cc', ], }, { - 'target_name': 'gmock_test_executable', + 'target_name': 'googlemock_test_executable', 'type': 'none', 'dependencies': [ - 'gmock', - 'gtest.gyp:gtest', + 'googlemock', + 'googletest.gyp:googletest', ], 'direct_dependent_settings': { 'type': 'executable', 'include_dirs': [ - '<(gmock_dir)', + '<(googlemock_dir)', ], }, 'export_dependent_settings': [ - 'gmock', - 'gtest.gyp:gtest', + 'googlemock', + 'googletest.gyp:googletest', ], }, { 'target_name': 'gmock_all_test', 'dependencies': [ - 'gmock_test_executable', - 'gmock_main', + 'googlemock_test_executable', + 'googlemock_main', ], 'include_dirs': [ - 'gtest/googletest', + 'googletest/googletest', ], 'sources': [ - '<(gmock_dir)/test/gmock-actions_test.cc', - '<(gmock_dir)/test/gmock-cardinalities_test.cc', - '<(gmock_dir)/test/gmock-function-mocker_test.cc', - '<(gmock_dir)/test/gmock-generated-actions_test.cc', - '<(gmock_dir)/test/gmock-generated-matchers_test.cc', - '<(gmock_dir)/test/gmock-internal-utils_test.cc', - '<(gmock_dir)/test/gmock-matchers_test.cc', - '<(gmock_dir)/test/gmock-more-actions_test.cc', - '<(gmock_dir)/test/gmock-nice-strict_test.cc', - '<(gmock_dir)/test/gmock-port_test.cc', - '<(gmock_dir)/test/gmock-pp-string_test.cc', - '<(gmock_dir)/test/gmock-pp_test.cc', - '<(gmock_dir)/test/gmock-spec-builders_test.cc', - '<(gmock_dir)/test/gmock_test.cc', + '<(googlemock_dir)/test/gmock-actions_test.cc', + '<(googlemock_dir)/test/gmock-cardinalities_test.cc', + '<(googlemock_dir)/test/gmock-function-mocker_test.cc', + '<(googlemock_dir)/test/gmock-generated-actions_test.cc', + '<(googlemock_dir)/test/gmock-generated-matchers_test.cc', + '<(googlemock_dir)/test/gmock-internal-utils_test.cc', + '<(googlemock_dir)/test/gmock-matchers_test.cc', + '<(googlemock_dir)/test/gmock-more-actions_test.cc', + '<(googlemock_dir)/test/gmock-nice-strict_test.cc', + '<(googlemock_dir)/test/gmock-port_test.cc', + '<(googlemock_dir)/test/gmock-pp-string_test.cc', + '<(googlemock_dir)/test/gmock-pp_test.cc', + '<(googlemock_dir)/test/gmock-spec-builders_test.cc', + '<(googlemock_dir)/test/gmock_test.cc', ], 'conditions': [ ['clang!=0', { - # For gtest/googlemock/test/gmock-matchers_test.cc’s + # For googletest/googlemock/test/gmock-matchers_test.cc’s # Unstreamable::value_. 'conditions': [ ['OS=="mac"', { @@ -193,26 +193,26 @@ { 'target_name': 'gmock_link_test', 'dependencies': [ - 'gmock_test_executable', - 'gmock_main', + 'googlemock_test_executable', + 'googlemock_main', ], 'sources': [ - '<(gmock_dir)/test/gmock_link_test.cc', - '<(gmock_dir)/test/gmock_link_test.h', - '<(gmock_dir)/test/gmock_link2_test.cc', + '<(googlemock_dir)/test/gmock_link_test.cc', + '<(googlemock_dir)/test/gmock_link_test.h', + '<(googlemock_dir)/test/gmock_link2_test.cc', ], }, { 'target_name': 'gmock_stress_test', 'dependencies': [ - 'gmock_test_executable', + 'googlemock_test_executable', ], 'sources': [ - '<(gmock_dir)/test/gmock_stress_test.cc', + '<(googlemock_dir)/test/gmock_stress_test.cc', ], }, { - 'target_name': 'gmock_all_tests', + 'target_name': 'googlemock_all_tests', 'type': 'none', 'dependencies': [ 'gmock_all_test', diff --git a/third_party/googletest/googletest.gyp b/third_party/googletest/googletest.gyp new file mode 100644 index 00000000..dc4f6612 --- /dev/null +++ b/third_party/googletest/googletest.gyp @@ -0,0 +1,323 @@ +# Copyright 2014 The Crashpad Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{ + 'includes': [ + '../../build/crashpad_dependencies.gypi', + ], + 'conditions': [ + ['1==1', { # Defer processing until crashpad_dependencies is set + 'variables': { + 'conditions': [ + ['crashpad_dependencies=="standalone"', { + 'googletest_dir': 'googletest/googletest', + }], + ['crashpad_dependencies=="external"', { + 'googletest_dir': '../../../../googletest', + }], + ], + }, + }], + ], + 'target_defaults': { + # googletest relies heavily on objects with static storage duration. + 'xcode_settings': { + 'WARNING_CFLAGS!': [ + '-Wexit-time-destructors', + ], + }, + 'cflags!': [ + '-Wexit-time-destructors', + ], + + 'conditions': [ + ['OS=="android" and android_api_level!="" and android_api_level<24', { + 'defines!': [ + # Although many system interfaces are available to 32-bit code with + # 64-bit off_t at API 21, the routines in are not until API + # 24. googletest doesn’t make use of these functions directly, but can + # reach them indirectly via the C++ standard library. Disable 64-bit + # off_t prior to API 24 so that these uses can work. Since nothing + # dependent on the size of off_t should escape googletest’s own API, this + # should be safe even in a program that otherwise uses a 64-bit off_t. + '_FILE_OFFSET_BITS=64', + ], + }], + ], + }, + + 'targets': [ + { + 'target_name': 'googletest', + 'type': 'static_library', + 'include_dirs': [ + '<(googletest_dir)', + '<(googletest_dir)/include', + ], + 'sources': [ + '<(googletest_dir)/include/gtest/gtest-death-test.h', + '<(googletest_dir)/include/gtest/gtest-matchers.h', + '<(googletest_dir)/include/gtest/gtest-message.h', + '<(googletest_dir)/include/gtest/gtest-param-test.h', + '<(googletest_dir)/include/gtest/gtest-printers.h', + '<(googletest_dir)/include/gtest/gtest-spi.h', + '<(googletest_dir)/include/gtest/gtest-test-part.h', + '<(googletest_dir)/include/gtest/gtest-typed-test.h', + '<(googletest_dir)/include/gtest/gtest.h', + '<(googletest_dir)/include/gtest/gtest_pred_impl.h', + '<(googletest_dir)/include/gtest/gtest_prod.h', + '<(googletest_dir)/include/gtest/internal/custom/gtest-port.h', + '<(googletest_dir)/include/gtest/internal/custom/gtest-printers.h', + '<(googletest_dir)/include/gtest/internal/custom/gtest.h', + '<(googletest_dir)/include/gtest/internal/gtest-death-test-internal.h', + '<(googletest_dir)/include/gtest/internal/gtest-filepath.h', + '<(googletest_dir)/include/gtest/internal/gtest-internal.h', + '<(googletest_dir)/include/gtest/internal/gtest-param-util-generated.h', + '<(googletest_dir)/include/gtest/internal/gtest-param-util.h', + '<(googletest_dir)/include/gtest/internal/gtest-port-arch.h', + '<(googletest_dir)/include/gtest/internal/gtest-port.h', + '<(googletest_dir)/include/gtest/internal/gtest-string.h', + '<(googletest_dir)/include/gtest/internal/gtest-type-util.h', + '<(googletest_dir)/src/gtest-all.cc', + '<(googletest_dir)/src/gtest-death-test.cc', + '<(googletest_dir)/src/gtest-filepath.cc', + '<(googletest_dir)/src/gtest-internal-inl.h', + '<(googletest_dir)/src/gtest-matchers.cc', + '<(googletest_dir)/src/gtest-port.cc', + '<(googletest_dir)/src/gtest-printers.cc', + '<(googletest_dir)/src/gtest-test-part.cc', + '<(googletest_dir)/src/gtest-typed-test.cc', + '<(googletest_dir)/src/gtest.cc', + ], + 'sources!': [ + '<(googletest_dir)/src/gtest-all.cc', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '<(googletest_dir)/include', + ], + }, + 'conditions': [ + ['crashpad_dependencies=="external"', { + 'include_dirs': [ + '<(googletest_dir)/../..', + ], + 'defines': [ + 'GUNIT_NO_GOOGLE3=1', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '<(googletest_dir)/../..', + ], + 'defines': [ + 'GUNIT_NO_GOOGLE3=1', + ], + }, + }], + ], + }, + { + 'target_name': 'googletest_main', + 'type': 'static_library', + 'dependencies': [ + 'googletest', + ], + 'sources': [ + '<(googletest_dir)/src/gtest_main.cc', + ], + }, + { + 'target_name': 'googletest_test_executable', + 'type': 'none', + 'dependencies': [ + 'googletest', + ], + 'direct_dependent_settings': { + 'type': 'executable', + 'include_dirs': [ + '<(googletest_dir)', + ], + }, + 'export_dependent_settings': [ + 'googletest', + ], + }, + { + 'target_name': 'gtest_all_test', + 'dependencies': [ + 'googletest_test_executable', + 'googletest_main', + ], + 'sources': [ + '<(googletest_dir)/test/googletest-death-test-test.cc', + '<(googletest_dir)/test/googletest-filepath-test.cc', + '<(googletest_dir)/test/googletest-message-test.cc', + '<(googletest_dir)/test/googletest-options-test.cc', + '<(googletest_dir)/test/googletest-port-test.cc', + '<(googletest_dir)/test/googletest-printers-testcc', + '<(googletest_dir)/test/googletest-test-part-test.cc', + '<(googletest_dir)/test/gtest-typed-test2_test.cc', + '<(googletest_dir)/test/gtest-typed-test_test.cc', + '<(googletest_dir)/test/gtest-typed-test_test.h', + '<(googletest_dir)/test/gtest_main_unittest.cc', + '<(googletest_dir)/test/gtest_pred_impl_unittest.cc', + '<(googletest_dir)/test/gtest_prod_test.cc', + '<(googletest_dir)/test/gtest_skip_test.cc', + '<(googletest_dir)/test/gtest_unittest.cc', + '<(googletest_dir)/test/production.cc', + '<(googletest_dir)/test/production.h', + ], + }, + { + 'target_name': 'gtest_environment_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/gtest_environment_test.cc', + ], + }, + { + 'target_name': 'gtest_listener_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/googletest-listener-test.cc', + ], + }, + { + 'target_name': 'gtest_macro_stack_footprint_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/gtest_test_macro_stack_footprint_test.cc', + ], + }, + { + 'target_name': 'gtest_no_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/gtest_no_test_unittest.cc', + ], + }, + { + 'target_name': 'gtest_param_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/googletest-param-test-test.cc', + '<(googletest_dir)/test/googletest-param-test-test.h', + '<(googletest_dir)/test/googletest-param-test2-test.cc', + ], + 'conditions': [ + ['clang!=0', { + # For googletest/googlemock/test/gmock-matchers_test.cc’s + # Unstreamable::value_. + 'conditions': [ + ['OS=="mac"', { + 'xcode_settings': { + 'WARNING_CFLAGS': [ + '-Wno-unused-private-field', + ], + }, + }], + ['OS=="linux" or OS=="android"', { + 'cflags': [ + '-Wno-unused-private-field', + ], + }], + ], + }], + ], + }, + { + 'target_name': 'gtest_premature_exit_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/gtest_premature_exit_test.cc', + ], + }, + { + 'target_name': 'gtest_repeat_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/gtest_repeat_test.cc', + ], + }, + { + 'target_name': 'gtest_skip_in_environment_setup_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/gtest_skip_in_environment_setup_test.cc', + ], + }, + { + 'target_name': 'gtest_sole_header_test', + 'dependencies': [ + 'googletest_test_executable', + 'googletest_main', + ], + 'sources': [ + '<(googletest_dir)/test/gtest_sole_header_test.cc', + ], + }, + { + 'target_name': 'gtest_stress_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/gtest_stress_test.cc', + ], + }, + { + 'target_name': 'gtest_unittest_api_test', + 'dependencies': [ + 'googletest_test_executable', + ], + 'sources': [ + '<(googletest_dir)/test/gtest-unittest-api_test.cc', + ], + }, + { + 'target_name': 'googletest_all_tests', + 'type': 'none', + 'dependencies': [ + 'gtest_all_test', + 'gtest_environment_test', + 'gtest_listener_test', + 'gtest_macro_stack_footprint_test', + 'gtest_no_test', + 'gtest_param_test', + 'gtest_premature_exit_test', + 'gtest_repeat_test', + 'gtest_skip_in_environment_setup_test', + 'gtest_sole_header_test', + 'gtest_stress_test', + 'gtest_unittest_api_test', + ], + }, + ], +} diff --git a/third_party/gtest/BUILD.gn b/third_party/gtest/BUILD.gn deleted file mode 100644 index 4764604c..00000000 --- a/third_party/gtest/BUILD.gn +++ /dev/null @@ -1,409 +0,0 @@ -# Copyright 2017 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("../../build/crashpad_buildconfig.gni") -import("../../build/test.gni") - -if (crashpad_is_in_chromium) { - group("gtest") { - testonly = true - public_deps = [ - "//testing/gtest", - ] - } - group("gmock") { - testonly = true - public_deps = [ - "//testing/gmock", - ] - } -} else if (crashpad_is_in_dart || crashpad_is_in_fuchsia) { - group("gtest") { - testonly = true - public_deps = [ - "//third_party/googletest:gtest", - ] - public_configs = [ "../..:disable_ubsan" ] - } - group("gmock") { - testonly = true - public_deps = [ - "//third_party/googletest:gmock", - ] - } -} else if (crashpad_is_standalone) { - config("gtest_private_config") { - visibility = [ ":*" ] - include_dirs = [ "gtest/googletest" ] - defines = [ "GUNIT_NO_GOOGLE3=1" ] - } - - config("gtest_public_config") { - include_dirs = [ "gtest/googletest/include" ] - } - - static_library("gtest") { - testonly = true - sources = [ - "gtest/googletest/include/gtest/gtest-death-test.h", - "gtest/googletest/include/gtest/gtest-matchers.h", - "gtest/googletest/include/gtest/gtest-message.h", - "gtest/googletest/include/gtest/gtest-param-test.h", - "gtest/googletest/include/gtest/gtest-printers.h", - "gtest/googletest/include/gtest/gtest-spi.h", - "gtest/googletest/include/gtest/gtest-test-part.h", - "gtest/googletest/include/gtest/gtest-typed-test.h", - "gtest/googletest/include/gtest/gtest.h", - "gtest/googletest/include/gtest/gtest_pred_impl.h", - "gtest/googletest/include/gtest/gtest_prod.h", - "gtest/googletest/include/gtest/internal/custom/gtest-port.h", - "gtest/googletest/include/gtest/internal/custom/gtest-printers.h", - "gtest/googletest/include/gtest/internal/custom/gtest.h", - "gtest/googletest/include/gtest/internal/gtest-death-test-internal.h", - "gtest/googletest/include/gtest/internal/gtest-filepath.h", - "gtest/googletest/include/gtest/internal/gtest-internal.h", - "gtest/googletest/include/gtest/internal/gtest-param-util.h", - "gtest/googletest/include/gtest/internal/gtest-port-arch.h", - "gtest/googletest/include/gtest/internal/gtest-port.h", - "gtest/googletest/include/gtest/internal/gtest-string.h", - "gtest/googletest/include/gtest/internal/gtest-type-util.h", - "gtest/googletest/src/gtest-all.cc", - "gtest/googletest/src/gtest-death-test.cc", - "gtest/googletest/src/gtest-filepath.cc", - "gtest/googletest/src/gtest-internal-inl.h", - "gtest/googletest/src/gtest-matchers.cc", - "gtest/googletest/src/gtest-port.cc", - "gtest/googletest/src/gtest-printers.cc", - "gtest/googletest/src/gtest-test-part.cc", - "gtest/googletest/src/gtest-typed-test.cc", - "gtest/googletest/src/gtest.cc", - ] - sources -= [ "gtest/googletest/src/gtest-all.cc" ] - public_configs = [ ":gtest_public_config" ] - configs -= [ - "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", - ] - configs += [ ":gtest_private_config" ] - if (crashpad_is_fuchsia) { - deps = [ - "../fuchsia", - ] - } - } - - static_library("gtest_main") { - # Tests outside of this file should use ../../test:gtest_main instead. - visibility = [ ":*" ] - - testonly = true - sources = [ - "gtest/googletest/src/gtest_main.cc", - ] - deps = [ - ":gtest", - ] - } - - test("gtest_all_test") { - sources = [ - "gtest/googletest/test/googletest-death-test-test.cc", - "gtest/googletest/test/googletest-filepath-test.cc", - "gtest/googletest/test/googletest-message-test.cc", - "gtest/googletest/test/googletest-options-test.cc", - "gtest/googletest/test/googletest-port-test.cc", - "gtest/googletest/test/googletest-printers-test.cc", - "gtest/googletest/test/googletest-test-part-test.cc", - "gtest/googletest/test/gtest-typed-test2_test.cc", - "gtest/googletest/test/gtest-typed-test_test.cc", - "gtest/googletest/test/gtest-typed-test_test.h", - "gtest/googletest/test/gtest_main_unittest.cc", - "gtest/googletest/test/gtest_pred_impl_unittest.cc", - "gtest/googletest/test/gtest_prod_test.cc", - "gtest/googletest/test/gtest_skip_test.cc", - "gtest/googletest/test/gtest_unittest.cc", - "gtest/googletest/test/production.cc", - "gtest/googletest/test/production.h", - ] - configs -= [ - "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", - ] - configs += [ ":gtest_private_config" ] - deps = [ - ":gtest", - ":gtest_main", - ] - - if (crashpad_is_win) { - cflags = [ "/wd4702" ] # unreachable code - } - } - - test("gtest_environment_test") { - sources = [ - "gtest/googletest/test/gtest_environment_test.cc", - ] - configs += [ ":gtest_private_config" ] - deps = [ - ":gtest", - ] - } - - test("gtest_listener_test") { - sources = [ - "gtest/googletest/test/googletest-listener-test.cc", - ] - deps = [ - ":gtest", - ] - } - - test("gtest_no_test") { - sources = [ - "gtest/googletest/test/gtest_no_test_unittest.cc", - ] - deps = [ - ":gtest", - ] - } - - test("gtest_param_test") { - sources = [ - "gtest/googletest/test/googletest-param-test-test.cc", - "gtest/googletest/test/googletest-param-test-test.h", - "gtest/googletest/test/googletest-param-test2-test.cc", - ] - configs -= [ - "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", - ] - configs += [ ":gtest_private_config" ] - deps = [ - ":gtest", - ] - - if (crashpad_is_clang) { - cflags_cc = [ - # For gtest/googlemock/test/gmock-matchers_test.cc’s - # Unstreamable::value_. - "-Wno-unused-private-field", - ] - } - } - - test("gtest_premature_exit_test") { - sources = [ - "gtest/googletest/test/gtest_premature_exit_test.cc", - ] - deps = [ - ":gtest", - ] - } - - test("gtest_repeat_test") { - sources = [ - "gtest/googletest/test/gtest_repeat_test.cc", - ] - configs += [ ":gtest_private_config" ] - deps = [ - ":gtest", - ] - } - - test("gtest_sole_header_test") { - sources = [ - "gtest/googletest/test/gtest_sole_header_test.cc", - ] - deps = [ - ":gtest", - ":gtest_main", - ] - } - - test("gtest_stress_test") { - sources = [ - "gtest/googletest/test/gtest_stress_test.cc", - ] - configs += [ ":gtest_private_config" ] - deps = [ - ":gtest", - ] - } - - test("gtest_unittest_api_test") { - sources = [ - "gtest/googletest/test/gtest-unittest-api_test.cc", - ] - deps = [ - ":gtest", - ] - } - - group("gtest_all_tests") { - testonly = true - deps = [ - ":gtest_all_test", - ":gtest_environment_test", - ":gtest_listener_test", - ":gtest_no_test", - ":gtest_param_test", - ":gtest_premature_exit_test", - ":gtest_repeat_test", - ":gtest_sole_header_test", - ":gtest_stress_test", - ":gtest_unittest_api_test", - ] - } - - config("gmock_private_config") { - visibility = [ ":*" ] - include_dirs = [ "gtest/googlemock" ] - } - - config("gmock_public_config") { - include_dirs = [ "gtest/googlemock/include" ] - - if (crashpad_is_clang) { - cflags_cc = [ - # The MOCK_METHODn() macros do not specify “override”, which triggers - # this warning in users: “error: 'Method' overrides a member function - # but is not marked 'override' - # [-Werror,-Winconsistent-missing-override]”. Suppress these warnings - # until https://github.com/google/googletest/issues/533 is fixed. - "-Wno-inconsistent-missing-override", - ] - } - } - - static_library("gmock") { - testonly = true - sources = [ - "gtest/googlemock/include/gmock/gmock-actions.h", - "gtest/googlemock/include/gmock/gmock-cardinalities.h", - "gtest/googlemock/include/gmock/gmock-function-mocker.h", - "gtest/googlemock/include/gmock/gmock-generated-actions.h", - "gtest/googlemock/include/gmock/gmock-matchers.h", - "gtest/googlemock/include/gmock/gmock-more-actions.h", - "gtest/googlemock/include/gmock/gmock-more-matchers.h", - "gtest/googlemock/include/gmock/gmock-nice-strict.h", - "gtest/googlemock/include/gmock/gmock-spec-builders.h", - "gtest/googlemock/include/gmock/gmock.h", - "gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h", - "gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h", - "gtest/googlemock/include/gmock/internal/custom/gmock-port.h", - "gtest/googlemock/include/gmock/internal/gmock-internal-utils.h", - "gtest/googlemock/include/gmock/internal/gmock-port.h", - "gtest/googlemock/include/gmock/internal/gmock-pp.h", - "gtest/googlemock/src/gmock-all.cc", - "gtest/googlemock/src/gmock-cardinalities.cc", - "gtest/googlemock/src/gmock-internal-utils.cc", - "gtest/googlemock/src/gmock-matchers.cc", - "gtest/googlemock/src/gmock-spec-builders.cc", - "gtest/googlemock/src/gmock.cc", - ] - sources -= [ "gtest/googlemock/src/gmock-all.cc" ] - public_configs = [ ":gmock_public_config" ] - configs -= [ - "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", - ] - configs += [ ":gmock_private_config" ] - deps = [ - ":gtest", - ] - } - - static_library("gmock_main") { - # Tests outside of this file should use ../../test:gmock_main instead. - visibility = [ ":*" ] - testonly = true - sources = [ - "gtest/googlemock/src/gmock_main.cc", - ] - deps = [ - ":gmock", - ":gtest", - ] - } - - test("gmock_all_test") { - sources = [ - "gtest/googlemock/test/gmock-actions_test.cc", - "gtest/googlemock/test/gmock-cardinalities_test.cc", - "gtest/googlemock/test/gmock-function-mocker_test.cc", - "gtest/googlemock/test/gmock-generated-actions_test.cc", - "gtest/googlemock/test/gmock-generated-matchers_test.cc", - "gtest/googlemock/test/gmock-internal-utils_test.cc", - "gtest/googlemock/test/gmock-matchers_test.cc", - "gtest/googlemock/test/gmock-more-actions_test.cc", - "gtest/googlemock/test/gmock-nice-strict_test.cc", - "gtest/googlemock/test/gmock-port_test.cc", - "gtest/googlemock/test/gmock-pp-string_test.cc", - "gtest/googlemock/test/gmock-pp_test.cc", - "gtest/googlemock/test/gmock-spec-builders_test.cc", - "gtest/googlemock/test/gmock_test.cc", - ] - configs += [ - ":gmock_private_config", - ":gtest_private_config", - ] - deps = [ - ":gmock", - ":gmock_main", - ":gtest", - ] - - if (crashpad_is_clang) { - cflags_cc = [ - # For gtest/googlemock/test/gmock-matchers_test.cc’s - # testing::gmock_matchers_test::Unprintable::c_. - "-Wno-unused-private-field", - ] - } - } - - test("gmock_link_test") { - sources = [ - "gtest/googlemock/test/gmock_link2_test.cc", - "gtest/googlemock/test/gmock_link_test.cc", - "gtest/googlemock/test/gmock_link_test.h", - ] - configs += [ ":gmock_private_config" ] - deps = [ - ":gmock", - ":gmock_main", - ":gtest", - ] - } - - test("gmock_stress_test") { - sources = [ - "gtest/googlemock/test/gmock_stress_test.cc", - ] - configs -= [ - "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", - ] - configs += [ ":gmock_private_config" ] - deps = [ - ":gmock", - ":gtest", - ] - } - - group("gmock_all_tests") { - testonly = true - deps = [ - ":gmock_all_test", - ":gmock_link_test", - ":gmock_stress_test", - ] - } -} diff --git a/third_party/gtest/gtest.gyp b/third_party/gtest/gtest.gyp deleted file mode 100644 index aa6399bc..00000000 --- a/third_party/gtest/gtest.gyp +++ /dev/null @@ -1,304 +0,0 @@ -# Copyright 2014 The Crashpad Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'includes': [ - '../../build/crashpad_dependencies.gypi', - ], - 'conditions': [ - ['1==1', { # Defer processing until crashpad_dependencies is set - 'variables': { - 'conditions': [ - ['crashpad_dependencies=="standalone"', { - 'gtest_dir': 'gtest/googletest', - }], - ['crashpad_dependencies=="external"', { - 'gtest_dir': '../../../../gtest', - }], - ], - }, - }], - ], - 'target_defaults': { - # gtest relies heavily on objects with static storage duration. - 'xcode_settings': { - 'WARNING_CFLAGS!': [ - '-Wexit-time-destructors', - ], - }, - 'cflags!': [ - '-Wexit-time-destructors', - ], - - 'conditions': [ - ['OS=="android" and android_api_level!="" and android_api_level<24', { - 'defines!': [ - # Although many system interfaces are available to 32-bit code with - # 64-bit off_t at API 21, the routines in are not until API - # 24. gtest doesn’t make use of these functions directly, but can - # reach them indirectly via the C++ standard library. Disable 64-bit - # off_t prior to API 24 so that these uses can work. Since nothing - # dependent on the size of off_t should escape gtest’s own API, this - # should be safe even in a program that otherwise uses a 64-bit off_t. - '_FILE_OFFSET_BITS=64', - ], - }], - ], - }, - - 'targets': [ - { - 'target_name': 'gtest', - 'type': 'static_library', - 'include_dirs': [ - '<(gtest_dir)', - '<(gtest_dir)/include', - ], - 'sources': [ - '<(gtest_dir)/include/gtest/gtest-death-test.h', - '<(gtest_dir)/include/gtest/gtest-matchers.h', - '<(gtest_dir)/include/gtest/gtest-message.h', - '<(gtest_dir)/include/gtest/gtest-param-test.h', - '<(gtest_dir)/include/gtest/gtest-printers.h', - '<(gtest_dir)/include/gtest/gtest-spi.h', - '<(gtest_dir)/include/gtest/gtest-test-part.h', - '<(gtest_dir)/include/gtest/gtest-typed-test.h', - '<(gtest_dir)/include/gtest/gtest.h', - '<(gtest_dir)/include/gtest/gtest_pred_impl.h', - '<(gtest_dir)/include/gtest/gtest_prod.h', - '<(gtest_dir)/include/gtest/internal/custom/gtest-port.h', - '<(gtest_dir)/include/gtest/internal/custom/gtest-printers.h', - '<(gtest_dir)/include/gtest/internal/custom/gtest.h', - '<(gtest_dir)/include/gtest/internal/gtest-death-test-internal.h', - '<(gtest_dir)/include/gtest/internal/gtest-filepath.h', - '<(gtest_dir)/include/gtest/internal/gtest-internal.h', - '<(gtest_dir)/include/gtest/internal/gtest-param-util-generated.h', - '<(gtest_dir)/include/gtest/internal/gtest-param-util.h', - '<(gtest_dir)/include/gtest/internal/gtest-port-arch.h', - '<(gtest_dir)/include/gtest/internal/gtest-port.h', - '<(gtest_dir)/include/gtest/internal/gtest-string.h', - '<(gtest_dir)/include/gtest/internal/gtest-type-util.h', - '<(gtest_dir)/src/gtest-all.cc', - '<(gtest_dir)/src/gtest-death-test.cc', - '<(gtest_dir)/src/gtest-filepath.cc', - '<(gtest_dir)/src/gtest-internal-inl.h', - '<(gtest_dir)/src/gtest-matchers.cc', - '<(gtest_dir)/src/gtest-port.cc', - '<(gtest_dir)/src/gtest-printers.cc', - '<(gtest_dir)/src/gtest-test-part.cc', - '<(gtest_dir)/src/gtest-typed-test.cc', - '<(gtest_dir)/src/gtest.cc', - ], - 'sources!': [ - '<(gtest_dir)/src/gtest-all.cc', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(gtest_dir)/include', - ], - }, - 'conditions': [ - ['crashpad_dependencies=="external"', { - 'include_dirs': [ - '<(gtest_dir)/../..', - ], - 'defines': [ - 'GUNIT_NO_GOOGLE3=1', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(gtest_dir)/../..', - ], - 'defines': [ - 'GUNIT_NO_GOOGLE3=1', - ], - }, - }], - ], - }, - { - 'target_name': 'gtest_main', - 'type': 'static_library', - 'dependencies': [ - 'gtest', - ], - 'sources': [ - '<(gtest_dir)/src/gtest_main.cc', - ], - }, - { - 'target_name': 'gtest_test_executable', - 'type': 'none', - 'dependencies': [ - 'gtest', - ], - 'direct_dependent_settings': { - 'type': 'executable', - 'include_dirs': [ - '<(gtest_dir)', - ], - }, - 'export_dependent_settings': [ - 'gtest', - ], - }, - { - 'target_name': 'gtest_all_test', - 'dependencies': [ - 'gtest_test_executable', - 'gtest_main', - ], - 'sources': [ - '<(gtest_dir)/test/gtest-death-test_test.cc', - '<(gtest_dir)/test/gtest-filepath_test.cc', - '<(gtest_dir)/test/gtest-linked_ptr_test.cc', - '<(gtest_dir)/test/gtest-message_test.cc', - '<(gtest_dir)/test/gtest-options_test.cc', - '<(gtest_dir)/test/gtest-port_test.cc', - '<(gtest_dir)/test/gtest-printers_test.cc', - '<(gtest_dir)/test/gtest-test-part_test.cc', - '<(gtest_dir)/test/gtest-typed-test2_test.cc', - '<(gtest_dir)/test/gtest-typed-test_test.cc', - '<(gtest_dir)/test/gtest-typed-test_test.h', - '<(gtest_dir)/test/gtest_main_unittest.cc', - '<(gtest_dir)/test/gtest_pred_impl_unittest.cc', - '<(gtest_dir)/test/gtest_prod_test.cc', - '<(gtest_dir)/test/gtest_skip_test.cc', - '<(gtest_dir)/test/gtest_unittest.cc', - '<(gtest_dir)/test/production.cc', - '<(gtest_dir)/test/production.h', - ], - }, - { - 'target_name': 'gtest_environment_test', - 'dependencies': [ - 'gtest_test_executable', - ], - 'sources': [ - '<(gtest_dir)/test/gtest_environment_test.cc', - ], - }, - { - 'target_name': 'gtest_listener_test', - 'dependencies': [ - 'gtest_test_executable', - ], - 'sources': [ - '<(gtest_dir)/test/gtest-listener_test.cc', - ], - }, - { - 'target_name': 'gtest_no_test', - 'dependencies': [ - 'gtest_test_executable', - ], - 'sources': [ - '<(gtest_dir)/test/gtest_no_test_unittest.cc', - ], - }, - { - 'target_name': 'gtest_param_test', - 'dependencies': [ - 'gtest_test_executable', - ], - 'sources': [ - '<(gtest_dir)/test/gtest-param-test2_test.cc', - '<(gtest_dir)/test/gtest-param-test_test.cc', - '<(gtest_dir)/test/gtest-param-test_test.h', - ], - 'conditions': [ - ['clang!=0', { - # For gtest/googlemock/test/gmock-matchers_test.cc’s - # Unstreamable::value_. - 'conditions': [ - ['OS=="mac"', { - 'xcode_settings': { - 'WARNING_CFLAGS': [ - '-Wno-unused-private-field', - ], - }, - }], - ['OS=="linux" or OS=="android"', { - 'cflags': [ - '-Wno-unused-private-field', - ], - }], - ], - }], - ], - }, - { - 'target_name': 'gtest_premature_exit_test', - 'dependencies': [ - 'gtest_test_executable', - ], - 'sources': [ - '<(gtest_dir)/test/gtest_premature_exit_test.cc', - ], - }, - { - 'target_name': 'gtest_repeat_test', - 'dependencies': [ - 'gtest_test_executable', - ], - 'sources': [ - '<(gtest_dir)/test/gtest_repeat_test.cc', - ], - }, - { - 'target_name': 'gtest_sole_header_test', - 'dependencies': [ - 'gtest_test_executable', - 'gtest_main', - ], - 'sources': [ - '<(gtest_dir)/test/gtest_sole_header_test.cc', - ], - }, - { - 'target_name': 'gtest_stress_test', - 'dependencies': [ - 'gtest_test_executable', - ], - 'sources': [ - '<(gtest_dir)/test/gtest_stress_test.cc', - ], - }, - { - 'target_name': 'gtest_unittest_api_test', - 'dependencies': [ - 'gtest_test_executable', - ], - 'sources': [ - '<(gtest_dir)/test/gtest-unittest-api_test.cc', - ], - }, - { - 'target_name': 'gtest_all_tests', - 'type': 'none', - 'dependencies': [ - 'gtest_all_test', - 'gtest_environment_test', - 'gtest_listener_test', - 'gtest_no_test', - 'gtest_param_test', - 'gtest_premature_exit_test', - 'gtest_repeat_test', - 'gtest_sole_header_test', - 'gtest_stress_test', - 'gtest_unittest_api_test', - ], - }, - ], -} diff --git a/util/BUILD.gn b/util/BUILD.gn index f3ffedd1..21f70048 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -85,7 +85,7 @@ if (crashpad_is_mac || crashpad_is_ios) { # relative… args += [ "--sdk", - rebase_path(sysroot, root_build_dir) + rebase_path(sysroot, root_build_dir), ] } else { # …but that’s not an option in the standalone Crashpad build, where the @@ -808,8 +808,8 @@ source_set("util_test") { "../client", "../compat", "../test", - "../third_party/gtest:gmock", - "../third_party/gtest:gtest", + "../third_party/googletest:googlemock", + "../third_party/googletest:googletest", "../third_party/mini_chromium:base", "../third_party/zlib", ] diff --git a/util/mac/mac_util_test.mm b/util/mac/mac_util_test.mm index 3db871ed..546c6286 100644 --- a/util/mac/mac_util_test.mm +++ b/util/mac/mac_util_test.mm @@ -40,8 +40,8 @@ namespace { // Runs /usr/bin/sw_vers with a single argument, |argument|, and places the // command’s standard output into |output| after stripping the trailing newline. -// Fatal gtest assertions report tool failures, which the caller should check -// for with ASSERT_NO_FATAL_FAILURE() or testing::Test::HasFatalFailure(). +// Fatal Google Test assertions report tool failures, which the caller should +// check for with ASSERT_NO_FATAL_FAILURE() or testing::Test::HasFatalFailure(). void SwVers(NSString* argument, std::string* output) { @autoreleasepool { base::scoped_nsobject pipe([[NSPipe alloc] init]); diff --git a/util/mach/exc_server_variants_test.cc b/util/mach/exc_server_variants_test.cc index bea3d767..553661e3 100644 --- a/util/mach/exc_server_variants_test.cc +++ b/util/mach/exc_server_variants_test.cc @@ -475,8 +475,8 @@ class MockUniversalMachExcServer : public UniversalMachExcServer::Interface { // UniversalMachExcServer::Interface: // CatchMachException is the method to mock, but it has 13 parameters, and - // gmock can only mock methods with up to 10 parameters. Coalesce some related - // parameters together into structs, and call a mocked method. + // Google Mock can only mock methods with up to 10 parameters. Coalesce some + // related parameters together into structs, and call a mocked method. virtual kern_return_t CatchMachException( exception_behavior_t behavior, exception_handler_t exception_port, diff --git a/util/mach/exception_ports_test.cc b/util/mach/exception_ports_test.cc index f20be56c..c72dec91 100644 --- a/util/mach/exception_ports_test.cc +++ b/util/mach/exception_ports_test.cc @@ -53,7 +53,7 @@ namespace { // mask, EXC_MASK_ALL | EXC_MASK_CRASH. The EXC_MASK_CRASH handler’s existence // and properties from this second lookup are validated in the same way. // -// This function uses gtest EXPECT_* and ASSERT_* macros to perform its +// This function uses Google Test EXPECT_* and ASSERT_* macros to perform its // validation. void TestGetExceptionPorts(const ExceptionPorts& exception_ports, mach_port_t expect_port, diff --git a/util/mach/notify_server_test.cc b/util/mach/notify_server_test.cc index d334e571..5e05c6d0 100644 --- a/util/mach/notify_server_test.cc +++ b/util/mach/notify_server_test.cc @@ -46,7 +46,7 @@ using testing::WithArg; //! \param[in] receive_right The receive right to add a send right to. //! //! \return The send right, which will have the same name as the receive right. -//! On failure, `MACH_PORT_NULL` with a gtest failure added. +//! On failure, `MACH_PORT_NULL` with a Google Test failure added. mach_port_t SendRightFromReceiveRight(mach_port_t receive_right) { kern_return_t kr = mach_port_insert_right( mach_task_self(), receive_right, receive_right, MACH_MSG_TYPE_MAKE_SEND); @@ -63,7 +63,7 @@ mach_port_t SendRightFromReceiveRight(mach_port_t receive_right) { //! //! \param[in] receive_right The receive right to make a send-once right from. //! -//! \return The send-once right. On failure, `MACH_PORT_NULL` with a gtest +//! \return The send-once right. On failure, `MACH_PORT_NULL` with a Google Test //! failure added. mach_port_t SendOnceRightFromReceiveRight(mach_port_t receive_right) { mach_port_t send_once_right; @@ -89,9 +89,9 @@ mach_port_t SendOnceRightFromReceiveRight(mach_port_t receive_right) { //! //! This function exists to adapt `mach_port_deallocate()` to a function that //! accepts a single argument and has no return value. It can be used with the -//! testing::Invoke() gmock action. +//! testing::Invoke() Google Mock action. //! -//! On failure, a gtest failure will be added. +//! On failure, a Google Test failure will be added. void MachPortDeallocate(mach_port_t port) { kern_return_t kr = mach_port_deallocate(mach_task_self(), port); EXPECT_EQ(kr, KERN_SUCCESS) << MachErrorMessage(kr, "mach_port_deallocate"); @@ -103,7 +103,7 @@ void MachPortDeallocate(mach_port_t port) { //! \param[in] right The right to check for. //! //! \return `true` if \a port has \a right, `false` otherwise. On faliure, -//! `false` with a gtest failure added. +//! `false` with a Google Test failure added. bool IsRight(mach_port_t port, mach_port_type_t right) { mach_port_type_t type; kern_return_t kr = mach_port_type(mach_task_self(), port, &type); @@ -118,12 +118,12 @@ bool IsRight(mach_port_t port, mach_port_type_t right) { //! \brief Determines whether a receive right is held for a Mach port. //! //! This is a special single-argument form of IsRight() for ease of use in a -//! gmock matcher. +//! Google Mock matcher. //! //! \param[in] port The port to check for a receive right. //! //! \return `true` if a receive right is held, `false` otherwise. On faliure, -//! `false` with a gtest failure added. +//! `false` with a Google Test failure added. bool IsReceiveRight(mach_port_t port) { return IsRight(port, MACH_PORT_TYPE_RECEIVE); } @@ -134,7 +134,7 @@ bool IsReceiveRight(mach_port_t port) { //! \param[in] right The port right to return the user reference count for. //! //! \return The user reference count for the specified port and right. On -//! failure, `-1` with a gtest failure added. +//! failure, `-1` with a Google Test failure added. mach_port_urefs_t RightRefCount(mach_port_t port, mach_port_right_t right) { mach_port_urefs_t refs; kern_return_t kr = mach_port_get_refs(mach_task_self(), port, right, &refs); @@ -149,13 +149,13 @@ mach_port_urefs_t RightRefCount(mach_port_t port, mach_port_right_t right) { //! \brief Returns the user reference count for a port’s dead-name rights. //! //! This is a special single-argument form of RightRefCount() for ease of use in -//! a gmock matcher. +//! a Google Mock matcher. //! //! \param[in] port The port whose dead-name user reference count should be //! returned. //! //! \return The user reference count for the port’s dead-name rights. On -//! failure, `-1` with a gtest failure added. +//! failure, `-1` with a Google Test failure added. mach_port_urefs_t DeadNameRightRefCount(mach_port_t port) { return RightRefCount(port, MACH_PORT_RIGHT_DEAD_NAME); } @@ -202,7 +202,8 @@ class NotifyServerTestBase : public testing::Test, //! send-once right made from ServerPort(). Any previous send right for the //! notification will be deallocated. //! - //! \return `true` on success, `false` on failure with a gtest failure added. + //! \return `true` on success, `false` on failure with a Google Test failure + //! added. bool RequestMachPortNotification(mach_port_t name, mach_msg_id_t variant, mach_port_mscount_t sync) { @@ -231,12 +232,12 @@ class NotifyServerTestBase : public testing::Test, //! //! The server will listen on ServerPort() in persistent nonblocking mode, and //! dispatch received messages to the appropriate NotifyServer::Interface - //! method. gmock expectations check that the proper method, if any, is called - //! exactly once, and that no undesired methods are called. + //! method. Google Mock expectations check that the proper method, if any, is + //! called exactly once, and that no undesired methods are called. //! //! MachMessageServer::Run() is expected to return `MACH_RCV_TIMED_OUT`, //! because it runs in persistent nonblocking mode. If it returns anything - //! else, a gtest assertion is added. + //! else, a Google Test assertion is added. void RunServer() { NotifyServer notify_server(this); mach_msg_return_t mr = @@ -257,7 +258,7 @@ class NotifyServerTestBase : public testing::Test, //! //! \return The server port receive right, creating it if one has not yet been //! established for the current test. On failure, returns `MACH_PORT_NULL` - //! with a gtest failure added. + //! with a Google Test failure added. mach_port_t ServerPort() { if (!server_port_.is_valid()) { server_port_.reset(NewMachPort(MACH_PORT_RIGHT_RECEIVE)); diff --git a/util/misc/capture_context_test_util.h b/util/misc/capture_context_test_util.h index 5a5ff7d5..90ec67a8 100644 --- a/util/misc/capture_context_test_util.h +++ b/util/misc/capture_context_test_util.h @@ -24,9 +24,9 @@ namespace test { //! //! If the context structure has fields that tell whether it’s valid, such as //! magic numbers or size fields, sanity-checks those fields for validity with -//! fatal gtest assertions. For other fields, where it’s possible to reason -//! about their validity based solely on their contents, sanity-checks via -//! nonfatal gtest assertions. +//! fatal Google Test assertions. For other fields, where it’s possible to +//! reason about their validity based solely on their contents, sanity-checks +//! via nonfatal Google Test assertions. //! //! \param[in] context The context to check. void SanityCheckContext(const NativeCPUContext& context); diff --git a/util/misc/from_pointer_cast_test.cc b/util/misc/from_pointer_cast_test.cc index ce53de54..9c7f19c3 100644 --- a/util/misc/from_pointer_cast_test.cc +++ b/util/misc/from_pointer_cast_test.cc @@ -93,9 +93,9 @@ struct MatchCV { }; #if defined(COMPILER_MSVC) && _MSC_VER < 1910 -// gtest under MSVS 2015 (MSC 19.0) doesn’t handle EXPECT_EQ(a, b) when a or b -// is a pointer to a volatile type, because it can’t figure out how to print -// them. +// Google Test under MSVS 2015 (MSC 19.0) doesn’t handle EXPECT_EQ(a, b) when a +// or b is a pointer to a volatile type, because it can’t figure out how to +// print them. template typename std::remove_volatile::type>::type* MaybeRemoveVolatile(const T& value) { diff --git a/util/net/http_transport_test.cc b/util/net/http_transport_test.cc index d6a7675f..14d1a80a 100644 --- a/util/net/http_transport_test.cc +++ b/util/net/http_transport_test.cc @@ -99,7 +99,8 @@ class HTTPTransportTestFixture : public MultiprocessExec { private: void MultiprocessParent() override { // Use Logging*File() instead of Checked*File() so that the test can fail - // gracefully with a gtest assertion if the child does not execute properly. + // gracefully with a Google Test assertion if the child does not execute + // properly. // The child will write the HTTP server port number as a packed unsigned // short to stdout. diff --git a/util/posix/process_info_test.cc b/util/posix/process_info_test.cc index 69390fae..94bbb8e3 100644 --- a/util/posix/process_info_test.cc +++ b/util/posix/process_info_test.cc @@ -131,11 +131,11 @@ void TestProcessSelfOrClone(const ProcessInfo& process_info) { // expect_argv always contains the initial view of the arguments at the time // the program was invoked. argv may contain this view, or it may contain the - // current view of arguments after gtest argv processing. argv may be a subset - // of expect_argv. + // current view of arguments after Google Test argv processing. argv may be a + // subset of expect_argv. // - // gtest argv processing always leaves argv[0] intact, so this can be checked - // directly. + // Google Test argv processing always leaves argv[0] intact, so this can be + // checked directly. ASSERT_FALSE(expect_argv.empty()); ASSERT_FALSE(argv.empty()); EXPECT_EQ(argv[0], expect_argv[0]); diff --git a/util/posix/scoped_mmap_test.cc b/util/posix/scoped_mmap_test.cc index 5279fdb8..0b3c1ce8 100644 --- a/util/posix/scoped_mmap_test.cc +++ b/util/posix/scoped_mmap_test.cc @@ -46,12 +46,12 @@ void* BareMmap(size_t len) { // // The strategy taken here is that a random 64-bit cookie value is written into // a mapped region by SetUp(). While the mapping is active, Check() should not -// crash, or for a gtest expectation, Expected() and Observed() should not crash -// and should be equal. After the region is unmapped, Check() should crash, -// either because the region has been unmapped and the address not reused, the -// address has been reused but is protected against reading (unlikely), or -// because the address has been reused but the cookie value is no longer present -// there. +// crash, or for a Google Test expectation, Expected() and Observed() should not +// crash and should be equal. After the region is unmapped, Check() should +// crash, either because the region has been unmapped and the address not +// reused, the address has been reused but is protected against reading +// (unlikely), or because the address has been reused but the cookie value is no +// longer present there. class TestCookie { public: // A weird constructor for a weird class. The member variable initialization diff --git a/util/thread/thread_log_messages_test.cc b/util/thread/thread_log_messages_test.cc index 94920e7f..b25dc60e 100644 --- a/util/thread/thread_log_messages_test.cc +++ b/util/thread/thread_log_messages_test.cc @@ -37,8 +37,8 @@ TEST(ThreadLogMessages, Empty) { } // For a message formatted like "[preamble] message\n", returns just "message". -// If the message is not formatted as expected, a gtest expectation failure will -// be recorded and this function will return an empty string. +// If the message is not formatted as expected, a Google Test expectation +// failure will be recorded and this function will return an empty string. std::string MessageString(const std::string& log_message) { if (log_message.size() < 1) { EXPECT_GE(log_message.size(), 1u); diff --git a/util/util_test.gyp b/util/util_test.gyp index f65a9186..91ca5112 100644 --- a/util/util_test.gyp +++ b/util/util_test.gyp @@ -24,10 +24,10 @@ 'util.gyp:crashpad_util', '../client/client.gyp:crashpad_client', '../compat/compat.gyp:crashpad_compat', - '../test/test.gyp:crashpad_gmock_main', + '../test/test.gyp:crashpad_googlemock_main', '../test/test.gyp:crashpad_test', - '../third_party/gtest/gmock.gyp:gmock', - '../third_party/gtest/gtest.gyp:gtest', + '../third_party/googletest/googlemock.gyp:googlemock', + '../third_party/googletest/googletest.gyp:googletest', '../third_party/lss/lss.gyp:lss', '../third_party/mini_chromium/mini_chromium.gyp:base', '../third_party/zlib/zlib.gyp:zlib', diff --git a/util/win/safe_terminate_process_test.cc b/util/win/safe_terminate_process_test.cc index d2e4b6dd..cf1a4925 100644 --- a/util/win/safe_terminate_process_test.cc +++ b/util/win/safe_terminate_process_test.cc @@ -62,7 +62,7 @@ class ScopedExecutablePatch { public: // If either the constructor or destructor fails, PCHECK() to terminate // immediately, because the process will be in a weird and untrustworthy - // state, and gtest error handling isn’t worthwhile at that point. + // state, and Google Test error handling isn’t worthwhile at that point. ScopedVirtualProtectRWX(void* address, size_t size) : address_(address), size_(size) {