From e49429051272141a91ce898caa176f4366c5209e Mon Sep 17 00:00:00 2001 From: Tanzinul Islam Date: Mon, 19 Jun 2017 01:33:58 +0100 Subject: Allow death test child to bypass WER under MinGW The mechanics of suppressing debugger trapping and Windows Error Reporting for the crashed child process in a death test are currently guarded under the `GTEST_HAS_SEH` macro. This seems unnecessary, as the logic does not call any APIs related to Structured Error Handling. Replace the guarding macro with the more permissive `GTEST_OS_WINDOWS`, so that Windows toolchains without SEH support (e.g. MinGW) can benefit from it. Fixes: #1116 --- googletest/src/gtest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 3a18f25..dc5f54d 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -4214,7 +4214,7 @@ int UnitTest::Run() { // used for the duration of the program. impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions)); -#if GTEST_HAS_SEH +#if GTEST_OS_WINDOWS // Either the user wants Google Test to catch exceptions thrown by the // tests or this is executing in the context of death test child // process. In either case the user does not want to see pop-up dialogs @@ -4251,7 +4251,7 @@ int UnitTest::Run() { _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. # endif } -#endif // GTEST_HAS_SEH +#endif // GTEST_OS_WINDOWS return internal::HandleExceptionsInMethodIfSupported( impl(), -- cgit v0.12 From c958e26fd02d43a916ff297c89eee22166fe7be7 Mon Sep 17 00:00:00 2001 From: Scott Slack-Smith Date: Fri, 30 Jun 2017 17:12:56 +0100 Subject: *Silence false positive memory leaks reported by Microsoft's debug CRT* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new RAII MemoryIsNotDeallocated class that excludes memory allocations from Microsoft’s debug CRT leak detection report. We use this RAII class to silence 2 false positive leaks that are caused by memory allocations that are intentionally never deallocated. *Background* The MS debug CRT has a lightweight memory leak detection mechanism that can only detect if a memory allocation is missing a matching deallocation. Consequently, it will report a false positive leak for memory that’s intentionally never deallocated. For example, memory that’s reachable for the entire lifetime of a app. Note the MS debug CRT is always tracking memory allocations but the final memory leak report is disabled by default. As you can’t avoid paying for its cost, you may as well use it. The memory leak report can be enabled by calling the following function #ifdef _MSC_VER _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF); #endif // _MSC_VER anywhere before exiting main. For example, the following are the false positive leaks reported before this change; Detected memory leaks! Dumping objects -> {750} normal block at 0x015DF938, 8 bytes long. Data: < ] > 00 F9 5D 01 00 00 00 00 {749} normal block at 0x015DEE60, 32 bytes long. Data: <` ] ` ] ` ] > 60 EE 5D 01 60 EE 5D 01 60 EE 5D 01 01 01 CD CD {748} normal block at 0x015DF900, 12 bytes long. Data: <8 ] ` ] > 38 F9 5D 01 60 EE 5D 01 00 00 00 00 {747} normal block at 0x015DA0F8, 24 bytes long. Data: < > FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 Object dump complete. As you can see from above it’s not easy to identify the above are false positives. Consequently, if false positive leaks are not fixed or silenced, then it becomes impractical to identify real memory leaks. --- googletest/src/gtest-port.cc | 52 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index d80bd80..edd115d 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -279,6 +279,43 @@ void Mutex::AssertHeld() { << "The current thread is not holding the mutex @" << this; } +namespace { + +// Use the RAII idiom to flag mem allocs that are intentionally never +// deallocated. The motivation is to silence the false positive mem leaks +// that are reported by the debug version of MS's CRT which can only detect +// if an alloc is missing a matching deallocation. +// Example: +// MemoryIsNotDeallocated memory_is_not_deallocated; +// critical_section_ = new CRITICAL_SECTION; +// +class MemoryIsNotDeallocated +{ +public: + MemoryIsNotDeallocated() : old_crtdbg_flag_(0) { +#ifdef _MSC_VER + old_crtdbg_flag_ = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); + // Set heap allocation block type to _IGNORE_BLOCK so that MS debug CRT + // doesn't report mem leak if there's no matching deallocation. + _CrtSetDbgFlag(old_crtdbg_flag_ & ~_CRTDBG_ALLOC_MEM_DF); +#endif // _MSC_VER + } + + ~MemoryIsNotDeallocated() { +#ifdef _MSC_VER + // Restore the original _CRTDBG_ALLOC_MEM_DF flag + _CrtSetDbgFlag(old_crtdbg_flag_); +#endif // _MSC_VER + } + +private: + int old_crtdbg_flag_; + + GTEST_DISALLOW_COPY_AND_ASSIGN_(MemoryIsNotDeallocated); +}; + +} // namespace + // Initializes owner_thread_id_ and critical_section_ in static mutexes. void Mutex::ThreadSafeLazyInit() { // Dynamic mutexes are initialized in the constructor. @@ -289,7 +326,11 @@ void Mutex::ThreadSafeLazyInit() { // If critical_section_init_phase_ was 0 before the exchange, we // are the first to test it and need to perform the initialization. owner_thread_id_ = 0; - critical_section_ = new CRITICAL_SECTION; + { + // Use RAII to flag that following mem alloc is never deallocated. + MemoryIsNotDeallocated memory_is_not_deallocated; + critical_section_ = new CRITICAL_SECTION; + } ::InitializeCriticalSection(critical_section_); // Updates the critical_section_init_phase_ to 2 to signal // initialization complete. @@ -528,10 +569,17 @@ class ThreadLocalRegistryImpl { return 0; } + // Return a newly constructed ThreadIdToThreadLocals that's intentionally never deleted + static ThreadIdToThreadLocals* NewThreadIdToThreadLocals() { + // Use RAII to flag that following mem alloc is never deallocated. + MemoryIsNotDeallocated memory_is_not_deallocated; + return new ThreadIdToThreadLocals; + } + // Returns map of thread local instances. static ThreadIdToThreadLocals* GetThreadLocalsMapLocked() { mutex_.AssertHeld(); - static ThreadIdToThreadLocals* map = new ThreadIdToThreadLocals; + static ThreadIdToThreadLocals* map = NewThreadIdToThreadLocals(); return map; } -- cgit v0.12 From 713b0778709ba8ba2f8e437f0bbba16d57de7137 Mon Sep 17 00:00:00 2001 From: Josh Bodily Date: Thu, 10 Aug 2017 10:58:57 -0600 Subject: Fix scoped enum not working in gmock-gen.py --- googlemock/scripts/generator/cpp/ast.py | 3 +++ googlemock/scripts/generator/cpp/gmock_class_test.py | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/googlemock/scripts/generator/cpp/ast.py b/googlemock/scripts/generator/cpp/ast.py index 11cbe91..9507448 100755 --- a/googlemock/scripts/generator/cpp/ast.py +++ b/googlemock/scripts/generator/cpp/ast.py @@ -1264,6 +1264,9 @@ class AstBuilder(object): return self._GetNestedType(Union) def handle_enum(self): + token = self._GetNextToken() + if not (token.token_type == tokenize.NAME and token.name == 'class'): + self._AddBackToken(token) return self._GetNestedType(Enum) def handle_auto(self): diff --git a/googlemock/scripts/generator/cpp/gmock_class_test.py b/googlemock/scripts/generator/cpp/gmock_class_test.py index 018f90a..c53e600 100755 --- a/googlemock/scripts/generator/cpp/gmock_class_test.py +++ b/googlemock/scripts/generator/cpp/gmock_class_test.py @@ -444,5 +444,23 @@ void(const FooType& test_arg)); self.assertEqualIgnoreLeadingWhitespace( expected, self.GenerateMocks(source)) + def testEnumClass(self): + source = """ +class Test { + public: + enum class Baz { BAZINGA }; + virtual void Bar(const FooType& test_arg); +}; +""" + expected = """\ +class MockTest : public Test { +public: +MOCK_METHOD1(Bar, +void(const FooType& test_arg)); +}; +""" + self.assertEqualIgnoreLeadingWhitespace( + expected, self.GenerateMocks(source)) + if __name__ == '__main__': unittest.main() -- cgit v0.12 From ad383b274db2696cf2d4bdea9d477c463992f2fc Mon Sep 17 00:00:00 2001 From: Conor Burgess Date: Thu, 7 Dec 2017 10:53:13 +0000 Subject: Fix value pointed to by `_NSGetArgc()` on macOS --- googletest/src/gtest.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 749e829..41ed48b 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -146,6 +146,12 @@ # define vsnprintf _vsnprintf #endif // GTEST_OS_WINDOWS +#if GTEST_OS_MAC +# ifndef GTEST_OS_IOS +# include +# endif +#endif + namespace testing { using internal::CountIf; @@ -5341,6 +5347,16 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { } } +// Fix the value of *_NSGetArgc() on macOS, but iff +// *_NSGetArgv() == argv +#if GTEST_OS_MAC +# ifndef GTEST_OS_IOS + if (*_NSGetArgv() == argv) { + *_NSGetArgc() = *argc; + } +# endif +#endif + if (g_help_flag) { // We print the help here instead of in RUN_ALL_TESTS(), as the // latter may not be called at all if the user is using Google -- cgit v0.12 From 4d50715c2bf9c727573a397cfb02bd551d4aa3b0 Mon Sep 17 00:00:00 2001 From: Conor Burgess Date: Thu, 7 Dec 2017 11:49:33 +0000 Subject: Fix location of `_NSGetArgv` correction. --- googletest/src/gtest.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 41ed48b..3c94381 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -5347,16 +5347,6 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { } } -// Fix the value of *_NSGetArgc() on macOS, but iff -// *_NSGetArgv() == argv -#if GTEST_OS_MAC -# ifndef GTEST_OS_IOS - if (*_NSGetArgv() == argv) { - *_NSGetArgc() = *argc; - } -# endif -#endif - if (g_help_flag) { // We print the help here instead of in RUN_ALL_TESTS(), as the // latter may not be called at all if the user is using Google @@ -5369,6 +5359,17 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { // other parts of Google Test. void ParseGoogleTestFlagsOnly(int* argc, char** argv) { ParseGoogleTestFlagsOnlyImpl(argc, argv); + + // Fix the value of *_NSGetArgc() on macOS, but iff + // *_NSGetArgv() == argv + // Only applicable to char** version of argv +#if GTEST_OS_MAC +# ifndef GTEST_OS_IOS + if (*_NSGetArgv() == argv) { + *_NSGetArgc() = *argc; + } +# endif +#endif } void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) { ParseGoogleTestFlagsOnlyImpl(argc, argv); -- cgit v0.12 From b22e8dec408935a7f76420026a738eeb61f8af38 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Thu, 5 Apr 2018 13:38:33 +0200 Subject: Clean up cache non-advanced variable for subproject --- googlemock/CMakeLists.txt | 18 ++++++++++++++---- googletest/CMakeLists.txt | 25 ++++++++++++++++++++----- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index bac2e3b..7d66eb2 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -5,10 +5,6 @@ # ctest. You can select which tests to run using 'ctest -R regex'. # For more options, run 'ctest --help'. -# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to -# make it prominent in the GUI. -option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) - option(gmock_build_tests "Build all of Google Mock's own tests." OFF) # A directory to find Google Test sources. @@ -55,6 +51,20 @@ endif() # if they are the same (the default). add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest") + +# These commands only run if this is the main project +if(CMAKE_PROJECT_NAME STREQUAL "gmock" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution") + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to + # make it prominent in the GUI. + option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) + +else() + + mark_as_advanced(gmock_build_tests) + +endif() + # Although Google Test's CMakeLists.txt calls this function, the # changes there don't affect the current scope. Therefore we have to # call it again here. diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index b09c46e..2a9b989 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -5,10 +5,6 @@ # ctest. You can select which tests to run using 'ctest -R regex'. # For more options, run 'ctest --help'. -# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to -# make it prominent in the GUI. -option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) - # When other libraries are using a shared version of runtime libraries, # Google Test also has to use one. option( @@ -60,6 +56,25 @@ if (COMMAND set_up_hermetic_build) set_up_hermetic_build() endif() +# These commands only run if this is the main project +if(CMAKE_PROJECT_NAME STREQUAL "gtest" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution") + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to + # make it prominent in the GUI. + option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) + +else() + + mark_as_advanced( + gtest_force_shared_crt + gtest_build_tests + gtest_build_samples + gtest_disable_pthreads + gtest_hide_internal_symbols) + +endif() + + if (gtest_hide_internal_symbols) set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) @@ -86,7 +101,7 @@ include_directories( if (MSVC AND MSVC_VERSION EQUAL 1700) add_definitions(/D _VARIADIC_MAX=10) endif() - + ######################################################################## # # Defines the gtest & gtest_main libraries. User tests should link -- cgit v0.12 From dfddc987186100c98d93a830d6ca88fa66ab3dbc Mon Sep 17 00:00:00 2001 From: tisi1988 Date: Wed, 27 Jun 2018 22:47:18 +0200 Subject: FIX: Compilation warning with GCC regarding a non-initialised member from MutexBase class. --- googletest/include/gtest/internal/gtest-port.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 437a4ed..08c5049 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -2093,7 +2093,7 @@ class MutexBase { // This allows initialization to work whether pthread_t is a scalar or struct. // The flag -Wmissing-field-initializers must not be specified for this to work. # define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ - ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false } + ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false, 0 } // The Mutex class can only be used for mutexes created at runtime. It // shares its API with MutexBase otherwise. -- cgit v0.12 From b50b2f775ed0268af9c83a96b285e296778d0743 Mon Sep 17 00:00:00 2001 From: medithe <40990424+medithe@users.noreply.github.com> Date: Mon, 9 Jul 2018 13:36:46 +0200 Subject: Cast the tr1::tuple_element template parameter to int MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because in `std::tr1::tuple_element` the first template parameter should be of type int (https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/a00547.html), but the code inserts a size_t, the first template parameter should be casted to int before, to get rid of the following errors: googletest-src/googletest/include/gtest/gtest-printers.h:957:60: error: conversion from ‘long unsigned int’ to ‘int’ may change value [-Werror=conversion] struct tuple_element : ::std::tr1::tuple_element {}; and googletest-src/googletest/include/gtest/gtest-printers.h:961:56: error: conversion from ‘long unsigned int’ to ‘int’ may change value [-Werror=conversion] const typename ::std::tr1::tuple_element::type>::type get( --- googletest/include/gtest/gtest-printers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index 373946b..fa465c3 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -954,11 +954,11 @@ struct TuplePolicy { static const size_t tuple_size = ::std::tr1::tuple_size::value; template - struct tuple_element : ::std::tr1::tuple_element {}; + struct tuple_element : ::std::tr1::tuple_element(I), Tuple> {}; template static typename AddReference< - const typename ::std::tr1::tuple_element::type>::type get( + const typename ::std::tr1::tuple_element(I), Tuple>::type>::type get( const Tuple& tuple) { return ::std::tr1::get(tuple); } -- cgit v0.12 From 421e7b4f29fc761c66d2773a1fc318a738a6d3da Mon Sep 17 00:00:00 2001 From: Wojciech Kaluza Date: Sat, 26 May 2018 01:40:06 +0100 Subject: Remove default /EHsc compiler flag This prevents warning D9025 (one command-line option overrides another) on MSVC builds: some test targets are built with the /EHs-c- which conflicts with /EHsc. --- googletest/cmake/internal_utils.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 6448918..3a9b5bc 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -38,6 +38,11 @@ macro(fix_default_compiler_settings_) # We prefer more strict warning checking for building Google Test. # Replaces /W3 with /W4 in defaults. string(REPLACE "/W3" "/W4" ${flag_var} "${${flag_var}}") + + # Prevent D9025 warning for targets that have exception handling + # turned off (/EHs-c- flag). Where required, exceptions are explicitly + # re-enabled using the cxx_exception_flags variable. + string(REPLACE "/EHsc" "" ${flag_var} "${${flag_var}}") endforeach() endif() endmacro() -- cgit v0.12 From 3a8d744030e165dc7bebf70e4fbc44831059a79b Mon Sep 17 00:00:00 2001 From: Loo Rong Jie Date: Fri, 13 Jul 2018 21:23:28 +0800 Subject: Disable MSVC function deprecation when using Clang --- googletest/include/gtest/internal/gtest-port.h | 20 ++++++++++++++++++-- googletest/src/gtest-port.cc | 4 ++-- googletest/src/gtest.cc | 4 ++-- googletest/test/gtest_unittest.cc | 4 ++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index d5ec086..727b41f 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -325,6 +325,22 @@ # define GTEST_DISABLE_MSC_WARNINGS_POP_() #endif +// Clang on Windows does not understand MSVC's pragma warning. +// We need clang-specific way to disable function deprecation warning. +#ifdef __clang__ +# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-implementations\"") +#define GTEST_DISABLE_MSC_DEPRECATED_POP_() \ + _Pragma("clang diagnostic pop") +#else +# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \ + GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996) +# define GTEST_DISABLE_MSC_DEPRECATED_POP_() \ + GTEST_DISABLE_MSC_WARNINGS_POP_() +#endif + #ifndef GTEST_LANG_CXX11 // gcc and clang define __GXX_EXPERIMENTAL_CXX0X__ when // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a @@ -2483,7 +2499,7 @@ inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); } // Functions deprecated by MSVC 8.0. -GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996 /* deprecated function */) +GTEST_DISABLE_MSC_DEPRECATED_PUSH_() inline const char* StrNCpy(char* dest, const char* src, size_t n) { return strncpy(dest, src, n); @@ -2531,7 +2547,7 @@ inline const char* GetEnv(const char* name) { #endif } -GTEST_DISABLE_MSC_WARNINGS_POP_() +GTEST_DISABLE_MSC_DEPRECATED_POP_() #if GTEST_OS_WINDOWS_MOBILE // Windows CE has no C library. The abort() function is used in diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index f8a0ad6..2ab2d25 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -942,7 +942,7 @@ GTestLog::~GTestLog() { // Disable Microsoft deprecation warnings for POSIX functions called from // this class (creat, dup, dup2, and close) -GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996) +GTEST_DISABLE_MSC_DEPRECATED_PUSH_() #if GTEST_HAS_STREAM_REDIRECTION @@ -1026,7 +1026,7 @@ class CapturedStream { GTEST_DISALLOW_COPY_AND_ASSIGN_(CapturedStream); }; -GTEST_DISABLE_MSC_WARNINGS_POP_() +GTEST_DISABLE_MSC_DEPRECATED_POP_() static CapturedStream* g_captured_stderr = NULL; static CapturedStream* g_captured_stdout = NULL; diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 9c25c99..9a69080 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -860,9 +860,9 @@ TimeInMillis GetTimeInMillis() { // (deprecated function) there. // TODO(kenton@google.com): Use GetTickCount()? Or use // SystemTimeToFileTime() - GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996) + GTEST_DISABLE_MSC_DEPRECATED_PUSH_() _ftime64(&now); - GTEST_DISABLE_MSC_WARNINGS_POP_() + GTEST_DISABLE_MSC_DEPRECATED_POP_() return static_cast(now.time) * 1000 + now.millitm; #elif GTEST_HAS_GETTIMEOFDAY_ diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 39b6841..ab22031 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -444,10 +444,10 @@ class FormatEpochTimeInMillisAsIso8601Test : public Test { virtual void SetUp() { saved_tz_ = NULL; - GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996 /* getenv, strdup: deprecated */) + GTEST_DISABLE_MSC_DEPRECATED_PUSH_(/* getenv, strdup: deprecated */) if (getenv("TZ")) saved_tz_ = strdup(getenv("TZ")); - GTEST_DISABLE_MSC_WARNINGS_POP_() + GTEST_DISABLE_MSC_DEPRECATED_POP_() // Set up the time zone for FormatEpochTimeInMillisAsIso8601 to use. We // cannot use the local time zone because the function's output depends -- cgit v0.12 From 51b65058ad72d2d92fff89f04aad99f8bbddb147 Mon Sep 17 00:00:00 2001 From: wxf Date: Fri, 3 Aug 2018 16:23:38 +0800 Subject: Ignore cmake generated files when used as submodule --- .gitignore | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 16c56e6..73cdd2c 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,14 @@ googletest/fused-src/ # macOS files .DS_Store + +# Ignore cmake generated directories and files. +CMakeFiles +CTestTestfile.cmake +Makefile +cmake_install.cmake +googlemock/CMakeFiles +googlemock/CTestTestfile.cmake +googlemock/Makefile +googlemock/cmake_install.cmake +googlemock/gtest -- cgit v0.12 From 63baab8924f589fdfd934ae24613e59f8d3ef635 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 13 Aug 2018 14:31:56 -0400 Subject: Move instructions into custom/README files --- googlemock/include/gmock/internal/custom/README.md | 16 +++++++ .../include/gmock/internal/custom/gmock-matchers.h | 4 +- .../include/gmock/internal/custom/gmock-port.h | 11 +---- googletest/include/gtest/internal/custom/README.md | 56 ++++++++++++++++++++++ .../include/gtest/internal/custom/gtest-port.h | 35 +------------- .../include/gtest/internal/custom/gtest-printers.h | 4 +- googletest/include/gtest/internal/custom/gtest.h | 10 +--- 7 files changed, 78 insertions(+), 58 deletions(-) create mode 100644 googlemock/include/gmock/internal/custom/README.md create mode 100644 googletest/include/gtest/internal/custom/README.md diff --git a/googlemock/include/gmock/internal/custom/README.md b/googlemock/include/gmock/internal/custom/README.md new file mode 100644 index 0000000..ef5f9bf --- /dev/null +++ b/googlemock/include/gmock/internal/custom/README.md @@ -0,0 +1,16 @@ +# Customization Points + +The custom directory is an injection point for custom user configurations. + +## Header gmock-port.h + +The following macros can be defined: + +### Flag related macros: + +* GMOCK_DECLARE_bool_(name) +* GMOCK_DECLARE_int32_(name) +* GMOCK_DECLARE_string_(name) +* GMOCK_DEFINE_bool_(name, default_val, doc) +* GMOCK_DEFINE_int32_(name, default_val, doc) +* GMOCK_DEFINE_string_(name, default_val, doc) diff --git a/googlemock/include/gmock/internal/custom/gmock-matchers.h b/googlemock/include/gmock/internal/custom/gmock-matchers.h index 227d91f..14aafaa 100644 --- a/googlemock/include/gmock/internal/custom/gmock-matchers.h +++ b/googlemock/include/gmock/internal/custom/gmock-matchers.h @@ -27,9 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// ============================================================ -// An installation-specific extension point for gmock-matchers.h. -// ============================================================ +// Injection point for custom user configurations. See README for details // // GOOGLETEST_CM0002 DO NOT DELETE diff --git a/googlemock/include/gmock/internal/custom/gmock-port.h b/googlemock/include/gmock/internal/custom/gmock-port.h index ad9ae36..0030fe9 100644 --- a/googlemock/include/gmock/internal/custom/gmock-port.h +++ b/googlemock/include/gmock/internal/custom/gmock-port.h @@ -27,16 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Injection point for custom user configurations. -// The following macros can be defined: -// -// Flag related macros: -// GMOCK_DECLARE_bool_(name) -// GMOCK_DECLARE_int32_(name) -// GMOCK_DECLARE_string_(name) -// GMOCK_DEFINE_bool_(name, default_val, doc) -// GMOCK_DEFINE_int32_(name, default_val, doc) -// GMOCK_DEFINE_string_(name, default_val, doc) +// Injection point for custom user configurations. See README for details // // ** Custom implementation starts here ** diff --git a/googletest/include/gtest/internal/custom/README.md b/googletest/include/gtest/internal/custom/README.md new file mode 100644 index 0000000..e39b7c6 --- /dev/null +++ b/googletest/include/gtest/internal/custom/README.md @@ -0,0 +1,56 @@ +# Customization Points + +The custom directory is an injection point for custom user configurations. + +## Header gtest.h + +### The following macros can be defined: + +* GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of + OsStackTraceGetterInterface. +* GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir(). See + testing::TempDir for semantics and signature. + +## Header gtest-port.h + +The following macros can be defined: + +### Flag related macros: + +* GTEST_FLAG(flag_name) +* GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its own + flagfile flag parsing. +* GTEST_DECLARE_bool_(name) +* GTEST_DECLARE_int32_(name) +* GTEST_DECLARE_string_(name) * +* GTEST_DEFINE_bool_(name, default_val, doc) +* GTEST_DEFINE_int32_(name, default_val, doc) +* GTEST_DEFINE_string_(name, default_val, doc) + +### Logging: + +* GTEST_LOG_(severity) +* GTEST_CHECK_(condition) +* Functions LogToStderr() and FlushInfoLog() have to be provided too. + +### Threading: + +* GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided. +* GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are + already provided. Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and + GTEST_DEFINE_STATIC_MUTEX_(mutex) +* GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) +* GTEST_LOCK_EXCLUDED_(locks) + +### Underlying library support features + +* GTEST_HAS_CXXABI_H_ + +### Exporting API symbols: + +* GTEST_API_ - Specifier for exported symbols. + +## Header gtest-printers.h + +* See documentation at gtest/gtest-printers.h for details on how to define a + custom printer. diff --git a/googletest/include/gtest/internal/custom/gtest-port.h b/googletest/include/gtest/internal/custom/gtest-port.h index aa5da29..cd85d95 100644 --- a/googletest/include/gtest/internal/custom/gtest-port.h +++ b/googletest/include/gtest/internal/custom/gtest-port.h @@ -27,40 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Injection point for custom user configurations. -// The following macros can be defined: -// -// Flag related macros: -// GTEST_FLAG(flag_name) -// GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its -// own flagfile flag parsing. -// GTEST_DECLARE_bool_(name) -// GTEST_DECLARE_int32_(name) -// GTEST_DECLARE_string_(name) -// GTEST_DEFINE_bool_(name, default_val, doc) -// GTEST_DEFINE_int32_(name, default_val, doc) -// GTEST_DEFINE_string_(name, default_val, doc) -// -// Logging: -// GTEST_LOG_(severity) -// GTEST_CHECK_(condition) -// Functions LogToStderr() and FlushInfoLog() have to be provided too. -// -// Threading: -// GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided. -// GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are -// already provided. -// Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and -// GTEST_DEFINE_STATIC_MUTEX_(mutex) -// -// GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) -// GTEST_LOCK_EXCLUDED_(locks) -// -// Underlying library support features: -// GTEST_HAS_CXXABI_H_ -// -// Exporting API symbols: -// GTEST_API_ - Specifier for exported symbols. +// Injection point for custom user configurations. See README for details // // ** Custom implementation starts here ** diff --git a/googletest/include/gtest/internal/custom/gtest-printers.h b/googletest/include/gtest/internal/custom/gtest-printers.h index 60c1ea0..eb4467a 100644 --- a/googletest/include/gtest/internal/custom/gtest-printers.h +++ b/googletest/include/gtest/internal/custom/gtest-printers.h @@ -31,8 +31,8 @@ // installation of gTest. // It will be included from gtest-printers.h and the overrides in this file // will be visible to everyone. -// See documentation at gtest/gtest-printers.h for details on how to define a -// custom printer. +// +// Injection point for custom user configurations. See README for details // // ** Custom implementation starts here ** diff --git a/googletest/include/gtest/internal/custom/gtest.h b/googletest/include/gtest/internal/custom/gtest.h index 6f7c5e4..4c8e07b 100644 --- a/googletest/include/gtest/internal/custom/gtest.h +++ b/googletest/include/gtest/internal/custom/gtest.h @@ -27,15 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Injection point for custom user configurations. -// The following macros can be defined: -// -// GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of -// OsStackTraceGetterInterface. -// -// GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir(). -// See testing::TempDir for semantics and -// signature. +// Injection point for custom user configurations. See README for details // // ** Custom implementation starts here ** -- cgit v0.12 From 9ca399ae053d0a2a4d206fffe9ab76f577dbe22e Mon Sep 17 00:00:00 2001 From: Elias Daler Date: Mon, 13 Aug 2018 23:01:00 +0300 Subject: Change location of generated pkg-config files from CMAKE_BINARY_DIR to gmock/gtest_BINARY_DIR (#1717) --- googlemock/CMakeLists.txt | 6 +++--- googletest/CMakeLists.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index bac2e3b..0b1f77a 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -128,13 +128,13 @@ if(INSTALL_GMOCK) # configure and install pkgconfig files configure_file( cmake/gmock.pc.in - "${CMAKE_BINARY_DIR}/gmock.pc" + "${gmock_BINARY_DIR}/gmock.pc" @ONLY) configure_file( cmake/gmock_main.pc.in - "${CMAKE_BINARY_DIR}/gmock_main.pc" + "${gmock_BINARY_DIR}/gmock_main.pc" @ONLY) - install(FILES "${CMAKE_BINARY_DIR}/gmock.pc" "${CMAKE_BINARY_DIR}/gmock_main.pc" + install(FILES "${gmock_BINARY_DIR}/gmock.pc" "${gmock_BINARY_DIR}/gmock_main.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endif() diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index ba2c2c2..6a917bb 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -121,13 +121,13 @@ if(INSTALL_GTEST) # configure and install pkgconfig files configure_file( cmake/gtest.pc.in - "${CMAKE_BINARY_DIR}/gtest.pc" + "${gtest_BINARY_DIR}/gtest.pc" @ONLY) configure_file( cmake/gtest_main.pc.in - "${CMAKE_BINARY_DIR}/gtest_main.pc" + "${gtest_BINARY_DIR}/gtest_main.pc" @ONLY) - install(FILES "${CMAKE_BINARY_DIR}/gtest.pc" "${CMAKE_BINARY_DIR}/gtest_main.pc" + install(FILES "${gtest_BINARY_DIR}/gtest.pc" "${gtest_BINARY_DIR}/gtest_main.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endif() -- cgit v0.12 From 9060e19c87d6a041b3f31b172b300a833cc28109 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 13 Aug 2018 16:23:17 -0400 Subject: formatting for new READMEs --- googlemock/include/gmock/internal/custom/README.md | 12 +++--- googletest/include/gtest/internal/custom/README.md | 44 +++++++++++----------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/googlemock/include/gmock/internal/custom/README.md b/googlemock/include/gmock/internal/custom/README.md index ef5f9bf..76969a7 100644 --- a/googlemock/include/gmock/internal/custom/README.md +++ b/googlemock/include/gmock/internal/custom/README.md @@ -8,9 +8,9 @@ The following macros can be defined: ### Flag related macros: -* GMOCK_DECLARE_bool_(name) -* GMOCK_DECLARE_int32_(name) -* GMOCK_DECLARE_string_(name) -* GMOCK_DEFINE_bool_(name, default_val, doc) -* GMOCK_DEFINE_int32_(name, default_val, doc) -* GMOCK_DEFINE_string_(name, default_val, doc) +* `GMOCK_DECLARE_bool_(name)` +* `GMOCK_DECLARE_int32_(name)` +* `GMOCK_DECLARE_string_(name)` +* `GMOCK_DEFINE_bool_(name, default_val, doc)` +* `GMOCK_DEFINE_int32_(name, default_val, doc)` +* `GMOCK_DEFINE_string_(name, default_val, doc)` diff --git a/googletest/include/gtest/internal/custom/README.md b/googletest/include/gtest/internal/custom/README.md index e39b7c6..3a2b885 100644 --- a/googletest/include/gtest/internal/custom/README.md +++ b/googletest/include/gtest/internal/custom/README.md @@ -6,9 +6,9 @@ The custom directory is an injection point for custom user configurations. ### The following macros can be defined: -* GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of +* `GTEST_OS_STACK_TRACE_GETTER_` - The name of an implementation of OsStackTraceGetterInterface. -* GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir(). See +* `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for testing::TempDir(). See testing::TempDir for semantics and signature. ## Header gtest-port.h @@ -17,38 +17,38 @@ The following macros can be defined: ### Flag related macros: -* GTEST_FLAG(flag_name) -* GTEST_USE_OWN_FLAGFILE_FLAG_ - Define to 0 when the system provides its own - flagfile flag parsing. -* GTEST_DECLARE_bool_(name) -* GTEST_DECLARE_int32_(name) -* GTEST_DECLARE_string_(name) * -* GTEST_DEFINE_bool_(name, default_val, doc) -* GTEST_DEFINE_int32_(name, default_val, doc) -* GTEST_DEFINE_string_(name, default_val, doc) +* `GTEST_FLAG(flag_name)` +* `GTEST_USE_OWN_FLAGFILE_FLAG_` - Define to 0 when the system provides its + own flagfile flag parsing. +* `GTEST_DECLARE_bool_(name)` +* `GTEST_DECLARE_int32_(name)` +* `GTEST_DECLARE_string_(name)` +* `GTEST_DEFINE_bool_(name, default_val, doc)` +* `GTEST_DEFINE_int32_(name, default_val, doc)` +* `GTEST_DEFINE_string_(name, default_val, doc)` ### Logging: -* GTEST_LOG_(severity) -* GTEST_CHECK_(condition) -* Functions LogToStderr() and FlushInfoLog() have to be provided too. +* `GTEST_LOG_(severity)` +* `GTEST_CHECK_(condition)` +* Functions `LogToStderr()` and `FlushInfoLog()` have to be provided too. ### Threading: -* GTEST_HAS_NOTIFICATION_ - Enabled if Notification is already provided. -* GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ - Enabled if Mutex and ThreadLocal are - already provided. Must also provide GTEST_DECLARE_STATIC_MUTEX_(mutex) and - GTEST_DEFINE_STATIC_MUTEX_(mutex) -* GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) -* GTEST_LOCK_EXCLUDED_(locks) +* `GTEST_HAS_NOTIFICATION_` - Enabled if Notification is already provided. +* `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if Mutex and ThreadLocal are + already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` and + `GTEST_DEFINE_STATIC_MUTEX_(mutex)` +* `GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)` +* `GTEST_LOCK_EXCLUDED_(locks)` ### Underlying library support features -* GTEST_HAS_CXXABI_H_ +* `GTEST_HAS_CXXABI_H_` ### Exporting API symbols: -* GTEST_API_ - Specifier for exported symbols. +* `GTEST_API_` - Specifier for exported symbols. ## Header gtest-printers.h -- cgit v0.12 From c203bee2457e9d098fcca3b136dc8316c4f63bdb Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 13 Aug 2018 22:45:53 -0400 Subject: formatting custom/README.md --- googlemock/include/gmock/internal/custom/README.md | 2 +- googletest/include/gtest/internal/custom/README.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/googlemock/include/gmock/internal/custom/README.md b/googlemock/include/gmock/internal/custom/README.md index 76969a7..f6c93f6 100644 --- a/googlemock/include/gmock/internal/custom/README.md +++ b/googlemock/include/gmock/internal/custom/README.md @@ -2,7 +2,7 @@ The custom directory is an injection point for custom user configurations. -## Header gmock-port.h +## Header `gmock-port.h` The following macros can be defined: diff --git a/googletest/include/gtest/internal/custom/README.md b/googletest/include/gtest/internal/custom/README.md index 3a2b885..ff391fb 100644 --- a/googletest/include/gtest/internal/custom/README.md +++ b/googletest/include/gtest/internal/custom/README.md @@ -2,16 +2,16 @@ The custom directory is an injection point for custom user configurations. -## Header gtest.h +## Header `gtest.h` ### The following macros can be defined: * `GTEST_OS_STACK_TRACE_GETTER_` - The name of an implementation of - OsStackTraceGetterInterface. -* `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for testing::TempDir(). See - testing::TempDir for semantics and signature. + `OsStackTraceGetterInterface`. +* `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for `testing::TempDir()`. See + `testing::TempDir` for semantics and signature. -## Header gtest-port.h +## Header `gtest-port.h` The following macros can be defined: @@ -36,9 +36,9 @@ The following macros can be defined: ### Threading: * `GTEST_HAS_NOTIFICATION_` - Enabled if Notification is already provided. -* `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if Mutex and ThreadLocal are - already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` and - `GTEST_DEFINE_STATIC_MUTEX_(mutex)` +* `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if `Mutex` and `ThreadLocal` + are already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` + and `GTEST_DEFINE_STATIC_MUTEX_(mutex)` * `GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)` * `GTEST_LOCK_EXCLUDED_(locks)` @@ -50,7 +50,7 @@ The following macros can be defined: * `GTEST_API_` - Specifier for exported symbols. -## Header gtest-printers.h +## Header `gtest-printers.h` -* See documentation at gtest/gtest-printers.h for details on how to define a +* See documentation at `gtest/gtest-printers.h` for details on how to define a custom printer. -- cgit v0.12 From f225735222b522abcb8286a654e71090403b75a1 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 14 Aug 2018 11:08:35 -0400 Subject: Code formatting changes, clean up, no functionality changes --- googlemock/include/gmock/gmock-generated-actions.h | 15 +++++---------- googlemock/include/gmock/gmock-generated-actions.h.pump | 3 +-- googletest/src/gtest-death-test.cc | 1 - googletest/test/googletest-printers-test.cc | 2 -- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/googlemock/include/gmock/gmock-generated-actions.h b/googlemock/include/gmock/gmock-generated-actions.h index 4ce7d35..cd3a102 100644 --- a/googlemock/include/gmock/gmock-generated-actions.h +++ b/googlemock/include/gmock/gmock-generated-actions.h @@ -215,8 +215,7 @@ class InvokeHelper > { get<2>(args), get<3>(args), get<4>(args), get<5>(args)); } - // There is no InvokeCallback() for 6-tuples, as google3 callbacks - // support 5 arguments at most. + // There is no InvokeCallback() for 6-tuples }; template > { get<6>(args)); } - // There is no InvokeCallback() for 7-tuples, as google3 callbacks - // support 5 arguments at most. + // There is no InvokeCallback() for 7-tuples }; template > { get<6>(args), get<7>(args)); } - // There is no InvokeCallback() for 8-tuples, as google3 callbacks - // support 5 arguments at most. + // There is no InvokeCallback() for 8-tuples }; template > { get<6>(args), get<7>(args), get<8>(args)); } - // There is no InvokeCallback() for 9-tuples, as google3 callbacks - // support 5 arguments at most. + // There is no InvokeCallback() for 9-tuples }; template (args), get<7>(args), get<8>(args), get<9>(args)); } - // There is no InvokeCallback() for 10-tuples, as google3 callbacks - // support 5 arguments at most. + // There is no InvokeCallback() for 10-tuples }; // Implements the Invoke(callback) action. diff --git a/googlemock/include/gmock/gmock-generated-actions.h.pump b/googlemock/include/gmock/gmock-generated-actions.h.pump index 4ec6679..9db68d9 100644 --- a/googlemock/include/gmock/gmock-generated-actions.h.pump +++ b/googlemock/include/gmock/gmock-generated-actions.h.pump @@ -88,8 +88,7 @@ $if i <= max_callback_arity [[ return callback->Run($gets); } ]] $else [[ - // There is no InvokeCallback() for $i-tuples, as google3 callbacks - // support $max_callback_arity arguments at most. + // There is no InvokeCallback() for $i-tuples ]] }; diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 854bc46..4da66c0 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -582,7 +582,6 @@ bool DeathTestImpl::Passed(bool status_ok) { if (status_ok) { # if GTEST_USES_PCRE // PCRE regexes support embedded NULs. - // GTEST_USES_PCRE is defined only in google3 mode const bool matched = RE::PartialMatch(error_message, *regex()); # else const bool matched = RE::PartialMatch(error_message.c_str(), *regex()); diff --git a/googletest/test/googletest-printers-test.cc b/googletest/test/googletest-printers-test.cc index 4018863..e4bb0c2 100644 --- a/googletest/test/googletest-printers-test.cc +++ b/googletest/test/googletest-printers-test.cc @@ -919,8 +919,6 @@ TEST(PrintStlContainerTest, MultiSet) { } #if GTEST_HAS_STD_FORWARD_LIST_ -// is available on Linux in the google3 mode, but not on -// Windows or Mac OS X. TEST(PrintStlContainerTest, SinglyLinkedList) { int a[] = { 9, 2, 8 }; -- cgit v0.12 From a3c0dd0f4d58e6c01a1432fdc69a9aff937309a9 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 14 Aug 2018 14:04:07 -0400 Subject: Comments changes, no functionality changes --- googlemock/include/gmock/gmock-actions.h | 3 +-- googlemock/include/gmock/gmock-cardinalities.h | 3 +-- googlemock/include/gmock/gmock-generated-actions.h | 3 +-- googlemock/include/gmock/gmock-generated-actions.h.pump | 3 +-- googlemock/include/gmock/gmock-generated-function-mockers.h | 3 +-- googlemock/include/gmock/gmock-generated-function-mockers.h.pump | 3 +-- googlemock/include/gmock/gmock-generated-nice-strict.h | 3 +-- googlemock/include/gmock/gmock-generated-nice-strict.h.pump | 3 +-- googlemock/include/gmock/gmock-matchers.h | 3 +-- googlemock/include/gmock/gmock-more-actions.h | 3 +-- googlemock/include/gmock/gmock-more-matchers.h | 3 +-- googlemock/include/gmock/gmock-spec-builders.h | 3 +-- googlemock/include/gmock/gmock.h | 3 +-- googlemock/include/gmock/internal/gmock-generated-internal-utils.h | 3 +-- .../include/gmock/internal/gmock-generated-internal-utils.h.pump | 3 +-- googlemock/include/gmock/internal/gmock-internal-utils.h | 3 +-- googlemock/include/gmock/internal/gmock-port.h | 3 +-- googlemock/src/gmock-all.cc | 3 +-- googlemock/src/gmock-cardinalities.cc | 3 +-- googlemock/src/gmock-internal-utils.cc | 3 +-- googlemock/src/gmock-matchers.cc | 3 +-- googlemock/src/gmock-spec-builders.cc | 3 +-- googlemock/src/gmock.cc | 3 +-- googlemock/src/gmock_main.cc | 3 +-- googlemock/test/gmock-actions_test.cc | 3 +-- googlemock/test/gmock-cardinalities_test.cc | 3 +-- googlemock/test/gmock-generated-actions_test.cc | 3 +-- googlemock/test/gmock-generated-function-mockers_test.cc | 3 +-- googlemock/test/gmock-generated-internal-utils_test.cc | 3 +-- googlemock/test/gmock-internal-utils_test.cc | 3 +-- googlemock/test/gmock-matchers_test.cc | 3 +-- googlemock/test/gmock-more-actions_test.cc | 3 +-- googlemock/test/gmock-nice-strict_test.cc | 3 +-- googlemock/test/gmock-port_test.cc | 3 +-- googlemock/test/gmock-spec-builders_test.cc | 3 +-- googlemock/test/gmock_all_test.cc | 3 +-- googlemock/test/gmock_ex_test.cc | 3 +-- googlemock/test/gmock_leak_test_.cc | 3 +-- googlemock/test/gmock_link2_test.cc | 3 +-- googlemock/test/gmock_link_test.cc | 3 +-- googlemock/test/gmock_link_test.h | 3 +-- googlemock/test/gmock_output_test_.cc | 3 +-- googlemock/test/gmock_stress_test.cc | 3 +-- googlemock/test/gmock_test.cc | 3 +-- googletest/include/gtest/gtest-death-test.h | 3 +-- googletest/include/gtest/gtest-message.h | 3 +-- googletest/include/gtest/gtest-param-test.h | 2 -- googletest/include/gtest/gtest-param-test.h.pump | 2 -- googletest/include/gtest/gtest-printers.h | 3 +-- googletest/include/gtest/gtest-spi.h | 3 +-- googletest/include/gtest/gtest-test-part.h | 3 --- googletest/include/gtest/gtest-typed-test.h | 3 +-- googletest/include/gtest/gtest.h | 3 +-- googletest/include/gtest/gtest_prod.h | 3 +-- googletest/include/gtest/internal/gtest-death-test-internal.h | 1 - googletest/include/gtest/internal/gtest-filepath.h | 1 - googletest/include/gtest/internal/gtest-internal.h | 1 - googletest/include/gtest/internal/gtest-linked_ptr.h | 2 -- googletest/include/gtest/internal/gtest-param-util-generated.h | 3 +-- googletest/include/gtest/internal/gtest-param-util-generated.h.pump | 3 +-- googletest/include/gtest/internal/gtest-param-util.h | 3 +-- googletest/include/gtest/internal/gtest-port.h | 2 -- googletest/include/gtest/internal/gtest-string.h | 1 - googletest/include/gtest/internal/gtest-tuple.h | 3 +-- googletest/include/gtest/internal/gtest-tuple.h.pump | 3 +-- googletest/include/gtest/internal/gtest-type-util.h | 3 +-- googletest/include/gtest/internal/gtest-type-util.h.pump | 3 +-- googletest/samples/prime_tables.h | 5 ++--- googletest/samples/sample1.cc | 2 -- googletest/samples/sample1.h | 2 -- googletest/samples/sample10_unittest.cc | 3 +-- googletest/samples/sample1_unittest.cc | 3 --- googletest/samples/sample2.cc | 2 -- googletest/samples/sample2.h | 2 -- googletest/samples/sample2_unittest.cc | 3 --- googletest/samples/sample3-inl.h | 2 -- googletest/samples/sample3_unittest.cc | 3 --- googletest/samples/sample4.cc | 2 -- googletest/samples/sample4.h | 3 --- googletest/samples/sample4_unittest.cc | 3 +-- googletest/samples/sample5_unittest.cc | 3 +-- googletest/samples/sample6_unittest.cc | 3 +-- googletest/samples/sample7_unittest.cc | 3 +-- googletest/samples/sample8_unittest.cc | 3 +-- googletest/samples/sample9_unittest.cc | 3 +-- googletest/src/gtest-all.cc | 3 +-- googletest/src/gtest-death-test.cc | 3 +-- googletest/src/gtest-internal-inl.h | 5 +---- googletest/src/gtest-port.cc | 3 +-- googletest/src/gtest-printers.cc | 3 +-- googletest/src/gtest-test-part.cc | 3 +-- googletest/src/gtest-typed-test.cc | 3 +-- googletest/src/gtest.cc | 3 +-- googletest/src/gtest_main.cc | 1 - googletest/test/googletest-break-on-failure-unittest_.cc | 3 +-- googletest/test/googletest-catch-exceptions-test_.cc | 3 +-- googletest/test/googletest-color-test_.cc | 3 +-- googletest/test/googletest-death-test-test.cc | 3 +-- googletest/test/googletest-death-test_ex_test.cc | 3 +-- googletest/test/googletest-env-var-test_.cc | 3 +-- googletest/test/googletest-filepath-test.cc | 1 - googletest/test/googletest-filter-unittest_.cc | 3 +-- googletest/test/googletest-linked-ptr-test.cc | 3 --- googletest/test/googletest-list-tests-unittest_.cc | 3 +-- googletest/test/googletest-listener-test.cc | 3 +-- googletest/test/googletest-message-test.cc | 3 +-- googletest/test/googletest-options-test.cc | 1 - googletest/test/googletest-output-test_.cc | 2 -- googletest/test/googletest-param-test-invalid-name1-test_.cc | 3 +-- googletest/test/googletest-param-test-invalid-name2-test_.cc | 3 +-- googletest/test/googletest-param-test-test.cc | 3 +-- googletest/test/googletest-param-test-test.h | 2 -- googletest/test/googletest-param-test2-test.cc | 3 +-- googletest/test/googletest-port-test.cc | 2 -- googletest/test/googletest-printers-test.cc | 3 +-- googletest/test/googletest-shuffle-test_.cc | 3 +-- googletest/test/googletest-test-part-test.cc | 3 --- googletest/test/googletest-test2_test.cc | 3 +-- googletest/test/googletest-throw-on-failure-test_.cc | 3 +-- googletest/test/googletest-tuple-test.cc | 3 +-- googletest/test/googletest-uninitialized-test_.cc | 3 +-- googletest/test/gtest-typed-test2_test.cc | 3 +-- googletest/test/gtest-typed-test_test.cc | 3 +-- googletest/test/gtest-typed-test_test.h | 3 +-- googletest/test/gtest-unittest-api_test.cc | 3 +-- googletest/test/gtest_all_test.cc | 3 +-- googletest/test/gtest_assert_by_exception_test.cc | 3 +-- googletest/test/gtest_environment_test.cc | 3 +-- googletest/test/gtest_help_test_.cc | 3 +-- googletest/test/gtest_main_unittest.cc | 3 +-- googletest/test/gtest_no_test_unittest.cc | 2 -- googletest/test/gtest_premature_exit_test.cc | 3 +-- googletest/test/gtest_prod_test.cc | 3 +-- googletest/test/gtest_repeat_test.cc | 3 +-- googletest/test/gtest_sole_header_test.cc | 3 +-- googletest/test/gtest_stress_test.cc | 3 +-- googletest/test/gtest_test_macro_stack_footprint_test.cc | 3 +-- googletest/test/gtest_testbridge_test_.cc | 3 +-- googletest/test/gtest_throw_on_failure_ex_test.cc | 3 +-- googletest/test/gtest_unittest.cc | 3 +-- googletest/test/gtest_xml_outfile1_test_.cc | 1 - googletest/test/gtest_xml_outfile2_test_.cc | 1 - googletest/test/production.cc | 3 +-- googletest/test/production.h | 3 +-- 144 files changed, 115 insertions(+), 289 deletions(-) diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 42648ad..b82313d 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-cardinalities.h b/googlemock/include/gmock/gmock-cardinalities.h index 2ce16af..bf3ae55 100644 --- a/googlemock/include/gmock/gmock-cardinalities.h +++ b/googlemock/include/gmock/gmock-cardinalities.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-generated-actions.h b/googlemock/include/gmock/gmock-generated-actions.h index cd3a102..260036d 100644 --- a/googlemock/include/gmock/gmock-generated-actions.h +++ b/googlemock/include/gmock/gmock-generated-actions.h @@ -30,8 +30,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-generated-actions.h.pump b/googlemock/include/gmock/gmock-generated-actions.h.pump index 9db68d9..f1ee4a6 100644 --- a/googlemock/include/gmock/gmock-generated-actions.h.pump +++ b/googlemock/include/gmock/gmock-generated-actions.h.pump @@ -32,8 +32,7 @@ $$}} This meta comment fixes auto-indentation in editors. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-generated-function-mockers.h b/googlemock/include/gmock/gmock-generated-function-mockers.h index 0474c89..5792d3d 100644 --- a/googlemock/include/gmock/gmock-generated-function-mockers.h +++ b/googlemock/include/gmock/gmock-generated-function-mockers.h @@ -30,8 +30,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-generated-function-mockers.h.pump b/googlemock/include/gmock/gmock-generated-function-mockers.h.pump index f6e1781..82f9512 100644 --- a/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +++ b/googlemock/include/gmock/gmock-generated-function-mockers.h.pump @@ -31,8 +31,7 @@ $var n = 10 $$ The maximum arity we support. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-generated-nice-strict.h b/googlemock/include/gmock/gmock-generated-nice-strict.h index 96d6f39..91ba1d9 100644 --- a/googlemock/include/gmock/gmock-generated-nice-strict.h +++ b/googlemock/include/gmock/gmock-generated-nice-strict.h @@ -30,8 +30,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Implements class templates NiceMock, NaggyMock, and StrictMock. // diff --git a/googlemock/include/gmock/gmock-generated-nice-strict.h.pump b/googlemock/include/gmock/gmock-generated-nice-strict.h.pump index 7c2bf36..ed49f4a 100644 --- a/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +++ b/googlemock/include/gmock/gmock-generated-nice-strict.h.pump @@ -31,8 +31,7 @@ $var n = 10 $$ The maximum arity we support. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Implements class templates NiceMock, NaggyMock, and StrictMock. // diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index adf4999..490f3a4 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-more-actions.h b/googlemock/include/gmock/gmock-more-actions.h index 1106818..4d9a28e 100644 --- a/googlemock/include/gmock/gmock-more-actions.h +++ b/googlemock/include/gmock/gmock-more-actions.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-more-matchers.h b/googlemock/include/gmock/gmock-more-matchers.h index 6c6b3e3..e5460e7 100644 --- a/googlemock/include/gmock/gmock-more-matchers.h +++ b/googlemock/include/gmock/gmock-more-matchers.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: marcus.boerger@google.com (Marcus Boerger) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index 9670b59..f49d01f 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/gmock.h b/googlemock/include/gmock/gmock.h index 6330294..dd96226 100644 --- a/googlemock/include/gmock/gmock.h +++ b/googlemock/include/gmock/gmock.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/internal/gmock-generated-internal-utils.h b/googlemock/include/gmock/internal/gmock-generated-internal-utils.h index c9bfbc8..eaa56be 100644 --- a/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-generated-internal-utils.h @@ -30,8 +30,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump b/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump index f13151b..c103279 100644 --- a/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +++ b/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump @@ -31,8 +31,7 @@ $var n = 10 $$ The maximum arity we support. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index e0846d9..b020f89 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/include/gmock/internal/gmock-port.h b/googlemock/include/gmock/internal/gmock-port.h index 79f4366..fda27db 100644 --- a/googlemock/include/gmock/internal/gmock-port.h +++ b/googlemock/include/gmock/internal/gmock-port.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vadimb@google.com (Vadim Berman) + // // Low-level types and utilities for porting Google Mock to various // platforms. All macros ending with _ and symbols defined in an diff --git a/googlemock/src/gmock-all.cc b/googlemock/src/gmock-all.cc index 7aebce7..e43c9b7 100644 --- a/googlemock/src/gmock-all.cc +++ b/googlemock/src/gmock-all.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Google C++ Mocking Framework (Google Mock) // diff --git a/googlemock/src/gmock-cardinalities.cc b/googlemock/src/gmock-cardinalities.cc index 335b966..0549f72 100644 --- a/googlemock/src/gmock-cardinalities.cc +++ b/googlemock/src/gmock-cardinalities.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc index 77caf2b..e3a6748 100644 --- a/googlemock/src/gmock-internal-utils.cc +++ b/googlemock/src/gmock-internal-utils.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/src/gmock-matchers.cc b/googlemock/src/gmock-matchers.cc index 194d992..f8ddff1 100644 --- a/googlemock/src/gmock-matchers.cc +++ b/googlemock/src/gmock-matchers.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index 22d002f..83cc9cc 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/src/gmock.cc b/googlemock/src/gmock.cc index 2308168..1cebede 100644 --- a/googlemock/src/gmock.cc +++ b/googlemock/src/gmock.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "gmock/gmock.h" #include "gmock/internal/gmock-port.h" diff --git a/googlemock/src/gmock_main.cc b/googlemock/src/gmock_main.cc index 32ab534..a3a271e 100644 --- a/googlemock/src/gmock_main.cc +++ b/googlemock/src/gmock_main.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include #include "gmock/gmock.h" diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index e8bdbee..e216fe2 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-cardinalities_test.cc b/googlemock/test/gmock-cardinalities_test.cc index 04c792b..132591b 100644 --- a/googlemock/test/gmock-cardinalities_test.cc +++ b/googlemock/test/gmock-cardinalities_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-generated-actions_test.cc b/googlemock/test/gmock-generated-actions_test.cc index 40bbe6d..a460280 100644 --- a/googlemock/test/gmock-generated-actions_test.cc +++ b/googlemock/test/gmock-generated-actions_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-generated-function-mockers_test.cc b/googlemock/test/gmock-generated-function-mockers_test.cc index 0ff3755..f16833b 100644 --- a/googlemock/test/gmock-generated-function-mockers_test.cc +++ b/googlemock/test/gmock-generated-function-mockers_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-generated-internal-utils_test.cc b/googlemock/test/gmock-generated-internal-utils_test.cc index 2e5abe5..ae0280f 100644 --- a/googlemock/test/gmock-generated-internal-utils_test.cc +++ b/googlemock/test/gmock-generated-internal-utils_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc index f8633df..5f53077 100644 --- a/googlemock/test/gmock-internal-utils_test.cc +++ b/googlemock/test/gmock-internal-utils_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index 9f1a547..d08f08f 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-more-actions_test.cc b/googlemock/test/gmock-more-actions_test.cc index b13518a..08a2df0 100644 --- a/googlemock/test/gmock-more-actions_test.cc +++ b/googlemock/test/gmock-more-actions_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index c419494..dce6642 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "gmock/gmock-generated-nice-strict.h" diff --git a/googlemock/test/gmock-port_test.cc b/googlemock/test/gmock-port_test.cc index d6a8d44..a2c2be2 100644 --- a/googlemock/test/gmock-port_test.cc +++ b/googlemock/test/gmock-port_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index 715aac8..78fbc3f 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_all_test.cc b/googlemock/test/gmock_all_test.cc index 56d6c49..e1774fb 100644 --- a/googlemock/test/gmock_all_test.cc +++ b/googlemock/test/gmock_all_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Tests for Google C++ Mocking Framework (Google Mock) // diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc index b03de82..72eb43f 100644 --- a/googlemock/test/gmock_ex_test.cc +++ b/googlemock/test/gmock_ex_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests Google Mock's functionality that depends on exceptions. diff --git a/googlemock/test/gmock_leak_test_.cc b/googlemock/test/gmock_leak_test_.cc index 1d27d22..2e095ab 100644 --- a/googlemock/test/gmock_leak_test_.cc +++ b/googlemock/test/gmock_leak_test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_link2_test.cc b/googlemock/test/gmock_link2_test.cc index 2b48395..d27ce17 100644 --- a/googlemock/test/gmock_link2_test.cc +++ b/googlemock/test/gmock_link2_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_link_test.cc b/googlemock/test/gmock_link_test.cc index ef041be..e7c54cc 100644 --- a/googlemock/test/gmock_link_test.cc +++ b/googlemock/test/gmock_link_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_link_test.h b/googlemock/test/gmock_link_test.h index 06a1cf8..d26670e 100644 --- a/googlemock/test/gmock_link_test.h +++ b/googlemock/test/gmock_link_test.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googlemock/test/gmock_output_test_.cc b/googlemock/test/gmock_output_test_.cc index 1b59eb3..3955c73 100644 --- a/googlemock/test/gmock_output_test_.cc +++ b/googlemock/test/gmock_output_test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests Google Mock's output in various scenarios. This ensures that // Google Mock's messages are readable and useful. diff --git a/googlemock/test/gmock_stress_test.cc b/googlemock/test/gmock_stress_test.cc index e4e61f0..0d99bed 100644 --- a/googlemock/test/gmock_stress_test.cc +++ b/googlemock/test/gmock_stress_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests that Google Mock constructs can be used in a large number of // threads concurrently. diff --git a/googlemock/test/gmock_test.cc b/googlemock/test/gmock_test.cc index 7007567..341a17d 100644 --- a/googlemock/test/gmock_test.cc +++ b/googlemock/test/gmock_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Mock - a framework for writing C++ mock classes. // diff --git a/googletest/include/gtest/gtest-death-test.h b/googletest/include/gtest/gtest-death-test.h index 59795e3..06fe42e 100644 --- a/googletest/include/gtest/gtest-death-test.h +++ b/googletest/include/gtest/gtest-death-test.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // The Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/include/gtest/gtest-message.h b/googletest/include/gtest/gtest-message.h index 3e3870c..107a55c 100644 --- a/googletest/include/gtest/gtest-message.h +++ b/googletest/include/gtest/gtest-message.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // The Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/include/gtest/gtest-param-test.h b/googletest/include/gtest/gtest-param-test.h index 3ea3338..1e22f68 100644 --- a/googletest/include/gtest/gtest-param-test.h +++ b/googletest/include/gtest/gtest-param-test.h @@ -31,8 +31,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Authors: vladl@google.com (Vlad Losev) -// // Macros and functions for implementing parameterized tests // in Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/include/gtest/gtest-param-test.h.pump b/googletest/include/gtest/gtest-param-test.h.pump index 4dac9f2..274f2b3 100644 --- a/googletest/include/gtest/gtest-param-test.h.pump +++ b/googletest/include/gtest/gtest-param-test.h.pump @@ -30,8 +30,6 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Authors: vladl@google.com (Vlad Losev) -// // Macros and functions for implementing parameterized tests // in Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index 57eb5ae..f4accac 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Test - The Google C++ Testing and Mocking Framework // diff --git a/googletest/include/gtest/gtest-spi.h b/googletest/include/gtest/gtest-spi.h index c21b029..26b4aa5 100644 --- a/googletest/include/gtest/gtest-spi.h +++ b/googletest/include/gtest/gtest-spi.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Utilities for testing Google Test itself and code that uses Google Test // (e.g. frameworks built on top of Google Test). diff --git a/googletest/include/gtest/gtest-test-part.h b/googletest/include/gtest/gtest-test-part.h index 301a012..66c7db6 100644 --- a/googletest/include/gtest/gtest-test-part.h +++ b/googletest/include/gtest/gtest-test-part.h @@ -27,9 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Author: mheule@google.com (Markus Heule) -// - // GOOGLETEST_CM0001 DO NOT DELETE #ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ diff --git a/googletest/include/gtest/gtest-typed-test.h b/googletest/include/gtest/gtest-typed-test.h index 00925af..61d8907 100644 --- a/googletest/include/gtest/gtest-typed-test.h +++ b/googletest/include/gtest/gtest-typed-test.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // GOOGLETEST_CM0001 DO NOT DELETE diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index a6c674b..f374c59 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // The Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/include/gtest/gtest_prod.h b/googletest/include/gtest/gtest_prod.h index 71377f8..e651671 100644 --- a/googletest/include/gtest/gtest_prod.h +++ b/googletest/include/gtest/gtest_prod.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Google C++ Testing and Mocking Framework definitions useful in production code. // GOOGLETEST_CM0003 DO NOT DELETE diff --git a/googletest/include/gtest/internal/gtest-death-test-internal.h b/googletest/include/gtest/internal/gtest-death-test-internal.h index 719aee6..55e3029 100644 --- a/googletest/include/gtest/internal/gtest-death-test-internal.h +++ b/googletest/include/gtest/internal/gtest-death-test-internal.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// // The Google C++ Testing and Mocking Framework (Google Test) // // This header file defines internal utilities needed for implementing diff --git a/googletest/include/gtest/internal/gtest-filepath.h b/googletest/include/gtest/internal/gtest-filepath.h index e18fe45..c2601a3 100644 --- a/googletest/include/gtest/internal/gtest-filepath.h +++ b/googletest/include/gtest/internal/gtest-filepath.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// // Google Test filepath utilities // // This header file declares classes and functions used internally by diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 45192e2..aa36693 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// // The Google C++ Testing and Mocking Framework (Google Test) // // This header file declares functions and macros used internally by diff --git a/googletest/include/gtest/internal/gtest-linked_ptr.h b/googletest/include/gtest/internal/gtest-linked_ptr.h index 8e1caa0..fa2c3b3 100644 --- a/googletest/include/gtest/internal/gtest-linked_ptr.h +++ b/googletest/include/gtest/internal/gtest-linked_ptr.h @@ -27,8 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Authors: Dan Egnor (egnor@google.com) -// // A "smart" pointer type with reference tracking. Every pointer to a // particular object is kept on a circular linked list. When the last pointer // to an object is destroyed or reassigned, the object is deleted. diff --git a/googletest/include/gtest/internal/gtest-param-util-generated.h b/googletest/include/gtest/internal/gtest-param-util-generated.h index ef22e89..f4df599 100644 --- a/googletest/include/gtest/internal/gtest-param-util-generated.h +++ b/googletest/include/gtest/internal/gtest-param-util-generated.h @@ -30,8 +30,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // Type and function utilities for implementing parameterized tests. // This file is generated by a SCRIPT. DO NOT EDIT BY HAND! diff --git a/googletest/include/gtest/internal/gtest-param-util-generated.h.pump b/googletest/include/gtest/internal/gtest-param-util-generated.h.pump index 856caba..ae8c57b 100644 --- a/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +++ b/googletest/include/gtest/internal/gtest-param-util-generated.h.pump @@ -29,8 +29,7 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // Type and function utilities for implementing parameterized tests. // This file is generated by a SCRIPT. DO NOT EDIT BY HAND! diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h index a69d5de..d64f620 100644 --- a/googletest/include/gtest/internal/gtest-param-util.h +++ b/googletest/include/gtest/internal/gtest-param-util.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // Type and function utilities for implementing parameterized tests. diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 9afa1ff..5d96a05 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -27,8 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Authors: wan@google.com (Zhanyong Wan) -// // Low-level types and utilities for porting Google Test to various // platforms. All macros ending with _ and symbols defined in an // internal namespace are subject to change without notice. Code diff --git a/googletest/include/gtest/internal/gtest-string.h b/googletest/include/gtest/internal/gtest-string.h index 1d2436c..4c9b626 100644 --- a/googletest/include/gtest/internal/gtest-string.h +++ b/googletest/include/gtest/internal/gtest-string.h @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// // The Google C++ Testing and Mocking Framework (Google Test) // // This header file declares the String class and functions used internally by diff --git a/googletest/include/gtest/internal/gtest-tuple.h b/googletest/include/gtest/internal/gtest-tuple.h index e64cede..89748cc 100644 --- a/googletest/include/gtest/internal/gtest-tuple.h +++ b/googletest/include/gtest/internal/gtest-tuple.h @@ -30,8 +30,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Implements a subset of TR1 tuple needed by Google Test and Google Mock. diff --git a/googletest/include/gtest/internal/gtest-tuple.h.pump b/googletest/include/gtest/internal/gtest-tuple.h.pump index 2736360..a08bf70 100644 --- a/googletest/include/gtest/internal/gtest-tuple.h.pump +++ b/googletest/include/gtest/internal/gtest-tuple.h.pump @@ -29,8 +29,7 @@ $$ This meta comment fixes auto-indentation in Emacs. }} // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Implements a subset of TR1 tuple needed by Google Test and Google Mock. diff --git a/googletest/include/gtest/internal/gtest-type-util.h b/googletest/include/gtest/internal/gtest-type-util.h index 2681dbb..28e4112 100644 --- a/googletest/include/gtest/internal/gtest-type-util.h +++ b/googletest/include/gtest/internal/gtest-type-util.h @@ -30,8 +30,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Type utilities needed for implementing typed and type-parameterized // tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! diff --git a/googletest/include/gtest/internal/gtest-type-util.h.pump b/googletest/include/gtest/internal/gtest-type-util.h.pump index 8897795..0001a5d 100644 --- a/googletest/include/gtest/internal/gtest-type-util.h.pump +++ b/googletest/include/gtest/internal/gtest-type-util.h.pump @@ -28,8 +28,7 @@ $var n = 50 $$ Maximum length of type lists we want to support. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Type utilities needed for implementing typed and type-parameterized // tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! diff --git a/googletest/samples/prime_tables.h b/googletest/samples/prime_tables.h index 55a3b44..523c50b 100644 --- a/googletest/samples/prime_tables.h +++ b/googletest/samples/prime_tables.h @@ -26,9 +26,8 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) -// Author: vladl@google.com (Vlad Losev) + + // This provides interface PrimeTable that determines whether a number is a // prime and determines a next prime number. This interface is used diff --git a/googletest/samples/sample1.cc b/googletest/samples/sample1.cc index 7c08b28..13cec1d 100644 --- a/googletest/samples/sample1.cc +++ b/googletest/samples/sample1.cc @@ -28,8 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) #include "sample1.h" diff --git a/googletest/samples/sample1.h b/googletest/samples/sample1.h index 3dfeb98..2c3e9f0 100644 --- a/googletest/samples/sample1.h +++ b/googletest/samples/sample1.h @@ -28,8 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) #ifndef GTEST_SAMPLES_SAMPLE1_H_ #define GTEST_SAMPLES_SAMPLE1_H_ diff --git a/googletest/samples/sample10_unittest.cc b/googletest/samples/sample10_unittest.cc index 10aa762..7ce9550 100644 --- a/googletest/samples/sample10_unittest.cc +++ b/googletest/samples/sample10_unittest.cc @@ -25,8 +25,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // This sample shows how to use Google Test listener API to implement // a primitive leak checker. diff --git a/googletest/samples/sample1_unittest.cc b/googletest/samples/sample1_unittest.cc index 8376bb4..cb08b61 100644 --- a/googletest/samples/sample1_unittest.cc +++ b/googletest/samples/sample1_unittest.cc @@ -28,9 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - // This sample shows how to write a simple unit test for a function, // using Google C++ testing framework. diff --git a/googletest/samples/sample2.cc b/googletest/samples/sample2.cc index 5f763b9..f3b722f 100644 --- a/googletest/samples/sample2.cc +++ b/googletest/samples/sample2.cc @@ -28,8 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) #include "sample2.h" diff --git a/googletest/samples/sample2.h b/googletest/samples/sample2.h index cb485c7..58f360f 100644 --- a/googletest/samples/sample2.h +++ b/googletest/samples/sample2.h @@ -28,8 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) #ifndef GTEST_SAMPLES_SAMPLE2_H_ #define GTEST_SAMPLES_SAMPLE2_H_ diff --git a/googletest/samples/sample2_unittest.cc b/googletest/samples/sample2_unittest.cc index df522da..0848826 100644 --- a/googletest/samples/sample2_unittest.cc +++ b/googletest/samples/sample2_unittest.cc @@ -28,9 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - // This sample shows how to write a more complex unit test for a class // that has multiple member functions. diff --git a/googletest/samples/sample3-inl.h b/googletest/samples/sample3-inl.h index 7e3084d..1a29ce9 100644 --- a/googletest/samples/sample3-inl.h +++ b/googletest/samples/sample3-inl.h @@ -28,8 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) #ifndef GTEST_SAMPLES_SAMPLE3_INL_H_ #define GTEST_SAMPLES_SAMPLE3_INL_H_ diff --git a/googletest/samples/sample3_unittest.cc b/googletest/samples/sample3_unittest.cc index 7f51fd8..e093c25 100644 --- a/googletest/samples/sample3_unittest.cc +++ b/googletest/samples/sample3_unittest.cc @@ -28,9 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - // In this example, we use a more advanced feature of Google Test called // test fixture. diff --git a/googletest/samples/sample4.cc b/googletest/samples/sample4.cc index ae44bda..2f7c87a 100644 --- a/googletest/samples/sample4.cc +++ b/googletest/samples/sample4.cc @@ -28,8 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) #include diff --git a/googletest/samples/sample4.h b/googletest/samples/sample4.h index cd60f0d..fda5f33 100644 --- a/googletest/samples/sample4.h +++ b/googletest/samples/sample4.h @@ -28,9 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - #ifndef GTEST_SAMPLES_SAMPLE4_H_ #define GTEST_SAMPLES_SAMPLE4_H_ diff --git a/googletest/samples/sample4_unittest.cc b/googletest/samples/sample4_unittest.cc index 7bf9ea3..079a70d 100644 --- a/googletest/samples/sample4_unittest.cc +++ b/googletest/samples/sample4_unittest.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "sample4.h" #include "gtest/gtest.h" diff --git a/googletest/samples/sample5_unittest.cc b/googletest/samples/sample5_unittest.cc index 401a58a..d8a8788 100644 --- a/googletest/samples/sample5_unittest.cc +++ b/googletest/samples/sample5_unittest.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // This sample teaches how to reuse a test fixture in multiple test // cases by deriving sub-fixtures from it. diff --git a/googletest/samples/sample6_unittest.cc b/googletest/samples/sample6_unittest.cc index 1faf0c3..ddf2f1c 100644 --- a/googletest/samples/sample6_unittest.cc +++ b/googletest/samples/sample6_unittest.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // This sample shows how to test common properties of multiple // implementations of the same interface (aka interface tests). diff --git a/googletest/samples/sample7_unittest.cc b/googletest/samples/sample7_unittest.cc index efa9728..c1ae8bd 100644 --- a/googletest/samples/sample7_unittest.cc +++ b/googletest/samples/sample7_unittest.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // This sample shows how to test common properties of multiple // implementations of an interface (aka interface tests) using diff --git a/googletest/samples/sample8_unittest.cc b/googletest/samples/sample8_unittest.cc index b0ff2d1..ce75cf0 100644 --- a/googletest/samples/sample8_unittest.cc +++ b/googletest/samples/sample8_unittest.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // This sample shows how to test code relying on some global flag variables. // Combine() helps with generating all possible combinations of such flags, diff --git a/googletest/samples/sample9_unittest.cc b/googletest/samples/sample9_unittest.cc index 75584bb..53f9af5 100644 --- a/googletest/samples/sample9_unittest.cc +++ b/googletest/samples/sample9_unittest.cc @@ -25,8 +25,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // This sample shows how to use Google Test listener API to implement // an alternative console output and how to use the UnitTest reflection API diff --git a/googletest/src/gtest-all.cc b/googletest/src/gtest-all.cc index 5872a2e..b217a18 100644 --- a/googletest/src/gtest-all.cc +++ b/googletest/src/gtest-all.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) + // // Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 4da66c0..97dbffc 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan), vladl@google.com (Vlad Losev) + // // This file implements death tests. diff --git a/googletest/src/gtest-internal-inl.h b/googletest/src/gtest-internal-inl.h index c5a4265..f7ed9a1 100644 --- a/googletest/src/gtest-internal-inl.h +++ b/googletest/src/gtest-internal-inl.h @@ -27,10 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Utility functions and classes used by the Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) -// +// Utility functions and classes used by the Google C++ testing framework.// // This file contains purely Google Test's internal implementation. Please // DO NOT #INCLUDE IT IN A USER PROGRAM. diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index 71942e5..0b49193 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "gtest/internal/gtest-port.h" diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc index eeba17f..d68d929 100644 --- a/googletest/src/gtest-printers.cc +++ b/googletest/src/gtest-printers.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Test - The Google C++ Testing and Mocking Framework // diff --git a/googletest/src/gtest-test-part.cc b/googletest/src/gtest-test-part.cc index 4c5f2e3..c88860d 100644 --- a/googletest/src/gtest-test-part.cc +++ b/googletest/src/gtest-test-part.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) + // // The Google C++ Testing and Mocking Framework (Google Test) diff --git a/googletest/src/gtest-typed-test.cc b/googletest/src/gtest-typed-test.cc index b358243..1dc2ad3 100644 --- a/googletest/src/gtest-typed-test.cc +++ b/googletest/src/gtest-typed-test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "gtest/gtest-typed-test.h" diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 691d644..37e5b1f 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // The Google C++ Testing and Mocking Framework (Google Test) diff --git a/googletest/src/gtest_main.cc b/googletest/src/gtest_main.cc index f039d00..2113f62 100644 --- a/googletest/src/gtest_main.cc +++ b/googletest/src/gtest_main.cc @@ -26,7 +26,6 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// #include #include "gtest/gtest.h" diff --git a/googletest/test/googletest-break-on-failure-unittest_.cc b/googletest/test/googletest-break-on-failure-unittest_.cc index 1231ec2..f84957a 100644 --- a/googletest/test/googletest-break-on-failure-unittest_.cc +++ b/googletest/test/googletest-break-on-failure-unittest_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Unit test for Google Test's break-on-failure mode. // diff --git a/googletest/test/googletest-catch-exceptions-test_.cc b/googletest/test/googletest-catch-exceptions-test_.cc index af2676b..09dae70 100644 --- a/googletest/test/googletest-catch-exceptions-test_.cc +++ b/googletest/test/googletest-catch-exceptions-test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // // Tests for Google Test itself. Tests in this file throw C++ or SEH // exceptions, and the output is verified by diff --git a/googletest/test/googletest-color-test_.cc b/googletest/test/googletest-color-test_.cc index f9a21e2..220a3a0 100644 --- a/googletest/test/googletest-color-test_.cc +++ b/googletest/test/googletest-color-test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // A helper program for testing how Google Test determines whether to use // colors in the output. It prints "YES" and returns 1 if Google Test diff --git a/googletest/test/googletest-death-test-test.cc b/googletest/test/googletest-death-test-test.cc index 9d8f13c..0699029 100644 --- a/googletest/test/googletest-death-test-test.cc +++ b/googletest/test/googletest-death-test-test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Tests for death tests. diff --git a/googletest/test/googletest-death-test_ex_test.cc b/googletest/test/googletest-death-test_ex_test.cc index 3391074..b8b9470 100644 --- a/googletest/test/googletest-death-test_ex_test.cc +++ b/googletest/test/googletest-death-test_ex_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // // Tests that verify interaction of exceptions and death tests. diff --git a/googletest/test/googletest-env-var-test_.cc b/googletest/test/googletest-env-var-test_.cc index 4fba7a6..fd2aa82 100644 --- a/googletest/test/googletest-env-var-test_.cc +++ b/googletest/test/googletest-env-var-test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // A helper program for testing that Google Test parses the environment // variables correctly. diff --git a/googletest/test/googletest-filepath-test.cc b/googletest/test/googletest-filepath-test.cc index 29cea3d..e832666 100644 --- a/googletest/test/googletest-filepath-test.cc +++ b/googletest/test/googletest-filepath-test.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// // Google Test filepath utilities // // This file tests classes and functions used internally by diff --git a/googletest/test/googletest-filter-unittest_.cc b/googletest/test/googletest-filter-unittest_.cc index e74a7a3..d335b60 100644 --- a/googletest/test/googletest-filter-unittest_.cc +++ b/googletest/test/googletest-filter-unittest_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Unit test for Google Test test filters. // diff --git a/googletest/test/googletest-linked-ptr-test.cc b/googletest/test/googletest-linked-ptr-test.cc index d80ac1e..fa00f34 100644 --- a/googletest/test/googletest-linked-ptr-test.cc +++ b/googletest/test/googletest-linked-ptr-test.cc @@ -26,9 +26,6 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Authors: Dan Egnor (egnor@google.com) -// Ported to Windows: Vadim Berman (vadimb@google.com) #include diff --git a/googletest/test/googletest-list-tests-unittest_.cc b/googletest/test/googletest-list-tests-unittest_.cc index 907c176..f473c7d 100644 --- a/googletest/test/googletest-list-tests-unittest_.cc +++ b/googletest/test/googletest-list-tests-unittest_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: phanna@google.com (Patrick Hanna) + // Unit test for Google Test's --gtest_list_tests flag. // diff --git a/googletest/test/googletest-listener-test.cc b/googletest/test/googletest-listener-test.cc index b01417a..8355597 100644 --- a/googletest/test/googletest-listener-test.cc +++ b/googletest/test/googletest-listener-test.cc @@ -25,8 +25,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // // The Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/test/googletest-message-test.cc b/googletest/test/googletest-message-test.cc index 175238e..c644585 100644 --- a/googletest/test/googletest-message-test.cc +++ b/googletest/test/googletest-message-test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Tests for the Message class. diff --git a/googletest/test/googletest-options-test.cc b/googletest/test/googletest-options-test.cc index e4c0d04..e426ce2 100644 --- a/googletest/test/googletest-options-test.cc +++ b/googletest/test/googletest-options-test.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// // Google Test UnitTestOptions tests // // This file tests classes and functions used internally by diff --git a/googletest/test/googletest-output-test_.cc b/googletest/test/googletest-output-test_.cc index 29fc993..3860cf4 100644 --- a/googletest/test/googletest-output-test_.cc +++ b/googletest/test/googletest-output-test_.cc @@ -32,8 +32,6 @@ // googletest-output-test.py to ensure that Google Test generates the // desired messages. Therefore, most tests in this file are MEANT TO // FAIL. -// -// Author: wan@google.com (Zhanyong Wan) #include "gtest/gtest-spi.h" #include "gtest/gtest.h" diff --git a/googletest/test/googletest-param-test-invalid-name1-test_.cc b/googletest/test/googletest-param-test-invalid-name1-test_.cc index 68dd470..5a95155 100644 --- a/googletest/test/googletest-param-test-invalid-name1-test_.cc +++ b/googletest/test/googletest-param-test-invalid-name1-test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: jmadill@google.com (Jamie Madill) + #include "gtest/gtest.h" diff --git a/googletest/test/googletest-param-test-invalid-name2-test_.cc b/googletest/test/googletest-param-test-invalid-name2-test_.cc index 9a8ec4e..ef09349 100644 --- a/googletest/test/googletest-param-test-invalid-name2-test_.cc +++ b/googletest/test/googletest-param-test-invalid-name2-test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: jmadill@google.com (Jamie Madill) + #include "gtest/gtest.h" diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc index 893b132..d06b4df 100644 --- a/googletest/test/googletest-param-test-test.cc +++ b/googletest/test/googletest-param-test-test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // // Tests for Google Test itself. This file verifies that the parameter // generators objects produce correct parameter sequences and that diff --git a/googletest/test/googletest-param-test-test.h b/googletest/test/googletest-param-test-test.h index ea1e884..632a61f 100644 --- a/googletest/test/googletest-param-test-test.h +++ b/googletest/test/googletest-param-test-test.h @@ -27,8 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Authors: vladl@google.com (Vlad Losev) -// // The Google C++ Testing and Mocking Framework (Google Test) // // This header file provides classes and functions used internally diff --git a/googletest/test/googletest-param-test2-test.cc b/googletest/test/googletest-param-test2-test.cc index c562ff0..25bb945 100644 --- a/googletest/test/googletest-param-test2-test.cc +++ b/googletest/test/googletest-param-test2-test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // // Tests for Google Test itself. This verifies that the basic constructs of // Google Test work. diff --git a/googletest/test/googletest-port-test.cc b/googletest/test/googletest-port-test.cc index 32e893f..53afe93 100644 --- a/googletest/test/googletest-port-test.cc +++ b/googletest/test/googletest-port-test.cc @@ -27,8 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// Authors: vladl@google.com (Vlad Losev), wan@google.com (Zhanyong Wan) -// // This file tests the internal cross-platform support utilities. #include diff --git a/googletest/test/googletest-printers-test.cc b/googletest/test/googletest-printers-test.cc index e4bb0c2..ea8369d 100644 --- a/googletest/test/googletest-printers-test.cc +++ b/googletest/test/googletest-printers-test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Google Test - The Google C++ Testing and Mocking Framework // diff --git a/googletest/test/googletest-shuffle-test_.cc b/googletest/test/googletest-shuffle-test_.cc index 6fb441b..1fe5f6a 100644 --- a/googletest/test/googletest-shuffle-test_.cc +++ b/googletest/test/googletest-shuffle-test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Verifies that test shuffling works. diff --git a/googletest/test/googletest-test-part-test.cc b/googletest/test/googletest-test-part-test.cc index ca8ba93..34e8022 100644 --- a/googletest/test/googletest-test-part-test.cc +++ b/googletest/test/googletest-test-part-test.cc @@ -26,9 +26,6 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) -// #include "gtest/gtest-test-part.h" diff --git a/googletest/test/googletest-test2_test.cc b/googletest/test/googletest-test2_test.cc index 0a758c7..c2f98dc 100644 --- a/googletest/test/googletest-test2_test.cc +++ b/googletest/test/googletest-test2_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // // Tests for Google Test itself. This verifies that the basic constructs of // Google Test work. diff --git a/googletest/test/googletest-throw-on-failure-test_.cc b/googletest/test/googletest-throw-on-failure-test_.cc index 0617c27..f9a2c64 100644 --- a/googletest/test/googletest-throw-on-failure-test_.cc +++ b/googletest/test/googletest-throw-on-failure-test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests Google Test's throw-on-failure mode with exceptions disabled. // diff --git a/googletest/test/googletest-tuple-test.cc b/googletest/test/googletest-tuple-test.cc index bfaa3e0..dd82c16 100644 --- a/googletest/test/googletest-tuple-test.cc +++ b/googletest/test/googletest-tuple-test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "gtest/internal/gtest-tuple.h" #include diff --git a/googletest/test/googletest-uninitialized-test_.cc b/googletest/test/googletest-uninitialized-test_.cc index 2ba0e8b..b4434d5 100644 --- a/googletest/test/googletest-uninitialized-test_.cc +++ b/googletest/test/googletest-uninitialized-test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "gtest/gtest.h" diff --git a/googletest/test/gtest-typed-test2_test.cc b/googletest/test/gtest-typed-test2_test.cc index c284700..ed96421 100644 --- a/googletest/test/gtest-typed-test2_test.cc +++ b/googletest/test/gtest-typed-test2_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include diff --git a/googletest/test/gtest-typed-test_test.cc b/googletest/test/gtest-typed-test_test.cc index 93628ba..eddb52b 100644 --- a/googletest/test/gtest-typed-test_test.cc +++ b/googletest/test/gtest-typed-test_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "test/gtest-typed-test_test.h" diff --git a/googletest/test/gtest-typed-test_test.h b/googletest/test/gtest-typed-test_test.h index 41d7570..2cce67c 100644 --- a/googletest/test/gtest-typed-test_test.h +++ b/googletest/test/gtest-typed-test_test.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #ifndef GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ #define GTEST_TEST_GTEST_TYPED_TEST_TEST_H_ diff --git a/googletest/test/gtest-unittest-api_test.cc b/googletest/test/gtest-unittest-api_test.cc index 1ebd431..f3ea03a 100644 --- a/googletest/test/gtest-unittest-api_test.cc +++ b/googletest/test/gtest-unittest-api_test.cc @@ -25,8 +25,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: vladl@google.com (Vlad Losev) + // // The Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/test/gtest_all_test.cc b/googletest/test/gtest_all_test.cc index a9aba01..e61e36b 100644 --- a/googletest/test/gtest_all_test.cc +++ b/googletest/test/gtest_all_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Tests for Google C++ Testing and Mocking Framework (Google Test) // diff --git a/googletest/test/gtest_assert_by_exception_test.cc b/googletest/test/gtest_assert_by_exception_test.cc index 2f0e34a..8d74d60 100644 --- a/googletest/test/gtest_assert_by_exception_test.cc +++ b/googletest/test/gtest_assert_by_exception_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests Google Test's assert-by-exception mode with exceptions enabled. diff --git a/googletest/test/gtest_environment_test.cc b/googletest/test/gtest_environment_test.cc index 1d6dc12..bc9524d 100644 --- a/googletest/test/gtest_environment_test.cc +++ b/googletest/test/gtest_environment_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Tests using global test environments. diff --git a/googletest/test/gtest_help_test_.cc b/googletest/test/gtest_help_test_.cc index 31f78c2..750ae6c 100644 --- a/googletest/test/gtest_help_test_.cc +++ b/googletest/test/gtest_help_test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // This program is meant to be run by gtest_help_test.py. Do not run // it directly. diff --git a/googletest/test/gtest_main_unittest.cc b/googletest/test/gtest_main_unittest.cc index c979fce..eddedea 100644 --- a/googletest/test/gtest_main_unittest.cc +++ b/googletest/test/gtest_main_unittest.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + #include "gtest/gtest.h" diff --git a/googletest/test/gtest_no_test_unittest.cc b/googletest/test/gtest_no_test_unittest.cc index 292599a..d4f88db 100644 --- a/googletest/test/gtest_no_test_unittest.cc +++ b/googletest/test/gtest_no_test_unittest.cc @@ -29,8 +29,6 @@ // Tests that a Google Test program that has no test defined can run // successfully. -// -// Author: wan@google.com (Zhanyong Wan) #include "gtest/gtest.h" diff --git a/googletest/test/gtest_premature_exit_test.cc b/googletest/test/gtest_premature_exit_test.cc index 3b4dc7d..c1e9305 100644 --- a/googletest/test/gtest_premature_exit_test.cc +++ b/googletest/test/gtest_premature_exit_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Tests that Google Test manipulates the premature-exit-detection // file correctly. diff --git a/googletest/test/gtest_prod_test.cc b/googletest/test/gtest_prod_test.cc index c5cceab..ede81a0 100644 --- a/googletest/test/gtest_prod_test.cc +++ b/googletest/test/gtest_prod_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Unit test for gtest_prod.h. diff --git a/googletest/test/gtest_repeat_test.cc b/googletest/test/gtest_repeat_test.cc index 3171604..e2888a5 100644 --- a/googletest/test/gtest_repeat_test.cc +++ b/googletest/test/gtest_repeat_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests the --gtest_repeat=number flag. diff --git a/googletest/test/gtest_sole_header_test.cc b/googletest/test/gtest_sole_header_test.cc index ccd091a..1d94ac6 100644 --- a/googletest/test/gtest_sole_header_test.cc +++ b/googletest/test/gtest_sole_header_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: mheule@google.com (Markus Heule) + // // This test verifies that it's possible to use Google Test by including // the gtest.h header file alone. diff --git a/googletest/test/gtest_stress_test.cc b/googletest/test/gtest_stress_test.cc index cac405f..95ada39 100644 --- a/googletest/test/gtest_stress_test.cc +++ b/googletest/test/gtest_stress_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests that SCOPED_TRACE() and various Google Test assertions can be // used in a large number of threads concurrently. diff --git a/googletest/test/gtest_test_macro_stack_footprint_test.cc b/googletest/test/gtest_test_macro_stack_footprint_test.cc index 48958b8..a48db05 100644 --- a/googletest/test/gtest_test_macro_stack_footprint_test.cc +++ b/googletest/test/gtest_test_macro_stack_footprint_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Each TEST() expands to some static registration logic. GCC puts all // such static initialization logic for a translation unit in a common, diff --git a/googletest/test/gtest_testbridge_test_.cc b/googletest/test/gtest_testbridge_test_.cc index 0bb069e..24617b2 100644 --- a/googletest/test/gtest_testbridge_test_.cc +++ b/googletest/test/gtest_testbridge_test_.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: rfj@google.com (Rohan Joyce) + // This program is meant to be run by gtest_test_filter_test.py. Do not run // it directly. diff --git a/googletest/test/gtest_throw_on_failure_ex_test.cc b/googletest/test/gtest_throw_on_failure_ex_test.cc index 8d46c76..93f59d4 100644 --- a/googletest/test/gtest_throw_on_failure_ex_test.cc +++ b/googletest/test/gtest_throw_on_failure_ex_test.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // Tests Google Test's throw-on-failure mode with exceptions enabled. diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 033bc3a..f7acde2 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // Tests for Google Test itself. This verifies that the basic constructs of // Google Test work. diff --git a/googletest/test/gtest_xml_outfile1_test_.cc b/googletest/test/gtest_xml_outfile1_test_.cc index e3d1dd1..a38ebac 100644 --- a/googletest/test/gtest_xml_outfile1_test_.cc +++ b/googletest/test/gtest_xml_outfile1_test_.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// // gtest_xml_outfile1_test_ writes some xml via TestProperty used by // gtest_xml_outfiles_test.py diff --git a/googletest/test/gtest_xml_outfile2_test_.cc b/googletest/test/gtest_xml_outfile2_test_.cc index 55eb8f3..afaf15a 100644 --- a/googletest/test/gtest_xml_outfile2_test_.cc +++ b/googletest/test/gtest_xml_outfile2_test_.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -// // gtest_xml_outfile2_test_ writes some xml via TestProperty used by // gtest_xml_outfiles_test.py diff --git a/googletest/test/production.cc b/googletest/test/production.cc index 006bb97..0f69f6d 100644 --- a/googletest/test/production.cc +++ b/googletest/test/production.cc @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // This is part of the unit test for gtest_prod.h. diff --git a/googletest/test/production.h b/googletest/test/production.h index 0f01d83..542723b 100644 --- a/googletest/test/production.h +++ b/googletest/test/production.h @@ -26,8 +26,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: wan@google.com (Zhanyong Wan) + // // This is part of the unit test for gtest_prod.h. -- cgit v0.12 From 265efde9a5b35fbd23622620fa597822e122f38a Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 14 Aug 2018 15:04:11 -0400 Subject: Comments changes, no functionality changes. --- googlemock/include/gmock/gmock-matchers.h | 6 ++--- googlemock/include/gmock/gmock-spec-builders.h | 4 +-- .../include/gmock/internal/gmock-internal-utils.h | 2 +- googlemock/test/gmock-actions_test.cc | 2 +- googlemock/test/gmock-spec-builders_test.cc | 2 +- googlemock/test/gmock_leak_test.py | 2 -- googlemock/test/gmock_output_test.py | 2 -- googlemock/test/gmock_test_utils.py | 2 -- googletest/include/gtest/gtest-death-test.h | 2 +- googletest/include/gtest/gtest-printers.h | 2 +- googletest/include/gtest/gtest.h | 4 +-- .../include/gtest/internal/gtest-linked_ptr.h | 2 +- googletest/include/gtest/internal/gtest-port.h | 10 ++++---- googletest/include/gtest/internal/gtest-tuple.h | 2 +- .../include/gtest/internal/gtest-tuple.h.pump | 2 +- googletest/src/gtest-death-test.cc | 4 +-- googletest/src/gtest-filepath.cc | 4 +-- googletest/src/gtest-internal-inl.h | 2 +- googletest/src/gtest-port.cc | 6 ++--- googletest/src/gtest-printers.cc | 2 +- googletest/src/gtest.cc | 30 +++++++++++----------- .../test/googletest-break-on-failure-unittest.py | 2 -- .../test/googletest-catch-exceptions-test.py | 2 -- googletest/test/googletest-color-test.py | 2 -- googletest/test/googletest-death-test-test.cc | 2 +- googletest/test/googletest-env-var-test.py | 2 -- googletest/test/googletest-filepath-test.cc | 2 +- googletest/test/googletest-filter-unittest.py | 2 -- googletest/test/googletest-json-outfiles-test.py | 4 +-- googletest/test/googletest-list-tests-unittest.py | 2 -- googletest/test/googletest-options-test.cc | 2 +- googletest/test/googletest-output-test.py | 4 +-- .../googletest-param-test-invalid-name1-test.py | 2 -- .../googletest-param-test-invalid-name2-test.py | 2 -- googletest/test/googletest-param-test-test.cc | 2 +- googletest/test/googletest-port-test.cc | 2 +- googletest/test/googletest-shuffle-test.py | 2 -- googletest/test/googletest-test-part-test.cc | 2 +- .../test/googletest-throw-on-failure-test.py | 4 +-- googletest/test/googletest-uninitialized-test.py | 2 -- googletest/test/gtest_assert_by_exception_test.cc | 2 +- googletest/test/gtest_help_test.py | 2 -- googletest/test/gtest_repeat_test.cc | 2 +- googletest/test/gtest_test_utils.py | 4 +-- googletest/test/gtest_testbridge_test.py | 2 -- googletest/test/gtest_unittest.cc | 5 ++-- googletest/test/gtest_xml_outfiles_test.py | 4 +-- 47 files changed, 61 insertions(+), 98 deletions(-) diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 490f3a4..a001850 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -73,7 +73,7 @@ namespace testing { // MatchResultListener is an abstract class. Its << operator can be // used by a matcher to explain why a value matches or doesn't match. // -// TODO(wan@google.com): add method +// FIXME: add method // bool InterestedInWhy(bool result) const; // to indicate whether the listener is interested in why the match // result is 'result'. @@ -922,7 +922,7 @@ class TuplePrefix { GTEST_REFERENCE_TO_CONST_(Value) value = get(values); StringMatchResultListener listener; if (!matcher.MatchAndExplain(value, &listener)) { - // TODO(wan): include in the message the name of the parameter + // FIXME: include in the message the name of the parameter // as used in MOCK_METHOD*() when possible. *os << " Expected arg #" << N - 1 << ": "; get(matchers).DescribeTo(os); @@ -2420,7 +2420,7 @@ class WhenDynamicCastToMatcher : public WhenDynamicCastToMatcherBase { template bool MatchAndExplain(From from, MatchResultListener* listener) const { - // TODO(sbenza): Add more detail on failures. ie did the dyn_cast fail? + // FIXME: Add more detail on failures. ie did the dyn_cast fail? To to = dynamic_cast(from); return MatchPrintAndExplain(to, this->matcher_, listener); } diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index f49d01f..0d83cd6 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -184,7 +184,7 @@ class GTEST_API_ UntypedFunctionMockerBase { // this information in the global mock registry. Will be called // whenever an EXPECT_CALL() or ON_CALL() is executed on this mock // method. - // TODO(wan@google.com): rename to SetAndRegisterOwner(). + // FIXME: rename to SetAndRegisterOwner(). void RegisterOwner(const void* mock_obj) GTEST_LOCK_EXCLUDED_(g_gmock_mutex); @@ -1207,7 +1207,7 @@ class TypedExpectation : public ExpectationBase { mocker->DescribeDefaultActionTo(args, what); DescribeCallCountTo(why); - // TODO(wan@google.com): allow the user to control whether + // FIXME: allow the user to control whether // unexpected calls should fail immediately or continue using a // flag --gmock_unexpected_calls_are_fatal. return NULL; diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index b020f89..db64c65 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -360,7 +360,7 @@ class WithoutMatchers { // Internal use only: access the singleton instance of WithoutMatchers. GTEST_API_ WithoutMatchers GetWithoutMatchers(); -// TODO(wan@google.com): group all type utilities together. +// FIXME: group all type utilities together. // Type traits. diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index e216fe2..06e29a1 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -1343,7 +1343,7 @@ TEST(FunctorActionTest, UnusedArguments) { } // Test that basic built-in actions work with move-only arguments. -// TODO(rburny): Currently, almost all ActionInterface-based actions will not +// FIXME: Currently, almost all ActionInterface-based actions will not // work, even if they only try to use other, copyable arguments. Implement them // if necessary (but note that DoAll cannot work on non-copyable types anyway - // so maybe it's better to make users use lambdas instead. diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index 78fbc3f..7056c43 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -1175,7 +1175,7 @@ TEST(UnexpectedCallTest, UnsatisifiedPrerequisites) { TEST(UndefinedReturnValueTest, ReturnValueIsMandatoryWhenNotDefaultConstructible) { MockA a; - // TODO(wan@google.com): We should really verify the output message, + // FIXME: We should really verify the output message, // but we cannot yet due to that EXPECT_DEATH only captures stderr // while Google Mock logs to stdout. #if GTEST_HAS_EXCEPTIONS diff --git a/googlemock/test/gmock_leak_test.py b/googlemock/test/gmock_leak_test.py index a2fee4b..7e4b1ee 100755 --- a/googlemock/test/gmock_leak_test.py +++ b/googlemock/test/gmock_leak_test.py @@ -31,8 +31,6 @@ """Tests that leaked mock objects can be caught be Google Mock.""" -__author__ = 'wan@google.com (Zhanyong Wan)' - import gmock_test_utils PROGRAM_PATH = gmock_test_utils.GetTestExecutablePath('gmock_leak_test_') diff --git a/googlemock/test/gmock_output_test.py b/googlemock/test/gmock_output_test.py index 20323e1..0527bd9 100755 --- a/googlemock/test/gmock_output_test.py +++ b/googlemock/test/gmock_output_test.py @@ -39,8 +39,6 @@ gmock_output_test.py """ -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import re import sys diff --git a/googlemock/test/gmock_test_utils.py b/googlemock/test/gmock_test_utils.py index 92b1ac1..7dc4e11 100755 --- a/googlemock/test/gmock_test_utils.py +++ b/googlemock/test/gmock_test_utils.py @@ -29,8 +29,6 @@ """Unit test utilities for Google C++ Mocking Framework.""" -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import sys diff --git a/googletest/include/gtest/gtest-death-test.h b/googletest/include/gtest/gtest-death-test.h index 06fe42e..20c54d8 100644 --- a/googletest/include/gtest/gtest-death-test.h +++ b/googletest/include/gtest/gtest-death-test.h @@ -161,7 +161,7 @@ GTEST_API_ bool InDeathTestChild(); // is rarely a problem as people usually don't put the test binary // directory in PATH. // -// TODO(wan@google.com): make thread-safe death tests search the PATH. +// FIXME: make thread-safe death tests search the PATH. // Asserts that a given statement causes the program to exit, with an // integer exit status that satisfies predicate, and emitting error output diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index f4accac..c67e30a 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -826,7 +826,7 @@ void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) { // If the array has more than kThreshold elements, we'll have to // omit some details by printing only the first and the last // kChunkSize elements. - // TODO(wan@google.com): let the user control the threshold using a flag. + // FIXME: let the user control the threshold using a flag. if (len <= kThreshold) { PrintRawArrayTo(begin, len, os); } else { diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index f374c59..65bd9cb 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -315,7 +315,7 @@ class GTEST_API_ AssertionResult { const char* message() const { return message_.get() != NULL ? message_->c_str() : ""; } - // TODO(vladl@google.com): Remove this after making sure no clients use it. + // FIXME: Remove this after making sure no clients use it. // Deprecated; please use message() instead. const char* failure_message() const { return message(); } @@ -621,7 +621,7 @@ class GTEST_API_ TestResult { // Adds a failure if the key is a reserved attribute of Google Test // testcase tags. Returns true if the property is valid. - // TODO(russr): Validate attribute names are legal and human readable. + // FIXME: Validate attribute names are legal and human readable. static bool ValidateTestProperty(const std::string& xml_element, const TestProperty& test_property); diff --git a/googletest/include/gtest/internal/gtest-linked_ptr.h b/googletest/include/gtest/internal/gtest-linked_ptr.h index fa2c3b3..082b872 100644 --- a/googletest/include/gtest/internal/gtest-linked_ptr.h +++ b/googletest/include/gtest/internal/gtest-linked_ptr.h @@ -60,7 +60,7 @@ // raw pointer (e.g. via get()) concurrently, and // - it's safe to write to two linked_ptrs that point to the same // shared object concurrently. -// TODO(wan@google.com): rename this to safe_linked_ptr to avoid +// FIXME: rename this to safe_linked_ptr to avoid // confusion with normal linked_ptr. // GOOGLETEST_CM0001 DO NOT DELETE diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 5d96a05..a0d318c 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -547,7 +547,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; #ifndef GTEST_HAS_STD_WSTRING // The user didn't tell us whether ::std::wstring is available, so we need // to figure it out. -// TODO(wan@google.com): uses autoconf to detect whether ::std::wstring +// FIXME: uses autoconf to detect whether ::std::wstring // is available. // Cygwin 1.7 and below doesn't support ::std::wstring. @@ -759,7 +759,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // Until version 4.3.2, gcc has a bug that causes , // which is #included by , to not compile when RTTI is // disabled. _TR1_FUNCTIONAL is the header guard for -// . Hence the following #define is a hack to prevent +// . Hence the following #define is used to prevent // from being included. # define _TR1_FUNCTIONAL 1 # include @@ -1264,7 +1264,7 @@ class GTEST_API_ RE { // PartialMatch(str, re) returns true iff regular expression re // matches a substring of str (including str itself). // - // TODO(wan@google.com): make FullMatch() and PartialMatch() work + // FIXME: make FullMatch() and PartialMatch() work // when str contains NUL characters. static bool FullMatch(const ::std::string& str, const RE& re) { return FullMatch(str.c_str(), re); @@ -1291,7 +1291,7 @@ class GTEST_API_ RE { void Init(const char* regex); // We use a const char* instead of an std::string, as Google Test used to be - // used where std::string is not available. TODO(wan@google.com): change to + // used where std::string is not available. FIXME: change to // std::string. const char* pattern_; bool is_valid_; @@ -2684,7 +2684,7 @@ typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds. // Parses 'str' for a 32-bit signed integer. If successful, writes the result // to *value and returns true; otherwise leaves *value unchanged and returns // false. -// TODO(chandlerc): Find a better way to refactor flag and environment parsing +// FIXME: Find a better way to refactor flag and environment parsing // out of both gtest-port.cc and gtest.cc to avoid exporting this utility // function. bool ParseInt32(const Message& src_text, const char* str, Int32* value); diff --git a/googletest/include/gtest/internal/gtest-tuple.h b/googletest/include/gtest/internal/gtest-tuple.h index 89748cc..78a3a6a 100644 --- a/googletest/include/gtest/internal/gtest-tuple.h +++ b/googletest/include/gtest/internal/gtest-tuple.h @@ -43,7 +43,7 @@ // The compiler used in Symbian has a bug that prevents us from declaring the // tuple template as a friend (it complains that tuple is redefined). This -// hack bypasses the bug by declaring the members that should otherwise be +// bypasses the bug by declaring the members that should otherwise be // private as public. // Sun Studio versions < 12 also have the above bug. #if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590) diff --git a/googletest/include/gtest/internal/gtest-tuple.h.pump b/googletest/include/gtest/internal/gtest-tuple.h.pump index a08bf70..bb626e0 100644 --- a/googletest/include/gtest/internal/gtest-tuple.h.pump +++ b/googletest/include/gtest/internal/gtest-tuple.h.pump @@ -42,7 +42,7 @@ $$ This meta comment fixes auto-indentation in Emacs. }} // The compiler used in Symbian has a bug that prevents us from declaring the // tuple template as a friend (it complains that tuple is redefined). This -// hack bypasses the bug by declaring the members that should otherwise be +// bypasses the bug by declaring the members that should otherwise be // private as public. // Sun Studio versions < 12 also have the above bug. #if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590) diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 97dbffc..0908355 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -266,7 +266,7 @@ static const int kFuchsiaReadPipeFd = 3; // statement, which is not allowed; THREW means that the test statement // returned control by throwing an exception. IN_PROGRESS means the test // has not yet concluded. -// TODO(vladl@google.com): Unify names and possibly values for +// FIXME: Unify names and possibly values for // AbortReason, DeathTestOutcome, and flag characters above. enum DeathTestOutcome { IN_PROGRESS, DIED, LIVED, RETURNED, THREW }; @@ -1458,7 +1458,7 @@ static int GetStatusFileDescriptor(unsigned int parent_process_id, StreamableToString(parent_process_id)); } - // TODO(vladl@google.com): Replace the following check with a + // FIXME: Replace the following check with a // compile-time assertion when available. GTEST_CHECK_(sizeof(HANDLE) <= sizeof(size_t)); diff --git a/googletest/src/gtest-filepath.cc b/googletest/src/gtest-filepath.cc index 6b76ea0..a7e65c0 100644 --- a/googletest/src/gtest-filepath.cc +++ b/googletest/src/gtest-filepath.cc @@ -250,7 +250,7 @@ bool FilePath::DirectoryExists() const { // root directory per disk drive.) bool FilePath::IsRootDirectory() const { #if GTEST_OS_WINDOWS - // TODO(wan@google.com): on Windows a network share like + // FIXME: on Windows a network share like // \\server\share can be a root directory, although it cannot be the // current directory. Handle this properly. return pathname_.length() == 3 && IsAbsolutePath(); @@ -350,7 +350,7 @@ FilePath FilePath::RemoveTrailingPathSeparator() const { // Removes any redundant separators that might be in the pathname. // For example, "bar///foo" becomes "bar/foo". Does not eliminate other // redundancies that might be in a pathname involving "." or "..". -// TODO(wan@google.com): handle Windows network shares (e.g. \\server\share). +// FIXME: handle Windows network shares (e.g. \\server\share). void FilePath::Normalize() { if (pathname_.c_str() == NULL) { pathname_ = ""; diff --git a/googletest/src/gtest-internal-inl.h b/googletest/src/gtest-internal-inl.h index f7ed9a1..43effbf 100644 --- a/googletest/src/gtest-internal-inl.h +++ b/googletest/src/gtest-internal-inl.h @@ -991,7 +991,7 @@ bool ParseNaturalNumber(const ::std::string& str, Integer* number) { const bool parse_success = *end == '\0' && errno == 0; - // TODO(vladl@google.com): Convert this to compile time assertion when it is + // FIXME: Convert this to compile time assertion when it is // available. GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed)); diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index 0b49193..13901e3 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -261,7 +261,7 @@ Mutex::Mutex() Mutex::~Mutex() { // Static mutexes are leaked intentionally. It is not thread-safe to try // to clean them up. - // TODO(yukawa): Switch to Slim Reader/Writer (SRW) Locks, which requires + // FIXME: Switch to Slim Reader/Writer (SRW) Locks, which requires // nothing to clean it up but is available only on Vista and later. // https://docs.microsoft.com/en-us/windows/desktop/Sync/slim-reader-writer--srw--locks if (type_ == kDynamic) { @@ -343,7 +343,7 @@ class ThreadWithParamSupport : public ThreadWithParamBase { Notification* thread_can_start) { ThreadMainParam* param = new ThreadMainParam(runnable, thread_can_start); DWORD thread_id; - // TODO(yukawa): Consider to use _beginthreadex instead. + // FIXME: Consider to use _beginthreadex instead. HANDLE thread_handle = ::CreateThread( NULL, // Default security. 0, // Default stack size. @@ -695,7 +695,7 @@ static std::string FormatRegexSyntaxError(const char* regex, int index) { // otherwise returns true. bool ValidateRegex(const char* regex) { if (regex == NULL) { - // TODO(wan@google.com): fix the source file location in the + // FIXME: fix the source file location in the // assertion failures to match where the regex is used in user // code. ADD_FAILURE() << "NULL is not a valid simple regular expression."; diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc index d68d929..de4d245 100644 --- a/googletest/src/gtest-printers.cc +++ b/googletest/src/gtest-printers.cc @@ -89,7 +89,7 @@ void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count, // If the object size is bigger than kThreshold, we'll have to omit // some details by printing only the first and the last kChunkSize // bytes. - // TODO(wan): let the user control the threshold using a flag. + // FIXME: let the user control the threshold using a flag. if (count < kThreshold) { PrintByteSegmentInObjectTo(obj_bytes, 0, count, os); } else { diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 37e5b1f..2bcdfd1 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -54,7 +54,7 @@ #if GTEST_OS_LINUX -// TODO(kenton@google.com): Use autoconf to detect availability of +// FIXME: Use autoconf to detect availability of // gettimeofday(). # define GTEST_HAS_GETTIMEOFDAY_ 1 @@ -93,9 +93,9 @@ # if GTEST_OS_WINDOWS_MINGW // MinGW has gettimeofday() but not _ftime64(). -// TODO(kenton@google.com): Use autoconf to detect availability of +// FIXME: Use autoconf to detect availability of // gettimeofday(). -// TODO(kenton@google.com): There are other ways to get the time on +// FIXME: There are other ways to get the time on // Windows, like GetTickCount() or GetSystemTimeAsFileTime(). MinGW // supports these. consider using them instead. # define GTEST_HAS_GETTIMEOFDAY_ 1 @@ -110,7 +110,7 @@ #else // Assume other platforms have gettimeofday(). -// TODO(kenton@google.com): Use autoconf to detect availability of +// FIXME: Use autoconf to detect availability of // gettimeofday(). # define GTEST_HAS_GETTIMEOFDAY_ 1 @@ -467,7 +467,7 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() { internal::FilePath output_name(colon + 1); if (!output_name.IsAbsolutePath()) - // TODO(wan@google.com): on Windows \some\path is not an absolute + // FIXME: on Windows \some\path is not an absolute // path (as its meaning depends on the current drive), yet the // following logic for turning it into an absolute path is wrong. // Fix it. @@ -841,7 +841,7 @@ TimeInMillis GetTimeInMillis() { SYSTEMTIME now_systime; FILETIME now_filetime; ULARGE_INTEGER now_int64; - // TODO(kenton@google.com): Shouldn't this just use + // FIXME: Shouldn't this just use // GetSystemTimeAsFileTime()? GetSystemTime(&now_systime); if (SystemTimeToFileTime(&now_systime, &now_filetime)) { @@ -857,7 +857,7 @@ TimeInMillis GetTimeInMillis() { // MSVC 8 deprecates _ftime64(), so we want to suppress warning 4996 // (deprecated function) there. - // TODO(kenton@google.com): Use GetTickCount()? Or use + // FIXME: Use GetTickCount()? Or use // SystemTimeToFileTime() GTEST_DISABLE_MSC_DEPRECATED_PUSH_() _ftime64(&now); @@ -1396,7 +1396,7 @@ AssertionResult DoubleNearPredFormat(const char* expr1, const double diff = fabs(val1 - val2); if (diff <= abs_error) return AssertionSuccess(); - // TODO(wan): do not print the value of an expression if it's + // FIXME: do not print the value of an expression if it's // already a literal. return AssertionFailure() << "The difference between " << expr1 << " and " << expr2 @@ -3334,7 +3334,7 @@ void TestEventRepeater::Append(TestEventListener *listener) { listeners_.push_back(listener); } -// TODO(vladl@google.com): Factor the search functionality into Vector::Find. +// FIXME: Factor the search functionality into Vector::Find. TestEventListener* TestEventRepeater::Release(TestEventListener *listener) { for (size_t i = 0; i < listeners_.size(); ++i) { if (listeners_[i] == listener) { @@ -3499,7 +3499,7 @@ void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, xmlout = posix::FOpen(output_file_.c_str(), "w"); } if (xmlout == NULL) { - // TODO(wan): report the reason of the failure. + // FIXME: report the reason of the failure. // // We don't do it for now as: // @@ -3528,7 +3528,7 @@ void XmlUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, // module will consist of ordinary English text. // If this module is ever modified to produce version 1.1 XML output, // most invalid characters can be retained using character references. -// TODO(wan): It might be nice to have a minimally invasive, human-readable +// FIXME: It might be nice to have a minimally invasive, human-readable // escaping scheme for invalid characters, rather than dropping them. std::string XmlUnitTestResultPrinter::EscapeXml( const std::string& str, bool is_attribute) { @@ -3679,7 +3679,7 @@ void XmlUnitTestResultPrinter::OutputXmlAttribute( } // Prints an XML representation of a TestInfo object. -// TODO(wan): There is also value in printing properties with the plain printer. +// FIXME: There is also value in printing properties with the plain printer. void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream, const char* test_case_name, const TestInfo& test_info) { @@ -3906,7 +3906,7 @@ void JsonUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, jsonout = posix::FOpen(output_file_.c_str(), "w"); } if (jsonout == NULL) { - // TODO(phosek): report the reason of the failure. + // FIXME: report the reason of the failure. // // We don't do it for now as: // @@ -4721,7 +4721,7 @@ int UnitTest::Run() { // VC++ doesn't define _set_abort_behavior() prior to the version 8.0. // Users of prior VC versions shall suffer the agony and pain of // clicking through the countless debug dialogs. - // TODO(vladl@google.com): find a way to suppress the abort dialog() in the + // FIXME: find a way to suppress the abort dialog() in the // debug mode when compiled with VC 7.1 or lower. if (!GTEST_FLAG(break_on_failure)) _set_abort_behavior( @@ -5615,7 +5615,7 @@ static bool HasGoogleTestFlagPrefix(const char* str) { // @Y changes the color to yellow. // @D changes to the default terminal text color. // -// TODO(wan@google.com): Write tests for this once we add stdout +// FIXME: Write tests for this once we add stdout // capturing to Google Test. static void PrintColorEncoded(const char* str) { GTestColor color = COLOR_DEFAULT; // The current color. diff --git a/googletest/test/googletest-break-on-failure-unittest.py b/googletest/test/googletest-break-on-failure-unittest.py index cd77547..a5dfbc6 100755 --- a/googletest/test/googletest-break-on-failure-unittest.py +++ b/googletest/test/googletest-break-on-failure-unittest.py @@ -38,8 +38,6 @@ by invoking googletest-break-on-failure-unittest_ (a program written with Google Test) with different environments and command line flags. """ -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import gtest_test_utils diff --git a/googletest/test/googletest-catch-exceptions-test.py b/googletest/test/googletest-catch-exceptions-test.py index 69dbadf..5d49c10 100755 --- a/googletest/test/googletest-catch-exceptions-test.py +++ b/googletest/test/googletest-catch-exceptions-test.py @@ -35,8 +35,6 @@ googletest-catch-exceptions-ex-test_ (programs written with Google Test) and verifies their output. """ -__author__ = 'vladl@google.com (Vlad Losev)' - import gtest_test_utils # Constants. diff --git a/googletest/test/googletest-color-test.py b/googletest/test/googletest-color-test.py index 875d478..f3b7c99 100755 --- a/googletest/test/googletest-color-test.py +++ b/googletest/test/googletest-color-test.py @@ -31,8 +31,6 @@ """Verifies that Google Test correctly determines whether to use colors.""" -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import gtest_test_utils diff --git a/googletest/test/googletest-death-test-test.cc b/googletest/test/googletest-death-test-test.cc index 0699029..c0c3026 100644 --- a/googletest/test/googletest-death-test-test.cc +++ b/googletest/test/googletest-death-test-test.cc @@ -1279,7 +1279,7 @@ TEST(ParseNaturalNumberTest, WorksForShorterIntegers) { # if GTEST_OS_WINDOWS TEST(EnvironmentTest, HandleFitsIntoSizeT) { - // TODO(vladl@google.com): Remove this test after this condition is verified + // FIXME: Remove this test after this condition is verified // in a static assertion in gtest-death-test.cc in the function // GetStatusFileDescriptor. ASSERT_TRUE(sizeof(HANDLE) <= sizeof(size_t)); diff --git a/googletest/test/googletest-env-var-test.py b/googletest/test/googletest-env-var-test.py index 9c80e2a..e1efeee 100755 --- a/googletest/test/googletest-env-var-test.py +++ b/googletest/test/googletest-env-var-test.py @@ -31,8 +31,6 @@ """Verifies that Google Test correctly parses environment variables.""" -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import gtest_test_utils diff --git a/googletest/test/googletest-filepath-test.cc b/googletest/test/googletest-filepath-test.cc index e832666..37f02fb 100644 --- a/googletest/test/googletest-filepath-test.cc +++ b/googletest/test/googletest-filepath-test.cc @@ -50,7 +50,7 @@ namespace internal { namespace { #if GTEST_OS_WINDOWS_MOBILE -// TODO(wan@google.com): Move these to the POSIX adapter section in +// FIXME: Move these to the POSIX adapter section in // gtest-port.h. // Windows CE doesn't have the remove C function. diff --git a/googletest/test/googletest-filter-unittest.py b/googletest/test/googletest-filter-unittest.py index 1e554d5..dc0b5bd 100755 --- a/googletest/test/googletest-filter-unittest.py +++ b/googletest/test/googletest-filter-unittest.py @@ -40,8 +40,6 @@ Note that test sharding may also influence which tests are filtered. Therefore, we test that here also. """ -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import re import sets diff --git a/googletest/test/googletest-json-outfiles-test.py b/googletest/test/googletest-json-outfiles-test.py index 46010d8..c99be48 100644 --- a/googletest/test/googletest-json-outfiles-test.py +++ b/googletest/test/googletest-json-outfiles-test.py @@ -136,11 +136,11 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase): self.assert_(p.exited) self.assertEquals(0, p.exit_code) - # TODO(wan@google.com): libtool causes the built test binary to be + # FIXME: libtool causes the built test binary to be # named lt-gtest_xml_outfiles_test_ instead of # gtest_xml_outfiles_test_. To account for this possibility, we # allow both names in the following code. We should remove this - # hack when Chandler Carruth's libtool replacement tool is ready. + # when libtool replacement tool is ready. output_file_name1 = test_name + '.json' output_file1 = os.path.join(self.output_dir_, output_file_name1) output_file_name2 = 'lt-' + output_file_name1 diff --git a/googletest/test/googletest-list-tests-unittest.py b/googletest/test/googletest-list-tests-unittest.py index a38073a..81423a3 100755 --- a/googletest/test/googletest-list-tests-unittest.py +++ b/googletest/test/googletest-list-tests-unittest.py @@ -37,8 +37,6 @@ by invoking googletest-list-tests-unittest_ (a program written with Google Test) the command line flags. """ -__author__ = 'phanna@google.com (Patrick Hanna)' - import re import gtest_test_utils diff --git a/googletest/test/googletest-options-test.cc b/googletest/test/googletest-options-test.cc index e426ce2..bbda04f 100644 --- a/googletest/test/googletest-options-test.cc +++ b/googletest/test/googletest-options-test.cc @@ -105,7 +105,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) { #elif GTEST_OS_FUCHSIA const bool success = exe_str == "app"; #else - // TODO(wan@google.com): remove the hard-coded "lt-" prefix when + // FIXME: remove the hard-coded "lt-" prefix when // Chandler Carruth's libtool replacement is ready. const bool success = exe_str == "googletest-options-test" || diff --git a/googletest/test/googletest-output-test.py b/googletest/test/googletest-output-test.py index 0dae8d1..2d69e35 100755 --- a/googletest/test/googletest-output-test.py +++ b/googletest/test/googletest-output-test.py @@ -38,8 +38,6 @@ googletest_output_test.py --gengolden googletest_output_test.py """ -__author__ = 'wan@google.com (Zhanyong Wan)' - import difflib import os import re @@ -57,7 +55,7 @@ NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support' IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' IS_WINDOWS = os.name == 'nt' -# TODO(vladl@google.com): remove the _lin suffix. +# FIXME: remove the _lin suffix. GOLDEN_NAME = 'googletest-output-test-golden-lin.txt' PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_') diff --git a/googletest/test/googletest-param-test-invalid-name1-test.py b/googletest/test/googletest-param-test-invalid-name1-test.py index a402c33..2a08477 100644 --- a/googletest/test/googletest-param-test-invalid-name1-test.py +++ b/googletest/test/googletest-param-test-invalid-name1-test.py @@ -30,8 +30,6 @@ """Verifies that Google Test warns the user when not initialized properly.""" -__author__ = 'jmadill@google.com (Jamie Madill)' - import gtest_test_utils binary_name = 'googletest-param-test-invalid-name1-test_' diff --git a/googletest/test/googletest-param-test-invalid-name2-test.py b/googletest/test/googletest-param-test-invalid-name2-test.py index 5766134..ab838f4 100644 --- a/googletest/test/googletest-param-test-invalid-name2-test.py +++ b/googletest/test/googletest-param-test-invalid-name2-test.py @@ -30,8 +30,6 @@ """Verifies that Google Test warns the user when not initialized properly.""" -__author__ = 'jmadill@google.com (Jamie Madill)' - import gtest_test_utils binary_name = 'googletest-param-test-invalid-name2-test_' diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc index d06b4df..f789cab 100644 --- a/googletest/test/googletest-param-test-test.cc +++ b/googletest/test/googletest-param-test-test.cc @@ -67,7 +67,7 @@ using ::testing::internal::UnitTestOptions; // Prints a value to a string. // -// TODO(wan@google.com): remove PrintValue() when we move matchers and +// FIXME: remove PrintValue() when we move matchers and // EXPECT_THAT() from Google Mock to Google Test. At that time, we // can write EXPECT_THAT(x, Eq(y)) to compare two tuples x and y, as // EXPECT_THAT() and the matchers know how to print tuples. diff --git a/googletest/test/googletest-port-test.cc b/googletest/test/googletest-port-test.cc index 53afe93..399316f 100644 --- a/googletest/test/googletest-port-test.cc +++ b/googletest/test/googletest-port-test.cc @@ -224,7 +224,7 @@ TEST(ScopedPtrTest, DefinesElementType) { StaticAssertTypeEq::element_type>(); } -// TODO(vladl@google.com): Implement THE REST of scoped_ptr tests. +// FIXME: Implement THE REST of scoped_ptr tests. TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) { if (AlwaysFalse()) diff --git a/googletest/test/googletest-shuffle-test.py b/googletest/test/googletest-shuffle-test.py index 5ae9655..573cc5e 100755 --- a/googletest/test/googletest-shuffle-test.py +++ b/googletest/test/googletest-shuffle-test.py @@ -30,8 +30,6 @@ """Verifies that test shuffling works.""" -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import gtest_test_utils diff --git a/googletest/test/googletest-test-part-test.cc b/googletest/test/googletest-test-part-test.cc index 34e8022..cd2d6f9 100644 --- a/googletest/test/googletest-test-part-test.cc +++ b/googletest/test/googletest-test-part-test.cc @@ -200,6 +200,6 @@ TEST_F(TestPartResultArrayDeathTest, DiesWhenIndexIsOutOfBound) { EXPECT_DEATH_IF_SUPPORTED(results.GetTestPartResult(1), ""); } -// TODO(mheule@google.com): Add a test for the class HasNewFatalFailureHelper. +// FIXME: Add a test for the class HasNewFatalFailureHelper. } // namespace diff --git a/googletest/test/googletest-throw-on-failure-test.py b/googletest/test/googletest-throw-on-failure-test.py index 26ba32b..46cb9f6 100755 --- a/googletest/test/googletest-throw-on-failure-test.py +++ b/googletest/test/googletest-throw-on-failure-test.py @@ -35,8 +35,6 @@ This script invokes googletest-throw-on-failure-test_ (a program written with Google Test) with different environments and command line flags. """ -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import gtest_test_utils @@ -75,7 +73,7 @@ def Run(command): return p.exited and p.exit_code == 0 -# The tests. TODO(wan@google.com): refactor the class to share common +# The tests. FIXME: refactor the class to share common # logic with code in googletest-break-on-failure-unittest.py. class ThrowOnFailureTest(gtest_test_utils.TestCase): """Tests the throw-on-failure mode.""" diff --git a/googletest/test/googletest-uninitialized-test.py b/googletest/test/googletest-uninitialized-test.py index e3df5fa..5b7d1e7 100755 --- a/googletest/test/googletest-uninitialized-test.py +++ b/googletest/test/googletest-uninitialized-test.py @@ -31,8 +31,6 @@ """Verifies that Google Test warns the user when not initialized properly.""" -__author__ = 'wan@google.com (Zhanyong Wan)' - import gtest_test_utils COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-uninitialized-test_') diff --git a/googletest/test/gtest_assert_by_exception_test.cc b/googletest/test/gtest_assert_by_exception_test.cc index 8d74d60..0eae857 100644 --- a/googletest/test/gtest_assert_by_exception_test.cc +++ b/googletest/test/gtest_assert_by_exception_test.cc @@ -97,7 +97,7 @@ TEST(Test, Test) { int kTestForContinuingTest = 0; TEST(Test, Test2) { - // FIXME(sokolov): how to force Test2 to be after Test? + // FIXME: how to force Test2 to be after Test? kTestForContinuingTest = 1; } diff --git a/googletest/test/gtest_help_test.py b/googletest/test/gtest_help_test.py index 79ffbe4..582d24c 100755 --- a/googletest/test/gtest_help_test.py +++ b/googletest/test/gtest_help_test.py @@ -37,8 +37,6 @@ SYNOPSIS gtest_help_test.py """ -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import re import gtest_test_utils diff --git a/googletest/test/gtest_repeat_test.cc b/googletest/test/gtest_repeat_test.cc index e2888a5..204a091 100644 --- a/googletest/test/gtest_repeat_test.cc +++ b/googletest/test/gtest_repeat_test.cc @@ -117,7 +117,7 @@ const int kNumberOfParamTests = 10; class MyParamTest : public testing::TestWithParam {}; TEST_P(MyParamTest, ShouldPass) { - // TODO(vladl@google.com): Make parameter value checking robust + // FIXME: Make parameter value checking robust // WRT order of tests. GTEST_CHECK_INT_EQ_(g_param_test_count % kNumberOfParamTests, GetParam()); g_param_test_count++; diff --git a/googletest/test/gtest_test_utils.py b/googletest/test/gtest_test_utils.py index c4c0227..43cba8f 100755 --- a/googletest/test/gtest_test_utils.py +++ b/googletest/test/gtest_test_utils.py @@ -31,8 +31,6 @@ # Suppresses the 'Import not at the top of the file' lint complaint. # pylint: disable-msg=C6204 -__author__ = 'wan@google.com (Zhanyong Wan)' - import os import sys @@ -308,7 +306,7 @@ def Main(): _ParseAndStripGTestFlags(sys.argv) # The tested binaries should not be writing XML output files unless the # script explicitly instructs them to. - # TODO(vladl@google.com): Move this into Subprocess when we implement + # FIXME: Move this into Subprocess when we implement # passing environment into it as a parameter. if GTEST_OUTPUT_VAR_NAME in os.environ: del os.environ[GTEST_OUTPUT_VAR_NAME] diff --git a/googletest/test/gtest_testbridge_test.py b/googletest/test/gtest_testbridge_test.py index 2075e12..87ffad7 100755 --- a/googletest/test/gtest_testbridge_test.py +++ b/googletest/test/gtest_testbridge_test.py @@ -29,8 +29,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """Verifies that Google Test uses filter provided via testbridge.""" -__author__ = 'rfj@google.com (Rohan Joyce)' - import os import gtest_test_utils diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index f7acde2..e1c30f3 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -1384,8 +1384,7 @@ class TestResultTest : public Test { // In order to test TestResult, we need to modify its internal // state, in particular the TestPartResult vector it holds. // test_part_results() returns a const reference to this vector. - // We cast it to a non-const object s.t. it can be modified (yes, - // this is a hack). + // We cast it to a non-const object s.t. it can be modified TPRVector* results1 = const_cast( &TestResultAccessor::test_part_results(*r1)); TPRVector* results2 = const_cast( @@ -7372,7 +7371,7 @@ GTEST_TEST(AlternativeNameTest, Works) { // GTEST_TEST is the same as TEST. // Tests for internal utilities necessary for implementation of the universal // printing. -// TODO(vladl@google.com): Find a better home for them. +// FIXME: Find a better home for them. class ConversionHelperBase {}; class ConversionHelperDerived : public ConversionHelperBase {}; diff --git a/googletest/test/gtest_xml_outfiles_test.py b/googletest/test/gtest_xml_outfiles_test.py index c7d3413..2c031ff 100755 --- a/googletest/test/gtest_xml_outfiles_test.py +++ b/googletest/test/gtest_xml_outfiles_test.py @@ -111,11 +111,11 @@ class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase): self.assert_(p.exited) self.assertEquals(0, p.exit_code) - # TODO(wan@google.com): libtool causes the built test binary to be + # FIXME: libtool causes the built test binary to be # named lt-gtest_xml_outfiles_test_ instead of # gtest_xml_outfiles_test_. To account for this possibility, we # allow both names in the following code. We should remove this - # hack when Chandler Carruth's libtool replacement tool is ready. + # when libtool replacement tool is ready. output_file_name1 = test_name + ".xml" output_file1 = os.path.join(self.output_dir_, output_file_name1) output_file_name2 = 'lt-' + output_file_name1 -- cgit v0.12 From bbf738a2c1052d9822fc69d4dd660190752e63b8 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 14 Aug 2018 15:45:00 -0400 Subject: more comments changes --- googlemock/src/gmock-spec-builders.cc | 2 +- googlemock/src/gmock.cc | 2 +- googletest/test/googletest-options-test.cc | 2 +- googletest/test/gtest_repeat_test.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index 83cc9cc..dc6f5ac 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -606,7 +606,7 @@ class MockObjectRegistry { if (it->second.leakable) // The user said it's fine to leak this object. continue; - // TODO(wan@google.com): Print the type of the leaked object. + // FIXME: Print the type of the leaked object. // This can help the user identify the leaked object. std::cout << "\n"; const MockObjectState& state = it->second; diff --git a/googlemock/src/gmock.cc b/googlemock/src/gmock.cc index 1cebede..36356c9 100644 --- a/googlemock/src/gmock.cc +++ b/googlemock/src/gmock.cc @@ -33,7 +33,7 @@ namespace testing { -// TODO(wan@google.com): support using environment variables to +// FIXME: support using environment variables to // control the flag values, like what Google Test does. GMOCK_DEFINE_bool_(catch_leaked_mocks, true, diff --git a/googletest/test/googletest-options-test.cc b/googletest/test/googletest-options-test.cc index bbda04f..2a8dcda 100644 --- a/googletest/test/googletest-options-test.cc +++ b/googletest/test/googletest-options-test.cc @@ -106,7 +106,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) { const bool success = exe_str == "app"; #else // FIXME: remove the hard-coded "lt-" prefix when - // Chandler Carruth's libtool replacement is ready. + // libtool replacement is ready. const bool success = exe_str == "googletest-options-test" || exe_str == "gtest_all_test" || diff --git a/googletest/test/gtest_repeat_test.cc b/googletest/test/gtest_repeat_test.cc index 204a091..50876c7 100644 --- a/googletest/test/gtest_repeat_test.cc +++ b/googletest/test/gtest_repeat_test.cc @@ -118,7 +118,7 @@ class MyParamTest : public testing::TestWithParam {}; TEST_P(MyParamTest, ShouldPass) { // FIXME: Make parameter value checking robust - // WRT order of tests. + // WRT order of tests. GTEST_CHECK_INT_EQ_(g_param_test_count % kNumberOfParamTests, GetParam()); g_param_test_count++; } -- cgit v0.12 From f0e4c411ca08f01068162483e92810001b178a60 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 14 Aug 2018 16:05:55 -0400 Subject: more comments changes --- googlemock/src/gmock-spec-builders.cc | 2 +- googletest/test/googletest-options-test.cc | 3 +-- googletest/test/gtest_repeat_test.cc | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index dc6f5ac..b93f4e0 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -782,7 +782,7 @@ void Mock::RegisterUseByOnCallOrExpectCall(const void* mock_obj, const TestInfo* const test_info = UnitTest::GetInstance()->current_test_info(); if (test_info != NULL) { - // TODO(wan@google.com): record the test case name when the + // FIXME: record the test case name when the // ON_CALL or EXPECT_CALL is invoked from SetUpTestCase() or // TearDownTestCase(). state.first_used_test_case = test_info->test_case_name(); diff --git a/googletest/test/googletest-options-test.cc b/googletest/test/googletest-options-test.cc index 2a8dcda..edd4eba 100644 --- a/googletest/test/googletest-options-test.cc +++ b/googletest/test/googletest-options-test.cc @@ -105,8 +105,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) { #elif GTEST_OS_FUCHSIA const bool success = exe_str == "app"; #else - // FIXME: remove the hard-coded "lt-" prefix when - // libtool replacement is ready. + // FIXME: remove the hard-coded "lt-" prefix when libtool replacement is ready const bool success = exe_str == "googletest-options-test" || exe_str == "gtest_all_test" || diff --git a/googletest/test/gtest_repeat_test.cc b/googletest/test/gtest_repeat_test.cc index 50876c7..1e8f499 100644 --- a/googletest/test/gtest_repeat_test.cc +++ b/googletest/test/gtest_repeat_test.cc @@ -117,8 +117,7 @@ const int kNumberOfParamTests = 10; class MyParamTest : public testing::TestWithParam {}; TEST_P(MyParamTest, ShouldPass) { - // FIXME: Make parameter value checking robust - // WRT order of tests. + // FIXME: Make parameter value checking robust WRT order of tests. GTEST_CHECK_INT_EQ_(g_param_test_count % kNumberOfParamTests, GetParam()); g_param_test_count++; } -- cgit v0.12 From ca87cc72e222a2b2ffcfac686801946451e09ef1 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 15 Aug 2018 16:38:42 -0400 Subject: googletest export - 208874130 Copybara tweaks, testing various round-trip sutuations(fu... by misterg - 208880646 Fix header guards and remove special case copybara by misterg - 208874252 Copybara tweaks for googletest reversible transform by misterg - 208853103 Adding a flow to export PR from GitHub into Google3 and a... by misterg - 208708150 Removing leakr-sensitive words. by misterg - 208672083 Import of OSS PR 1665 by misterg - 208663904 Remove LEAKR "author" warnings for googletest copybara ex... by misterg - 208646244 Incrementally finalizing OSS<->google3 transforms by misterg - 208548323 Move custom google3 only code to custom/ by misterg - 208234974 Removed scrubs, replaced with reversible transforms by misterg - 208211213 Move custom tests under custom by misterg - 208082996 Replace of OSS insert with reversible replace by misterg - 208072299 Replace scrubs with reversible replaces, incrementally ge... by misterg - 208059357 Replace scrub with reversible replace by misterg - 208055415 Fixing GCC brace warning that shows up in OSS with GCC8 a... by misterg - 207933728 Incrementally getting close to the reversible transformat... by misterg - 207917581 Removing stripping with replace dictionary entries to eas... by misterg - 207911026 Incremental Tweaks, on the way to reversible google3<-> g... by misterg - 207905179 Removing unnecessary comments stripping by misterg - 207901741 Fix typo in Fuchsia death-test implementation. by Abseil Team - 207776408 Move custom tests into /custom by misterg - 207746583 Remove stripping for printer for absl:variant by misterg - 207733597 Suppress default exception handling for death-test proces... by Abseil Team - 207719598 Import of googletest from Github. by misterg - 207283991 PR1673, extra parentheses in declaration cause GCC 8.1.1 ... by misterg - 206986279 Fix Duplicate definition, (original in googletest-test_te... by misterg - 206980794 Allow googletest-json-output unitest to handle supporting... by misterg - 206957064 Refactor to avoid OSS round-trip transformation problems ... by misterg - 206760733 Fixed weird syntax in these tests that was causing OSS tr... by misterg - 206750694 Tweak copybara, by misterg - 206611945 Make files consistent to enable copybara round-trip trans... by misterg - 206589404 OSS changes to open source two more tests by misterg - 206355044 Fixing copybara (was missing comment) by misterg - 206323492 Make reversible transforms possible for Copybara OSS<->go... by misterg - 206011852 Consolidate various copybara files into one file. by misterg - 205999518 remove weird char, should be space. pump and generated .h... by misterg - 205897244 Small cleanups to avoid potentially hard-to-reverse OSS t... by misterg - 205894405 Simplifying include path for tests. by misterg - 205892873 Removing obsolete files by misterg - 205873647 Simplifying include path for samples. by misterg - 205712910 Continue restructuring, will have common copybara file to... by misterg - 205711819 Removing non-ASCII chars by misterg - 205702635 Refactor internal googletest name to match OSS Name by misterg - 205403311 Comments change by misterg - 205246538 OSS community (https://github.com/google/googletest/pull/... by misterg - 205242422 Moving RE2 into custom where it rightfully belongs by misterg - 205138666 Add a 3-ary Property() matcher overload for ref-qualified... by Abseil Team - 205128154 Automated g4 rollback of changelist 205108639. by misterg - 205108639 Moving RE2 into custom where it rightfully belongs by misterg - 205102342 Comment link fix by misterg - 205097052 OSS sync, still need to worry about not C++11 by misterg - 205080271 Keeping up with the changes, ensure that the code still t... by misterg - 204815384 Mark the various RE legacy versions of the matchers as de... by Abseil Team - 204744294 OSS, someone noticed that if GTEST_HAS_EXCEPTIONS is set ... by misterg - 204363541 Add stacktrace support to the non-Google3 version of Goog... by Abseil Team - 204330832 Google Test: absl::variant is now open source, so add the by Abseil Team - 204130690 Bringing in OSS PR 1647 by misterg - 203979061 Set 'reason' field for leakr.disable_check() transformati... by Abseil Team - 203954557 Fixing comments, otherwise copybara leaves extra "//" in ... by misterg - 203487065 Correctly handle legacy regular expressions in googletest... by Abseil Team - 201997367 Remove references to GTEST_HAS_PROTOBUF_. by Abseil Team - 201735597 Upgrade gUnit from RE to RE2 -- Step 3/4 by Abseil Team - 201229160 Upgrade gUnit from RE to RE2 -- Step 1/4 by Abseil Team - 201228020 Remove extra copy of gunit samples - there should really ... by misterg - 200602156 Eliminate GTEST_TEST_FILTER_ENV_VAR_. by Abseil Team - 200500026 Make RegisterTasks faster by Abseil Team - 200361990 Add IWYU pragmas to gmock headers. by Abseil Team - 200292286 Fix speling by Abseil Team - 200222319 Adding docs to copybara. by misterg - 199815917 Fuchsia: Change fdio include path. by Abseil Team - 199195290 Remove launchpad dependency from Fuchsia. by Abseil Team - 199134849 Add printer for std::nullptr_t. by Abseil Team - 198710999 Properly decay variadic matchers by Abseil Team - 197733704 WIP - copybara script capable of google3-to-github by misterg - 197166689 Keeping up, sync cl/197012432 to combined "googletest" di... by misterg - 196253300 Keep up with changes,cl/196162435 by misterg - 195816901 go/googletest-plan by misterg - 195816542 Moving http://cl/167016557 and http://cl/195690905 into c... by misterg - 195712930 Following up for http://cl/195677772 More fixing typos, p... by misterg - 195702162 Moving http://cl/195020996 into combined dir by misterg - 195677772 Fix typos, the original IWYU was by misterg - 195249681 go/googletest-plan , Combine gUnit and gMock into third_p... by misterg PiperOrigin-RevId: 208874130 --- googlemock/include/gmock/gmock-more-matchers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/googlemock/include/gmock/gmock-more-matchers.h b/googlemock/include/gmock/gmock-more-matchers.h index e5460e7..1c9a399 100644 --- a/googlemock/include/gmock/gmock-more-matchers.h +++ b/googlemock/include/gmock/gmock-more-matchers.h @@ -37,8 +37,8 @@ // GOOGLETEST_CM0002 DO NOT DELETE -#ifndef GMOCK_GMOCK_MORE_MATCHERS_H_ -#define GMOCK_GMOCK_MORE_MATCHERS_H_ +#ifndef GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_ +#define GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_ #include "gmock/gmock-generated-matchers.h" @@ -89,4 +89,4 @@ MATCHER(IsFalse, negation ? "is true" : "is false") { } // namespace testing -#endif // GMOCK_GMOCK_MORE_MATCHERS_H_ +#endif // GMOCK_INCLUDE_GMOCK_MORE_MATCHERS_H_ -- cgit v0.12 From c38f4b9f2c542d16611b59e37b5e4d2ec0c8f924 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 16 Aug 2018 13:18:13 -0400 Subject: Small style changes. Just small style changes and we can accept this PR --- googletest/src/gtest-port.cc | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index f6bc125..fecb5d1 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -296,8 +296,8 @@ void Mutex::AssertHeld() { namespace { -// Use the RAII idiom to flag mem allocs that are intentionally never -// deallocated. The motivation is to silence the false positive mem leaks +// Use the RAII idiom to flag mem allocs that are intentionally never +// deallocated. The motivation is to silence the false positive mem leaks // that are reported by the debug version of MS's CRT which can only detect // if an alloc is missing a matching deallocation. // Example: @@ -306,24 +306,24 @@ namespace { // class MemoryIsNotDeallocated { -public: + public: MemoryIsNotDeallocated() : old_crtdbg_flag_(0) { #ifdef _MSC_VER old_crtdbg_flag_ = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); // Set heap allocation block type to _IGNORE_BLOCK so that MS debug CRT // doesn't report mem leak if there's no matching deallocation. _CrtSetDbgFlag(old_crtdbg_flag_ & ~_CRTDBG_ALLOC_MEM_DF); -#endif // _MSC_VER +#endif // _MSC_VER } ~MemoryIsNotDeallocated() { #ifdef _MSC_VER // Restore the original _CRTDBG_ALLOC_MEM_DF flag _CrtSetDbgFlag(old_crtdbg_flag_); -#endif // _MSC_VER +#endif // _MSC_VER } -private: + private: int old_crtdbg_flag_; GTEST_DISALLOW_COPY_AND_ASSIGN_(MemoryIsNotDeallocated); @@ -584,17 +584,11 @@ class ThreadLocalRegistryImpl { return 0; } - // Return a newly constructed ThreadIdToThreadLocals that's intentionally never deleted - static ThreadIdToThreadLocals* NewThreadIdToThreadLocals() { - // Use RAII to flag that following mem alloc is never deallocated. - MemoryIsNotDeallocated memory_is_not_deallocated; - return new ThreadIdToThreadLocals; - } - // Returns map of thread local instances. static ThreadIdToThreadLocals* GetThreadLocalsMapLocked() { mutex_.AssertHeld(); - static ThreadIdToThreadLocals* map = NewThreadIdToThreadLocals(); + MemoryIsNotDeallocated memory_is_not_deallocated; + static ThreadIdToThreadLocals* map = new ThreadIdToThreadLocals(); return map; } -- cgit v0.12 From b1bfdf0bf48bb2288ba73bc8f423de2831e0032f Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Thu, 16 Aug 2018 15:10:07 -0400 Subject: Small formatting change And then we can merge --- googletest/include/gtest/internal/gtest-port.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 1d5b24b..786497d 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -2107,8 +2107,8 @@ class MutexBase { // particular, the owner_ field (a pthread_t) is not explicitly initialized. // This allows initialization to work whether pthread_t is a scalar or struct. // The flag -Wmissing-field-initializers must not be specified for this to work. -# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ - ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false, 0 } +#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ + ::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, 0} // The Mutex class can only be used for mutexes created at runtime. It // shares its API with MutexBase otherwise. -- cgit v0.12 -- cgit v0.12 From 88cd66513c6414cdc6f1d4f7733bd520337864a9 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Fri, 17 Aug 2018 13:25:52 -0400 Subject: Minor formatting/style changes --- googletest/src/gtest.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 7832aa3..a229549 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -138,11 +138,10 @@ # define vsnprintf _vsnprintf #endif // GTEST_OS_WINDOWS - #if GTEST_OS_MAC -# ifndef GTEST_OS_IOS -# include -# endif +#ifndef GTEST_OS_IOS +#include +#endif #endif #if GTEST_HAS_ABSL @@ -5832,16 +5831,16 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { // other parts of Google Test. void ParseGoogleTestFlagsOnly(int* argc, char** argv) { ParseGoogleTestFlagsOnlyImpl(argc, argv); - - // Fix the value of *_NSGetArgc() on macOS, but iff + + // Fix the value of *_NSGetArgc() on macOS, but iff // *_NSGetArgv() == argv // Only applicable to char** version of argv #if GTEST_OS_MAC -# ifndef GTEST_OS_IOS +#ifndef GTEST_OS_IOS if (*_NSGetArgv() == argv) { *_NSGetArgc() = *argc; } -# endif +#endif #endif } void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv) { -- cgit v0.12 From cda442da0b6027bdaf3b37e4df1b1b280e5732ab Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Fri, 17 Aug 2018 13:44:48 -0400 Subject: Formatting --- googletest/include/gtest/gtest-printers.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index 491bcc9..51865f8 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -978,12 +978,13 @@ struct TuplePolicy { static const size_t tuple_size = ::std::tr1::tuple_size::value; template - struct tuple_element : ::std::tr1::tuple_element(I), Tuple> {}; + struct tuple_element : ::std::tr1::tuple_element(I), Tuple> { + }; template - static typename AddReference< - const typename ::std::tr1::tuple_element(I), Tuple>::type>::type get( - const Tuple& tuple) { + static typename AddReference(I), Tuple>::type>::type + get(const Tuple& tuple) { return ::std::tr1::get(tuple); } }; -- cgit v0.12 From 079641531492b0f5b87e08278aa229d047bea1e5 Mon Sep 17 00:00:00 2001 From: Vadim Berezniker Date: Fri, 17 Aug 2018 10:49:10 -0700 Subject: std references shouldn't be fully qualified --- googletest/docs/advanced.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index 0a92e52..3a097f1 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -572,7 +572,7 @@ namespace foo { class Bar { // We want googletest to be able to print instances of this. ... // Create a free inline friend function. - friend ::std::ostream& operator<<(::std::ostream& os, const Bar& bar) { + friend std::ostream& operator<<(std::ostream& os, const Bar& bar) { return os << bar.DebugString(); // whatever needed to print bar to os } }; @@ -580,7 +580,7 @@ class Bar { // We want googletest to be able to print instances of this. // If you can't declare the function in the class it's important that the // << operator is defined in the SAME namespace that defines Bar. C++'s look-up // rules rely on that. -::std::ostream& operator<<(::std::ostream& os, const Bar& bar) { +std::ostream& operator<<(std::ostream& os, const Bar& bar) { return os << bar.DebugString(); // whatever needed to print bar to os } @@ -601,7 +601,7 @@ namespace foo { class Bar { ... - friend void PrintTo(const Bar& bar, ::std::ostream* os) { + friend void PrintTo(const Bar& bar, std::ostream* os) { *os << bar.DebugString(); // whatever needed to print bar to os } }; @@ -609,7 +609,7 @@ class Bar { // If you can't declare the function in the class it's important that PrintTo() // is defined in the SAME namespace that defines Bar. C++'s look-up rules rely // on that. -void PrintTo(const Bar& bar, ::std::ostream* os) { +void PrintTo(const Bar& bar, std::ostream* os) { *os << bar.DebugString(); // whatever needed to print bar to os } -- cgit v0.12 From 02c4f1af9d3cebdb963387a9450f33d22cc29e8f Mon Sep 17 00:00:00 2001 From: Vadim Kotov Date: Mon, 20 Aug 2018 15:31:55 +0300 Subject: docs: fixed broken references to sections in Advanced guide --- googletest/docs/advanced.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index 3a097f1..599b8fb 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -649,7 +649,7 @@ _death tests_. More generally, any test that checks that a program terminates Note that if a piece of code throws an exception, we don't consider it "death" for the purpose of death tests, as the caller of the code could catch the exception and avoid the crash. If you want to verify exceptions thrown by your -code, see [Exception Assertions](#ExceptionAssertions). +code, see [Exception Assertions](#exception-assertions). If you want to test `EXPECT_*()/ASSERT_*()` failures in your test code, see Catching Failures @@ -2120,7 +2120,7 @@ $ foo_test --gtest_repeat=1000 --gtest_filter=FooBar.* Repeat the tests whose name matches the filter 1000 times. ``` -If your test program contains [global set-up/tear-down](#GlobalSetUp) code, it +If your test program contains [global set-up/tear-down](#global-set-up-and-tear-down) code, it will be repeated in each iteration as well, as the flakiness may be in it. You can also specify the repeat count by setting the `GTEST_REPEAT` environment variable. -- cgit v0.12 From ddc618ab31c8b683b52e26304bfd7bd9b4a3bb0f Mon Sep 17 00:00:00 2001 From: Vadim Kotov Date: Mon, 20 Aug 2018 16:20:14 +0300 Subject: docs: fix more broken links to sections in Advanced guide --- googletest/docs/advanced.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index 599b8fb..8065d19 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -1147,7 +1147,7 @@ test has at least one failure of either kind. In your test code, you can call `RecordProperty("key", value)` to log additional information, where `value` can be either a string or an `int`. The *last* value -recorded for a key will be emitted to the [XML output](#XmlReport) if you +recorded for a key will be emitted to the [XML output](#generating-an-xml-report) if you specify one. For example, the test ```c++ @@ -1424,7 +1424,7 @@ will have these names: * `InstantiationName/FooTest.HasBlahBlah/1` for `"miny"` * `InstantiationName/FooTest.HasBlahBlah/2` for `"moe"` -You can use these names in [`--gtest_filter`](#TestFilter). +You can use these names in [`--gtest_filter`](#running-a-subset-of-the-tests). This statement will instantiate all tests from `FooTest` again, each with parameter values `"cat"` and `"dog"`: @@ -1674,7 +1674,7 @@ To test them, we use the following special techniques: * Both static functions and definitions/declarations in an unnamed namespace are only visible within the same translation unit. To test them, you can `#include` the entire `.cc` file being tested in your `*_test.cc` file. - (#including `.cc` files is not a good way to reuse code - you should not do + (including `.cc` files is not a good way to reuse code - you should not do this in production code!) However, a better approach is to move the private code into the -- cgit v0.12 From 72a810596642bceff31b33ea2588902c66fa8e08 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 20 Aug 2018 14:10:58 -0400 Subject: Testing, adding to sample4 unittest --- mybuild/CMakeCache.txt | 491 ++++++++++++++++++++++++++++ mybuild/Testing/Temporary/CTestCostData.txt | 1 + mybuild/Testing/Temporary/LastTest.log | 3 + mybuild/googlemock/gmock.pc | 9 + mybuild/googlemock/gmock_main.pc | 9 + mybuild/googlemock/gtest/gtest.pc | 9 + mybuild/googlemock/gtest/gtest_main.pc | 10 + mybuild/googlemock/gtest/libgtest.a | Bin 0 -> 1849908 bytes mybuild/googlemock/gtest/libgtest_main.a | Bin 0 -> 4124 bytes mybuild/googlemock/gtest/sample4_unittest | Bin 0 -> 1006728 bytes 10 files changed, 532 insertions(+) create mode 100644 mybuild/CMakeCache.txt create mode 100644 mybuild/Testing/Temporary/CTestCostData.txt create mode 100644 mybuild/Testing/Temporary/LastTest.log create mode 100644 mybuild/googlemock/gmock.pc create mode 100644 mybuild/googlemock/gmock_main.pc create mode 100644 mybuild/googlemock/gtest/gtest.pc create mode 100644 mybuild/googlemock/gtest/gtest_main.pc create mode 100644 mybuild/googlemock/gtest/libgtest.a create mode 100644 mybuild/googlemock/gtest/libgtest_main.a create mode 100755 mybuild/googlemock/gtest/sample4_unittest diff --git a/mybuild/CMakeCache.txt b/mybuild/CMakeCache.txt new file mode 100644 index 0000000..7ce5e87 --- /dev/null +++ b/mybuild/CMakeCache.txt @@ -0,0 +1,491 @@ +# This is the CMakeCache file. +# For build in directory: /usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Builds the googlemock subproject +BUILD_GMOCK:BOOL=ON + +//Builds the googletest subproject +BUILD_GTEST:BOOL=OFF + +//Build shared libraries (DLLs). +BUILD_SHARED_LIBS:BOOL=OFF + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or +// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 + +//Flags used by the compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//User executables (bin) +CMAKE_INSTALL_BINDIR:PATH=bin + +//Read-only architecture-independent data (DATAROOTDIR) +CMAKE_INSTALL_DATADIR:PATH= + +//Read-only architecture-independent data root (share) +CMAKE_INSTALL_DATAROOTDIR:PATH=share + +//Documentation root (DATAROOTDIR/doc/PROJECT_NAME) +CMAKE_INSTALL_DOCDIR:PATH= + +//C header files (include) +CMAKE_INSTALL_INCLUDEDIR:PATH=include + +//Info documentation (DATAROOTDIR/info) +CMAKE_INSTALL_INFODIR:PATH= + +//Object code libraries (lib) +CMAKE_INSTALL_LIBDIR:PATH=lib + +//Program executables (libexec) +CMAKE_INSTALL_LIBEXECDIR:PATH=libexec + +//Locale-dependent data (DATAROOTDIR/locale) +CMAKE_INSTALL_LOCALEDIR:PATH= + +//Modifiable single-machine data (var) +CMAKE_INSTALL_LOCALSTATEDIR:PATH=var + +//Man documentation (DATAROOTDIR/man) +CMAKE_INSTALL_MANDIR:PATH= + +//C header files for non-gcc (/usr/include) +CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Run-time variable data (LOCALSTATEDIR/run) +CMAKE_INSTALL_RUNSTATEDIR:PATH= + +//System admin executables (sbin) +CMAKE_INSTALL_SBINDIR:PATH=sbin + +//Modifiable architecture-independent data (com) +CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com + +//Read-only single-machine data (etc) +CMAKE_INSTALL_SYSCONFDIR:PATH=etc + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=googletest-distribution + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Enable installation of googlemock. (Projects embedding googlemock +// may want to turn this OFF.) +INSTALL_GMOCK:BOOL=ON + +//Enable installation of googletest. (Projects embedding googletest +// may want to turn this OFF.) +INSTALL_GTEST:BOOL=ON + +//Path to a program. +PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python + +//Value Computed by CMake +gmock_BINARY_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild/googlemock + +//Dependencies for the target +gmock_LIB_DEPENDS:STATIC=general;-pthread;general;gtest; + +//Value Computed by CMake +gmock_SOURCE_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/googlemock + +//Build all of Google Mock's own tests. +gmock_build_tests:BOOL=OFF + +//Dependencies for the target +gmock_main_LIB_DEPENDS:STATIC=general;-pthread;general;gmock; + +//Value Computed by CMake +googletest-distribution_BINARY_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild + +//Value Computed by CMake +googletest-distribution_SOURCE_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest + +//Value Computed by CMake +gtest_BINARY_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild/googlemock/gtest + +//Dependencies for the target +gtest_LIB_DEPENDS:STATIC=general;-pthread; + +//Value Computed by CMake +gtest_SOURCE_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/googletest + +//Build gtest's sample programs. +gtest_build_samples:BOOL=ON + +//Build all of gtest's own tests. +gtest_build_tests:BOOL=OFF + +//Disable uses of pthreads in gtest. +gtest_disable_pthreads:BOOL=OFF + +//Use shared (DLL) run-time lib even when Google Test is built +// as static lib. +gtest_force_shared_crt:BOOL=OFF + +//Build gtest with internal symbols hidden in shared libraries. +gtest_hide_internal_symbols:BOOL=OFF + +//Dependencies for the target +gtest_main_LIB_DEPENDS:STATIC=general;-pthread;general;gtest; + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=9 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=0 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Have symbol pthread_create +CMAKE_HAVE_LIBC_CREATE:INTERNAL= +//Have include pthread.h +CMAKE_HAVE_PTHREAD_H:INTERNAL=1 +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/usr/local/google/home/misterg/projects/MY_FORKS/googletest +//ADVANCED property for variable: CMAKE_INSTALL_BINDIR +CMAKE_INSTALL_BINDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DATADIR +CMAKE_INSTALL_DATADIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DATAROOTDIR +CMAKE_INSTALL_DATAROOTDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DOCDIR +CMAKE_INSTALL_DOCDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_INCLUDEDIR +CMAKE_INSTALL_INCLUDEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_INFODIR +CMAKE_INSTALL_INFODIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LIBDIR +CMAKE_INSTALL_LIBDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LIBEXECDIR +CMAKE_INSTALL_LIBEXECDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LOCALEDIR +CMAKE_INSTALL_LOCALEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LOCALSTATEDIR +CMAKE_INSTALL_LOCALSTATEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_MANDIR +CMAKE_INSTALL_MANDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_OLDINCLUDEDIR +CMAKE_INSTALL_OLDINCLUDEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_RUNSTATEDIR +CMAKE_INSTALL_RUNSTATEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SBINDIR +CMAKE_INSTALL_SBINDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SHAREDSTATEDIR +CMAKE_INSTALL_SHAREDSTATEDIR-ADVANCED:INTERNAL=1 +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SYSCONFDIR +CMAKE_INSTALL_SYSCONFDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=3 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.9 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//Details about finding PythonInterp +FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[/usr/bin/python][v2.7.13()] +//Details about finding Threads +FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()] +//ADVANCED property for variable: PYTHON_EXECUTABLE +PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1 +//Result of TRY_COMPILE +THREADS_HAVE_PTHREAD_ARG:INTERNAL=TRUE +//Result of TRY_RUN +THREADS_PTHREAD_ARG:INTERNAL=2 +//CMAKE_INSTALL_PREFIX during last run +_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX:INTERNAL=/usr/local + diff --git a/mybuild/Testing/Temporary/CTestCostData.txt b/mybuild/Testing/Temporary/CTestCostData.txt new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/mybuild/Testing/Temporary/CTestCostData.txt @@ -0,0 +1 @@ +--- diff --git a/mybuild/Testing/Temporary/LastTest.log b/mybuild/Testing/Temporary/LastTest.log new file mode 100644 index 0000000..c95a7c3 --- /dev/null +++ b/mybuild/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Aug 20 14:07 EDT +---------------------------------------------------------- +End testing: Aug 20 14:07 EDT diff --git a/mybuild/googlemock/gmock.pc b/mybuild/googlemock/gmock.pc new file mode 100644 index 0000000..d4242cf --- /dev/null +++ b/mybuild/googlemock/gmock.pc @@ -0,0 +1,9 @@ +libdir=/usr/local/lib +includedir=/usr/local/include + +Name: gmock +Description: GoogleMock (without main() function) +Version: 1.9.0 +URL: https://github.com/google/googletest +Libs: -L${libdir} -lgmock -pthread +Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread diff --git a/mybuild/googlemock/gmock_main.pc b/mybuild/googlemock/gmock_main.pc new file mode 100644 index 0000000..2da4fbc --- /dev/null +++ b/mybuild/googlemock/gmock_main.pc @@ -0,0 +1,9 @@ +libdir=/usr/local/lib +includedir=/usr/local/include + +Name: gmock_main +Description: GoogleMock (with main() function) +Version: 1.9.0 +URL: https://github.com/google/googletest +Libs: -L${libdir} -lgmock_main -pthread +Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread diff --git a/mybuild/googlemock/gtest/gtest.pc b/mybuild/googlemock/gtest/gtest.pc new file mode 100644 index 0000000..a9931b8 --- /dev/null +++ b/mybuild/googlemock/gtest/gtest.pc @@ -0,0 +1,9 @@ +libdir=/usr/local/lib +includedir=/usr/local/include + +Name: gtest +Description: GoogleTest (without main() function) +Version: 1.9.0 +URL: https://github.com/google/googletest +Libs: -L${libdir} -lgtest -pthread +Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread diff --git a/mybuild/googlemock/gtest/gtest_main.pc b/mybuild/googlemock/gtest/gtest_main.pc new file mode 100644 index 0000000..57948c7 --- /dev/null +++ b/mybuild/googlemock/gtest/gtest_main.pc @@ -0,0 +1,10 @@ +libdir=/usr/local/lib +includedir=/usr/local/include + +Name: gtest_main +Description: GoogleTest (with main() function) +Version: 1.9.0 +URL: https://github.com/google/googletest +Requires: gtest +Libs: -L${libdir} -lgtest_main -pthread +Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread diff --git a/mybuild/googlemock/gtest/libgtest.a b/mybuild/googlemock/gtest/libgtest.a new file mode 100644 index 0000000..46029a9 Binary files /dev/null and b/mybuild/googlemock/gtest/libgtest.a differ diff --git a/mybuild/googlemock/gtest/libgtest_main.a b/mybuild/googlemock/gtest/libgtest_main.a new file mode 100644 index 0000000..f76d51c Binary files /dev/null and b/mybuild/googlemock/gtest/libgtest_main.a differ diff --git a/mybuild/googlemock/gtest/sample4_unittest b/mybuild/googlemock/gtest/sample4_unittest new file mode 100755 index 0000000..b4355c0 Binary files /dev/null and b/mybuild/googlemock/gtest/sample4_unittest differ -- cgit v0.12 From cfc0d5fb0c59b6e15a991f21cf970e557a698e22 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 20 Aug 2018 14:17:38 -0400 Subject: Testing, adding a few line to sample4 --- googletest/samples/sample4.cc | 10 + googletest/samples/sample4.h | 4 + googletest/samples/sample4_unittest.cc | 7 + mybuild/CMakeCache.txt | 491 ---------------------------- mybuild/Testing/Temporary/CTestCostData.txt | 1 - mybuild/Testing/Temporary/LastTest.log | 3 - mybuild/googlemock/gmock.pc | 9 - mybuild/googlemock/gmock_main.pc | 9 - mybuild/googlemock/gtest/gtest.pc | 9 - mybuild/googlemock/gtest/gtest_main.pc | 10 - mybuild/googlemock/gtest/libgtest.a | Bin 1849908 -> 0 bytes mybuild/googlemock/gtest/libgtest_main.a | Bin 4124 -> 0 bytes mybuild/googlemock/gtest/sample4_unittest | Bin 1006728 -> 0 bytes 13 files changed, 21 insertions(+), 532 deletions(-) delete mode 100644 mybuild/CMakeCache.txt delete mode 100644 mybuild/Testing/Temporary/CTestCostData.txt delete mode 100644 mybuild/Testing/Temporary/LastTest.log delete mode 100644 mybuild/googlemock/gmock.pc delete mode 100644 mybuild/googlemock/gmock_main.pc delete mode 100644 mybuild/googlemock/gtest/gtest.pc delete mode 100644 mybuild/googlemock/gtest/gtest_main.pc delete mode 100644 mybuild/googlemock/gtest/libgtest.a delete mode 100644 mybuild/googlemock/gtest/libgtest_main.a delete mode 100755 mybuild/googlemock/gtest/sample4_unittest diff --git a/googletest/samples/sample4.cc b/googletest/samples/sample4.cc index 2f7c87a..724bcb5 100644 --- a/googletest/samples/sample4.cc +++ b/googletest/samples/sample4.cc @@ -38,6 +38,16 @@ int Counter::Increment() { return counter_++; } +// Returns the current counter value, and decrements it. +// counter can not be less than 0, return 0 in this case + int Counter::Decrement() { + if (counter_==0){ + return counter_; + } + else + return counter_--; + } + // Prints the current counter value to STDOUT. void Counter::Print() const { printf("%d", counter_); diff --git a/googletest/samples/sample4.h b/googletest/samples/sample4.h index fda5f33..a9679ff 100644 --- a/googletest/samples/sample4.h +++ b/googletest/samples/sample4.h @@ -43,6 +43,10 @@ class Counter { // Returns the current counter value, and increments it. int Increment(); +// Returns the current counter value, and decrements it. + int Decrement(); + + // Prints the current counter value to STDOUT. void Print() const; }; diff --git a/googletest/samples/sample4_unittest.cc b/googletest/samples/sample4_unittest.cc index 079a70d..ee655c6 100644 --- a/googletest/samples/sample4_unittest.cc +++ b/googletest/samples/sample4_unittest.cc @@ -37,12 +37,19 @@ namespace { TEST(Counter, Increment) { Counter c; + // Test that counter 0 returns 0 + EXPECT_EQ(0, c.Decrement()); + + // EXPECT_EQ() evaluates its arguments exactly once, so they // can have side effects. EXPECT_EQ(0, c.Increment()); EXPECT_EQ(1, c.Increment()); EXPECT_EQ(2, c.Increment()); + + EXPECT_EQ(3, c.Decrement()); + } } // namespace diff --git a/mybuild/CMakeCache.txt b/mybuild/CMakeCache.txt deleted file mode 100644 index 7ce5e87..0000000 --- a/mybuild/CMakeCache.txt +++ /dev/null @@ -1,491 +0,0 @@ -# This is the CMakeCache file. -# For build in directory: /usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild -# It was generated by CMake: /usr/bin/cmake -# You can edit this file to change values found and used by cmake. -# If you do not want to change any of the values, simply exit the editor. -# If you do want to change a value, simply edit, save, and exit the editor. -# The syntax for the file is as follows: -# KEY:TYPE=VALUE -# KEY is the name of a variable in the cache. -# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. -# VALUE is the current value for the KEY. - -######################## -# EXTERNAL cache entries -######################## - -//Builds the googlemock subproject -BUILD_GMOCK:BOOL=ON - -//Builds the googletest subproject -BUILD_GTEST:BOOL=OFF - -//Build shared libraries (DLLs). -BUILD_SHARED_LIBS:BOOL=OFF - -//Path to a program. -CMAKE_AR:FILEPATH=/usr/bin/ar - -//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or -// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. -CMAKE_BUILD_TYPE:STRING= - -//Enable/Disable color output during build. -CMAKE_COLOR_MAKEFILE:BOOL=ON - -//CXX compiler -CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ - -//A wrapper around 'ar' adding the appropriate '--plugin' option -// for the GCC compiler -CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 - -//A wrapper around 'ranlib' adding the appropriate '--plugin' option -// for the GCC compiler -CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 - -//Flags used by the compiler during all build types. -CMAKE_CXX_FLAGS:STRING= - -//Flags used by the compiler during debug builds. -CMAKE_CXX_FLAGS_DEBUG:STRING=-g - -//Flags used by the compiler during release builds for minimum -// size. -CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG - -//Flags used by the compiler during release builds. -CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG - -//Flags used by the compiler during release builds with debug info. -CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG - -//C compiler -CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc - -//A wrapper around 'ar' adding the appropriate '--plugin' option -// for the GCC compiler -CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 - -//A wrapper around 'ranlib' adding the appropriate '--plugin' option -// for the GCC compiler -CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 - -//Flags used by the compiler during all build types. -CMAKE_C_FLAGS:STRING= - -//Flags used by the compiler during debug builds. -CMAKE_C_FLAGS_DEBUG:STRING=-g - -//Flags used by the compiler during release builds for minimum -// size. -CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG - -//Flags used by the compiler during release builds. -CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG - -//Flags used by the compiler during release builds with debug info. -CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG - -//Flags used by the linker. -CMAKE_EXE_LINKER_FLAGS:STRING= - -//Flags used by the linker during debug builds. -CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during release minsize builds. -CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during release builds. -CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during Release with Debug Info builds. -CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//Enable/Disable output of compile commands during generation. -CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF - -//User executables (bin) -CMAKE_INSTALL_BINDIR:PATH=bin - -//Read-only architecture-independent data (DATAROOTDIR) -CMAKE_INSTALL_DATADIR:PATH= - -//Read-only architecture-independent data root (share) -CMAKE_INSTALL_DATAROOTDIR:PATH=share - -//Documentation root (DATAROOTDIR/doc/PROJECT_NAME) -CMAKE_INSTALL_DOCDIR:PATH= - -//C header files (include) -CMAKE_INSTALL_INCLUDEDIR:PATH=include - -//Info documentation (DATAROOTDIR/info) -CMAKE_INSTALL_INFODIR:PATH= - -//Object code libraries (lib) -CMAKE_INSTALL_LIBDIR:PATH=lib - -//Program executables (libexec) -CMAKE_INSTALL_LIBEXECDIR:PATH=libexec - -//Locale-dependent data (DATAROOTDIR/locale) -CMAKE_INSTALL_LOCALEDIR:PATH= - -//Modifiable single-machine data (var) -CMAKE_INSTALL_LOCALSTATEDIR:PATH=var - -//Man documentation (DATAROOTDIR/man) -CMAKE_INSTALL_MANDIR:PATH= - -//C header files for non-gcc (/usr/include) -CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include - -//Install path prefix, prepended onto install directories. -CMAKE_INSTALL_PREFIX:PATH=/usr/local - -//Run-time variable data (LOCALSTATEDIR/run) -CMAKE_INSTALL_RUNSTATEDIR:PATH= - -//System admin executables (sbin) -CMAKE_INSTALL_SBINDIR:PATH=sbin - -//Modifiable architecture-independent data (com) -CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com - -//Read-only single-machine data (etc) -CMAKE_INSTALL_SYSCONFDIR:PATH=etc - -//Path to a program. -CMAKE_LINKER:FILEPATH=/usr/bin/ld - -//Path to a program. -CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make - -//Flags used by the linker during the creation of modules. -CMAKE_MODULE_LINKER_FLAGS:STRING= - -//Flags used by the linker during debug builds. -CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during release minsize builds. -CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during release builds. -CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during Release with Debug Info builds. -CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//Path to a program. -CMAKE_NM:FILEPATH=/usr/bin/nm - -//Path to a program. -CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy - -//Path to a program. -CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump - -//Value Computed by CMake -CMAKE_PROJECT_NAME:STATIC=googletest-distribution - -//Path to a program. -CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib - -//Flags used by the linker during the creation of dll's. -CMAKE_SHARED_LINKER_FLAGS:STRING= - -//Flags used by the linker during debug builds. -CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during release minsize builds. -CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during release builds. -CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during Release with Debug Info builds. -CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//If set, runtime paths are not added when installing shared libraries, -// but are added when building. -CMAKE_SKIP_INSTALL_RPATH:BOOL=NO - -//If set, runtime paths are not added when using shared libraries. -CMAKE_SKIP_RPATH:BOOL=NO - -//Flags used by the linker during the creation of static libraries. -CMAKE_STATIC_LINKER_FLAGS:STRING= - -//Flags used by the linker during debug builds. -CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during release minsize builds. -CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during release builds. -CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during Release with Debug Info builds. -CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//Path to a program. -CMAKE_STRIP:FILEPATH=/usr/bin/strip - -//If this value is on, makefiles will be generated without the -// .SILENT directive, and all commands will be echoed to the console -// during the make. This is useful for debugging only. With Visual -// Studio IDE projects all commands are done without /nologo. -CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE - -//Enable installation of googlemock. (Projects embedding googlemock -// may want to turn this OFF.) -INSTALL_GMOCK:BOOL=ON - -//Enable installation of googletest. (Projects embedding googletest -// may want to turn this OFF.) -INSTALL_GTEST:BOOL=ON - -//Path to a program. -PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python - -//Value Computed by CMake -gmock_BINARY_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild/googlemock - -//Dependencies for the target -gmock_LIB_DEPENDS:STATIC=general;-pthread;general;gtest; - -//Value Computed by CMake -gmock_SOURCE_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/googlemock - -//Build all of Google Mock's own tests. -gmock_build_tests:BOOL=OFF - -//Dependencies for the target -gmock_main_LIB_DEPENDS:STATIC=general;-pthread;general;gmock; - -//Value Computed by CMake -googletest-distribution_BINARY_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild - -//Value Computed by CMake -googletest-distribution_SOURCE_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest - -//Value Computed by CMake -gtest_BINARY_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild/googlemock/gtest - -//Dependencies for the target -gtest_LIB_DEPENDS:STATIC=general;-pthread; - -//Value Computed by CMake -gtest_SOURCE_DIR:STATIC=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/googletest - -//Build gtest's sample programs. -gtest_build_samples:BOOL=ON - -//Build all of gtest's own tests. -gtest_build_tests:BOOL=OFF - -//Disable uses of pthreads in gtest. -gtest_disable_pthreads:BOOL=OFF - -//Use shared (DLL) run-time lib even when Google Test is built -// as static lib. -gtest_force_shared_crt:BOOL=OFF - -//Build gtest with internal symbols hidden in shared libraries. -gtest_hide_internal_symbols:BOOL=OFF - -//Dependencies for the target -gtest_main_LIB_DEPENDS:STATIC=general;-pthread;general;gtest; - - -######################## -# INTERNAL cache entries -######################## - -//ADVANCED property for variable: CMAKE_AR -CMAKE_AR-ADVANCED:INTERNAL=1 -//This is the directory where this CMakeCache.txt was created -CMAKE_CACHEFILE_DIR:INTERNAL=/usr/local/google/home/misterg/projects/MY_FORKS/googletest/mybuild -//Major version of cmake used to create the current loaded cache -CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 -//Minor version of cmake used to create the current loaded cache -CMAKE_CACHE_MINOR_VERSION:INTERNAL=9 -//Patch version of cmake used to create the current loaded cache -CMAKE_CACHE_PATCH_VERSION:INTERNAL=0 -//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE -CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 -//Path to CMake executable. -CMAKE_COMMAND:INTERNAL=/usr/bin/cmake -//Path to cpack program executable. -CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack -//Path to ctest program executable. -CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest -//ADVANCED property for variable: CMAKE_CXX_COMPILER -CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR -CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB -CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS -CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG -CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL -CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE -CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO -CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_COMPILER -CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_COMPILER_AR -CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB -CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS -CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG -CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL -CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE -CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO -CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//Path to cache edit program executable. -CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake -//Executable file format -CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS -CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG -CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL -CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE -CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS -CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 -//Name of external makefile project generator. -CMAKE_EXTRA_GENERATOR:INTERNAL= -//Name of generator. -CMAKE_GENERATOR:INTERNAL=Unix Makefiles -//Name of generator platform. -CMAKE_GENERATOR_PLATFORM:INTERNAL= -//Name of generator toolset. -CMAKE_GENERATOR_TOOLSET:INTERNAL= -//Have symbol pthread_create -CMAKE_HAVE_LIBC_CREATE:INTERNAL= -//Have include pthread.h -CMAKE_HAVE_PTHREAD_H:INTERNAL=1 -//Source directory with the top level CMakeLists.txt file for this -// project -CMAKE_HOME_DIRECTORY:INTERNAL=/usr/local/google/home/misterg/projects/MY_FORKS/googletest -//ADVANCED property for variable: CMAKE_INSTALL_BINDIR -CMAKE_INSTALL_BINDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_DATADIR -CMAKE_INSTALL_DATADIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_DATAROOTDIR -CMAKE_INSTALL_DATAROOTDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_DOCDIR -CMAKE_INSTALL_DOCDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_INCLUDEDIR -CMAKE_INSTALL_INCLUDEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_INFODIR -CMAKE_INSTALL_INFODIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_LIBDIR -CMAKE_INSTALL_LIBDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_LIBEXECDIR -CMAKE_INSTALL_LIBEXECDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_LOCALEDIR -CMAKE_INSTALL_LOCALEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_LOCALSTATEDIR -CMAKE_INSTALL_LOCALSTATEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_MANDIR -CMAKE_INSTALL_MANDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_OLDINCLUDEDIR -CMAKE_INSTALL_OLDINCLUDEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_RUNSTATEDIR -CMAKE_INSTALL_RUNSTATEDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_SBINDIR -CMAKE_INSTALL_SBINDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_SHAREDSTATEDIR -CMAKE_INSTALL_SHAREDSTATEDIR-ADVANCED:INTERNAL=1 -//Install .so files without execute permission. -CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 -//ADVANCED property for variable: CMAKE_INSTALL_SYSCONFDIR -CMAKE_INSTALL_SYSCONFDIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_LINKER -CMAKE_LINKER-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MAKE_PROGRAM -CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS -CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG -CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL -CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE -CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_NM -CMAKE_NM-ADVANCED:INTERNAL=1 -//number of local generators -CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=3 -//ADVANCED property for variable: CMAKE_OBJCOPY -CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_OBJDUMP -CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 -//Platform information initialized -CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RANLIB -CMAKE_RANLIB-ADVANCED:INTERNAL=1 -//Path to CMake installation. -CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.9 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS -CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG -CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL -CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE -CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH -CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SKIP_RPATH -CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS -CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG -CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL -CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE -CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STRIP -CMAKE_STRIP-ADVANCED:INTERNAL=1 -//uname command -CMAKE_UNAME:INTERNAL=/bin/uname -//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE -CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 -//Details about finding PythonInterp -FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[/usr/bin/python][v2.7.13()] -//Details about finding Threads -FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()] -//ADVANCED property for variable: PYTHON_EXECUTABLE -PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1 -//Result of TRY_COMPILE -THREADS_HAVE_PTHREAD_ARG:INTERNAL=TRUE -//Result of TRY_RUN -THREADS_PTHREAD_ARG:INTERNAL=2 -//CMAKE_INSTALL_PREFIX during last run -_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX:INTERNAL=/usr/local - diff --git a/mybuild/Testing/Temporary/CTestCostData.txt b/mybuild/Testing/Temporary/CTestCostData.txt deleted file mode 100644 index ed97d53..0000000 --- a/mybuild/Testing/Temporary/CTestCostData.txt +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/mybuild/Testing/Temporary/LastTest.log b/mybuild/Testing/Temporary/LastTest.log deleted file mode 100644 index c95a7c3..0000000 --- a/mybuild/Testing/Temporary/LastTest.log +++ /dev/null @@ -1,3 +0,0 @@ -Start testing: Aug 20 14:07 EDT ----------------------------------------------------------- -End testing: Aug 20 14:07 EDT diff --git a/mybuild/googlemock/gmock.pc b/mybuild/googlemock/gmock.pc deleted file mode 100644 index d4242cf..0000000 --- a/mybuild/googlemock/gmock.pc +++ /dev/null @@ -1,9 +0,0 @@ -libdir=/usr/local/lib -includedir=/usr/local/include - -Name: gmock -Description: GoogleMock (without main() function) -Version: 1.9.0 -URL: https://github.com/google/googletest -Libs: -L${libdir} -lgmock -pthread -Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread diff --git a/mybuild/googlemock/gmock_main.pc b/mybuild/googlemock/gmock_main.pc deleted file mode 100644 index 2da4fbc..0000000 --- a/mybuild/googlemock/gmock_main.pc +++ /dev/null @@ -1,9 +0,0 @@ -libdir=/usr/local/lib -includedir=/usr/local/include - -Name: gmock_main -Description: GoogleMock (with main() function) -Version: 1.9.0 -URL: https://github.com/google/googletest -Libs: -L${libdir} -lgmock_main -pthread -Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread diff --git a/mybuild/googlemock/gtest/gtest.pc b/mybuild/googlemock/gtest/gtest.pc deleted file mode 100644 index a9931b8..0000000 --- a/mybuild/googlemock/gtest/gtest.pc +++ /dev/null @@ -1,9 +0,0 @@ -libdir=/usr/local/lib -includedir=/usr/local/include - -Name: gtest -Description: GoogleTest (without main() function) -Version: 1.9.0 -URL: https://github.com/google/googletest -Libs: -L${libdir} -lgtest -pthread -Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread diff --git a/mybuild/googlemock/gtest/gtest_main.pc b/mybuild/googlemock/gtest/gtest_main.pc deleted file mode 100644 index 57948c7..0000000 --- a/mybuild/googlemock/gtest/gtest_main.pc +++ /dev/null @@ -1,10 +0,0 @@ -libdir=/usr/local/lib -includedir=/usr/local/include - -Name: gtest_main -Description: GoogleTest (with main() function) -Version: 1.9.0 -URL: https://github.com/google/googletest -Requires: gtest -Libs: -L${libdir} -lgtest_main -pthread -Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1 -pthread diff --git a/mybuild/googlemock/gtest/libgtest.a b/mybuild/googlemock/gtest/libgtest.a deleted file mode 100644 index 46029a9..0000000 Binary files a/mybuild/googlemock/gtest/libgtest.a and /dev/null differ diff --git a/mybuild/googlemock/gtest/libgtest_main.a b/mybuild/googlemock/gtest/libgtest_main.a deleted file mode 100644 index f76d51c..0000000 Binary files a/mybuild/googlemock/gtest/libgtest_main.a and /dev/null differ diff --git a/mybuild/googlemock/gtest/sample4_unittest b/mybuild/googlemock/gtest/sample4_unittest deleted file mode 100755 index b4355c0..0000000 Binary files a/mybuild/googlemock/gtest/sample4_unittest and /dev/null differ -- cgit v0.12 From 5891bb530736c39568f61ba0bf1a45d60d40f76e Mon Sep 17 00:00:00 2001 From: misterg Date: Mon, 20 Aug 2018 14:48:03 -0400 Subject: googletest export - 209457486 Import of OSS PR, https://github.com/google/googletest/pu... by misterg PiperOrigin-RevId: 209457486 --- googletest/samples/sample4.cc | 10 ++++++++++ googletest/samples/sample4.h | 3 +++ googletest/samples/sample4_unittest.cc | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/googletest/samples/sample4.cc b/googletest/samples/sample4.cc index 2f7c87a..b0ee609 100644 --- a/googletest/samples/sample4.cc +++ b/googletest/samples/sample4.cc @@ -38,6 +38,16 @@ int Counter::Increment() { return counter_++; } +// Returns the current counter value, and decrements it. +// counter can not be less than 0, return 0 in this case +int Counter::Decrement() { + if (counter_ == 0) { + return counter_; + } else { + return counter_--; + } +} + // Prints the current counter value to STDOUT. void Counter::Print() const { printf("%d", counter_); diff --git a/googletest/samples/sample4.h b/googletest/samples/sample4.h index fda5f33..e256f40 100644 --- a/googletest/samples/sample4.h +++ b/googletest/samples/sample4.h @@ -43,6 +43,9 @@ class Counter { // Returns the current counter value, and increments it. int Increment(); + // Returns the current counter value, and decrements it. + int Decrement(); + // Prints the current counter value to STDOUT. void Print() const; }; diff --git a/googletest/samples/sample4_unittest.cc b/googletest/samples/sample4_unittest.cc index 079a70d..d5144c0 100644 --- a/googletest/samples/sample4_unittest.cc +++ b/googletest/samples/sample4_unittest.cc @@ -37,12 +37,17 @@ namespace { TEST(Counter, Increment) { Counter c; + // Test that counter 0 returns 0 + EXPECT_EQ(0, c.Decrement()); + // EXPECT_EQ() evaluates its arguments exactly once, so they // can have side effects. EXPECT_EQ(0, c.Increment()); EXPECT_EQ(1, c.Increment()); EXPECT_EQ(2, c.Increment()); + + EXPECT_EQ(3, c.Decrement()); } } // namespace -- cgit v0.12 From df428ec11891f12c81e2872c0432e342b5403a34 Mon Sep 17 00:00:00 2001 From: misterg Date: Mon, 20 Aug 2018 14:48:45 -0400 Subject: googletest export - 209457654 Import of OSS PR, https://github.com/google/googletest/pu... by misterg PiperOrigin-RevId: 209457654 --- googlemock/include/gmock/gmock-cardinalities.h | 5 +++++ googlemock/include/gmock/gmock-matchers.h | 5 +++++ googlemock/include/gmock/gmock-spec-builders.h | 15 +++++++-------- googletest/include/gtest/gtest-message.h | 5 +++++ googletest/include/gtest/gtest-spi.h | 5 +++++ googletest/include/gtest/gtest-test-part.h | 7 ++++++- googletest/include/gtest/gtest.h | 5 +++++ .../include/gtest/internal/gtest-death-test-internal.h | 5 +++++ googletest/include/gtest/internal/gtest-filepath.h | 5 +++++ googletest/include/gtest/internal/gtest-internal.h | 10 ++++++++++ googletest/src/gtest-internal-inl.h | 5 +++++ 11 files changed, 63 insertions(+), 9 deletions(-) diff --git a/googlemock/include/gmock/gmock-cardinalities.h b/googlemock/include/gmock/gmock-cardinalities.h index bf3ae55..f916931 100644 --- a/googlemock/include/gmock/gmock-cardinalities.h +++ b/googlemock/include/gmock/gmock-cardinalities.h @@ -44,6 +44,9 @@ #include "gmock/internal/gmock-port.h" #include "gtest/gtest.h" +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + namespace testing { // To implement a cardinality Foo, define: @@ -145,4 +148,6 @@ inline Cardinality MakeCardinality(const CardinalityInterface* c) { } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + #endif // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index a001850..3336eff 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -56,6 +56,9 @@ # include // NOLINT -- must be after gtest.h #endif +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + namespace testing { // To implement a matcher Foo for type T, define: @@ -5266,6 +5269,8 @@ PolymorphicMatcher > VariantWith( } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + // Include any custom callback matchers added by the local installation. // We must include this header at the end to make sure it can use the // declarations from this file. diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index 0d83cd6..436e2d8 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -77,6 +77,9 @@ # include // NOLINT #endif +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + namespace testing { // An abstract handle of an expectation. @@ -1357,11 +1360,7 @@ class ReferenceOrValueWrapper { // we need to temporarily disable the warning. We have to do it for // the entire class to suppress the warning, even though it's about // the constructor only. - -#ifdef _MSC_VER -# pragma warning(push) // Saves the current warning state. -# pragma warning(disable:4355) // Temporarily disables warning 4355. -#endif // _MSV_VER +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355) // C++ treats the void type specially. For example, you cannot define // a void-typed variable or pass a void value to a function. @@ -1797,9 +1796,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase { GTEST_DISALLOW_COPY_AND_ASSIGN_(FunctionMockerBase); }; // class FunctionMockerBase -#ifdef _MSC_VER -# pragma warning(pop) // Restores the warning state. -#endif // _MSV_VER +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4355 // Implements methods of FunctionMockerBase. @@ -1844,6 +1841,8 @@ inline Expectation::Expectation(internal::ExpectationBase& exp) // NOLINT } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + // Implementation for ON_CALL and EXPECT_CALL macros. A separate macro is // required to avoid compile errors when the name of the method used in call is // a result of macro expansion. See CompilesWithMethodNameExpandedFromMacro diff --git a/googletest/include/gtest/gtest-message.h b/googletest/include/gtest/gtest-message.h index 107a55c..5ca0416 100644 --- a/googletest/include/gtest/gtest-message.h +++ b/googletest/include/gtest/gtest-message.h @@ -51,6 +51,9 @@ #include "gtest/internal/gtest-port.h" +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + // Ensures that there is at least one operator<< in the global namespace. // See Message& operator<<(...) below for why. void operator<<(const testing::internal::Secret&, int); @@ -247,4 +250,6 @@ std::string StreamableToString(const T& streamable) { } // namespace internal } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + #endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ diff --git a/googletest/include/gtest/gtest-spi.h b/googletest/include/gtest/gtest-spi.h index 26b4aa5..1e89839 100644 --- a/googletest/include/gtest/gtest-spi.h +++ b/googletest/include/gtest/gtest-spi.h @@ -38,6 +38,9 @@ #include "gtest/gtest.h" +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + namespace testing { // This helper class can be used to mock out Google Test failure reporting @@ -112,6 +115,8 @@ class GTEST_API_ SingleFailureChecker { } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + // A set of macros for testing Google Test assertions or code that's expected // to generate Google Test fatal failures. It verifies that the given // statement will cause exactly one fatal Google Test failure with 'substr' diff --git a/googletest/include/gtest/gtest-test-part.h b/googletest/include/gtest/gtest-test-part.h index 66c7db6..1c7b89e 100644 --- a/googletest/include/gtest/gtest-test-part.h +++ b/googletest/include/gtest/gtest-test-part.h @@ -37,6 +37,9 @@ #include "gtest/internal/gtest-internal.h" #include "gtest/internal/gtest-string.h" +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + namespace testing { // A copyable object representing the result of a test part (i.e. an @@ -142,7 +145,7 @@ class GTEST_API_ TestPartResultArray { }; // This interface knows how to report a test part result. -class TestPartResultReporterInterface { +class GTEST_API_ TestPartResultReporterInterface { public: virtual ~TestPartResultReporterInterface() {} @@ -175,4 +178,6 @@ class GTEST_API_ HasNewFatalFailureHelper } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + #endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 65bd9cb..2be8b11 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -66,6 +66,9 @@ #include "gtest/gtest-test-part.h" #include "gtest/gtest-typed-test.h" +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + // Depending on the platform, different string classes are available. // On Linux, in addition to ::std::string, Google also makes use of // class ::string, which has the same interface as ::std::string, but @@ -2330,4 +2333,6 @@ inline int RUN_ALL_TESTS() { return ::testing::UnitTest::GetInstance()->Run(); } +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + #endif // GTEST_INCLUDE_GTEST_GTEST_H_ diff --git a/googletest/include/gtest/internal/gtest-death-test-internal.h b/googletest/include/gtest/internal/gtest-death-test-internal.h index 55e3029..0a9b42c 100644 --- a/googletest/include/gtest/internal/gtest-death-test-internal.h +++ b/googletest/include/gtest/internal/gtest-death-test-internal.h @@ -52,6 +52,9 @@ const char kInternalRunDeathTestFlag[] = "internal_run_death_test"; #if GTEST_HAS_DEATH_TEST +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + // DeathTest is a class that hides much of the complexity of the // GTEST_DEATH_TEST_ macro. It is abstract; its static Create method // returns a concrete class that depends on the prevailing death test @@ -135,6 +138,8 @@ class GTEST_API_ DeathTest { GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest); }; +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + // Factory interface for death tests. May be mocked out for testing. class DeathTestFactory { public: diff --git a/googletest/include/gtest/internal/gtest-filepath.h b/googletest/include/gtest/internal/gtest-filepath.h index c2601a3..ae38d95 100644 --- a/googletest/include/gtest/internal/gtest-filepath.h +++ b/googletest/include/gtest/internal/gtest-filepath.h @@ -42,6 +42,9 @@ #include "gtest/internal/gtest-string.h" +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + namespace testing { namespace internal { @@ -203,4 +206,6 @@ class GTEST_API_ FilePath { } // namespace internal } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index aa36693..9593a45 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -141,6 +141,9 @@ GTEST_API_ std::string AppendUserMessage( #if GTEST_HAS_EXCEPTIONS +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4275 \ +/* an exported class was derived from a class that was not exported */) + // This exception is thrown by (and only by) a failed Google Test // assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions // are enabled). We derive it from std::runtime_error, which is for @@ -152,6 +155,8 @@ class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error { explicit GoogleTestFailureException(const TestPartResult& failure); }; +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4275 + #endif // GTEST_HAS_EXCEPTIONS namespace edit_distance { @@ -528,6 +533,9 @@ GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr); #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + // State of the definition of a type-parameterized test case. class GTEST_API_ TypedTestCasePState { public: @@ -573,6 +581,8 @@ class GTEST_API_ TypedTestCasePState { RegisteredTestsMap registered_tests_; }; +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + // Skips to the first non-space char after the first comma in 'str'; // returns NULL if no comma is found in 'str'. inline const char* SkipComma(const char* str) { diff --git a/googletest/src/gtest-internal-inl.h b/googletest/src/gtest-internal-inl.h index 43effbf..4790041 100644 --- a/googletest/src/gtest-internal-inl.h +++ b/googletest/src/gtest-internal-inl.h @@ -59,6 +59,9 @@ #include "gtest/gtest.h" #include "gtest/gtest-spi.h" +GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ +/* class A needs to have dll-interface to be used by clients of class B */) + namespace testing { // Declares the flags. @@ -1179,4 +1182,6 @@ class StreamingListener : public EmptyTestEventListener { } // namespace internal } // namespace testing +GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 + #endif // GTEST_SRC_GTEST_INTERNAL_INL_H_ -- cgit v0.12 From 735bd75f69f8a1c6240c95915edfa091bfa976ac Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 20 Aug 2018 16:08:33 -0400 Subject: Update CONTRIBUTING.md --- CONTRIBUTING.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ebdfcc..4dfdd95 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,11 @@ Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests. +## Are you a Googler? +If you are a Googler, please create an internal change and +have it reviewed and submitted. The maintainers will normally be in position to upstream the changes. + + ## Contributing A Patch 1. Submit an issue describing your proposed change to the @@ -39,10 +44,6 @@ accept your pull requests. 1. Ensure that your code has an appropriate set of unit tests which all pass. 1. Submit a pull request. -If you are a Googler, it is preferable to first create an internal change and -have it reviewed and submitted, and then create an upstreaming pull -request here. - ## The Google Test and Google Mock Communities ## The Google Test community exists primarily through the -- cgit v0.12 From 759ef7c4e9662321548d1c30528c78ecdba2a05d Mon Sep 17 00:00:00 2001 From: Dakota Hawkins Date: Tue, 24 Jul 2018 11:06:55 -0400 Subject: Improve CMake exported targets. I _think_ this represents some of the "best practices" for exporting targets. They'll be available in a `googletest::` namespace (e.g. `googletest::gmock`) with non-namespaced `ALIAS` targets. - Added GOOGLETEST_VERSION variable - Use `CMakePackageConfigHelpers`, bump minimum CMake version to 2.8.8 Signed-off-by: Dakota Hawkins --- CMakeLists.txt | 37 +++++++++++++++++++++++++++---------- cmake/googletestConfig.cmake.in | 35 +++++++++++++++++++++++++++++++++++ googlemock/CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++------ googletest/CMakeLists.txt | 31 +++++++++++++++++++++++++++---- 4 files changed, 122 insertions(+), 20 deletions(-) create mode 100644 cmake/googletestConfig.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt index f8a97fa..db1b289 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,22 +1,16 @@ -cmake_minimum_required(VERSION 2.6.4) +cmake_minimum_required(VERSION 2.8.8) if (POLICY CMP0048) cmake_policy(SET CMP0048 NEW) endif (POLICY CMP0048) -project( googletest-distribution ) +project(googletest-distribution) +set(GOOGLETEST_VERSION 1.9.0) enable_testing() include(CMakeDependentOption) -if (CMAKE_VERSION VERSION_LESS 2.8.5) - set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "User executables (bin)") - set(CMAKE_INSTALL_LIBDIR "lib${LIB_SUFFIX}" CACHE STRING "Object code libraries (lib)") - set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "C header files (include)") - mark_as_advanced(CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR) -else() - include(GNUInstallDirs) -endif() +include(GNUInstallDirs) option(BUILD_GTEST "Builds the googletest subproject" OFF) @@ -26,8 +20,31 @@ option(BUILD_GMOCK "Builds the googlemock subproject" ON) cmake_dependent_option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON "BUILD_GTEST OR BUILD_GMOCK" OFF) cmake_dependent_option(INSTALL_GMOCK "Enable installation of googlemock. (Projects embedding googlemock may want to turn this OFF.)" ON "BUILD_GMOCK" OFF) +if(WIN32) + set(INSTALL_CMAKE_DIR "cmake" CACHE PATH "CMake exported targets") +else() + set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/gtest" CACHE PATH "CMake exported targets") +endif() + +set(googletest_install_targets) if(BUILD_GMOCK) add_subdirectory( googlemock ) elseif(BUILD_GTEST) add_subdirectory( googletest ) endif() + +if(googletest_install_targets) + include(CMakePackageConfigHelpers) + configure_package_config_file( + "${CMAKE_CURRENT_LIST_DIR}/cmake/googletestConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/googletestConfig.cmake" + INSTALL_DESTINATION "${INSTALL_CMAKE_DIR}") + write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/googletestConfigVersion.cmake + VERSION "${GOOGLETEST_VERSION}" + COMPATIBILITY SameMajorVersion) + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/googletestConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/googletestConfigVersion.cmake + DESTINATION "${INSTALL_CMAKE_DIR}") +endif() diff --git a/cmake/googletestConfig.cmake.in b/cmake/googletestConfig.cmake.in new file mode 100644 index 0000000..3a5957f --- /dev/null +++ b/cmake/googletestConfig.cmake.in @@ -0,0 +1,35 @@ +@PACKAGE_INIT@ + +set(googletest_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@) + +set(googletest_NAMESPACE_TARGETS) +set(googletest_ALL_INCLUDE_DIRS) + +foreach(target @googletest_install_targets@) + include(${CMAKE_CURRENT_LIST_DIR}/${target}ConfigInternal.cmake) + + add_library(googletest::${target} INTERFACE IMPORTED) + set_target_properties(googletest::${target} + PROPERTIES + INTERFACE_LINK_LIBRARIES googletest_${target} + IMPORTED_GLOBAL ON) + if(googletest_BUILD_SHARED_LIBS) + set_target_properties(googletest::${target} + PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1") + endif() + add_library(${target} ALIAS googletest::${target}) + + get_target_property(${target}_INCLUDE_DIRS googletest_${target} INTERFACE_INCLUDE_DIRECTORIES) + + list(APPEND googletest_ALL_INCLUDE_DIRS ${${target}_INCLUDE_DIRS}) + list(APPEND googletest_NAMESPACE_TARGETS googletest::${target}) +endforeach() + +list(REMOVE_DUPLICATES googletest_ALL_INCLUDE_DIRS) +set(GOOGLETEST_INCLUDE_DIRS ${googletest_ALL_INCLUDE_DIRS}) + +list(REMOVE_DUPLICATES googletest_NAMESPACE_TARGETS) +set(GOOGLETEST_LIBRARIES ${googletest_NAMESPACE_TARGETS}) + +set(GOOGLETEST_VERSION "@GOOGLETEST_VERSION@") diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index 07b6ad2..1db14a2 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -37,7 +37,7 @@ if (CMAKE_VERSION VERSION_LESS 3.0) project(gmock CXX C) else() cmake_policy(SET CMP0048 NEW) - project(gmock VERSION 1.9.0 LANGUAGES CXX C) + project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) endif() cmake_minimum_required(VERSION 2.6.4) @@ -120,18 +120,45 @@ endif() # to the targets for when we are part of a parent build (ie being pulled # in via add_subdirectory() rather than being a standalone build). if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") - target_include_directories(gmock SYSTEM INTERFACE "${gmock_SOURCE_DIR}/include") - target_include_directories(gmock_main SYSTEM INTERFACE "${gmock_SOURCE_DIR}/include") + target_include_directories(gmock SYSTEM + INTERFACE + $ + $ + $ + $ + $) + target_include_directories(gmock_main SYSTEM + INTERFACE + $ + $ + $ + $ + $) endif() ######################################################################## # # Install rules if(INSTALL_GMOCK) - install(TARGETS gmock gmock_main + install(TARGETS gmock + EXPORT gmockConfigInternal RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + install(EXPORT gmockConfigInternal + DESTINATION "${INSTALL_CMAKE_DIR}" + NAMESPACE googletest_) + install(TARGETS gmock_main + EXPORT gmock_mainConfigInternal + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + install(EXPORT gmock_mainConfigInternal + DESTINATION "${INSTALL_CMAKE_DIR}" + NAMESPACE googletest_) + set(googletest_install_targets + ${googletest_install_targets} gmock gmock_main PARENT_SCOPE) + install(DIRECTORY "${gmock_SOURCE_DIR}/include/gmock" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index 2c735f6..3ab964f 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -44,7 +44,7 @@ if (CMAKE_VERSION VERSION_LESS 3.0) project(gtest CXX C) else() cmake_policy(SET CMP0048 NEW) - project(gtest VERSION 1.9.0 LANGUAGES CXX C) + project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) endif() cmake_minimum_required(VERSION 2.6.4) @@ -118,18 +118,41 @@ target_link_libraries(gtest_main gtest) # to the targets for when we are part of a parent build (ie being pulled # in via add_subdirectory() rather than being a standalone build). if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") - target_include_directories(gtest SYSTEM INTERFACE "${gtest_SOURCE_DIR}/include") - target_include_directories(gtest_main SYSTEM INTERFACE "${gtest_SOURCE_DIR}/include") + target_include_directories(gtest SYSTEM + INTERFACE + $ + $ + $) + target_include_directories(gtest_main SYSTEM + INTERFACE + $ + $ + $) endif() ######################################################################## # # Install rules if(INSTALL_GTEST) - install(TARGETS gtest gtest_main + install(TARGETS gtest + EXPORT gtestConfigInternal RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + install(EXPORT gtestConfigInternal + DESTINATION "${INSTALL_CMAKE_DIR}" + NAMESPACE googletest_) + install(TARGETS gtest_main + EXPORT gtest_mainConfigInternal + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + install(EXPORT gtest_mainConfigInternal + DESTINATION "${INSTALL_CMAKE_DIR}" + NAMESPACE googletest_) + set(googletest_install_targets + ${googletest_install_targets} gtest gtest_main PARENT_SCOPE) + install(DIRECTORY "${gtest_SOURCE_DIR}/include/gtest" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") -- cgit v0.12 From aff0379441a392d618ec87b6d55a29070e97eaf1 Mon Sep 17 00:00:00 2001 From: Stefano Soffia Date: Fri, 1 Dec 2017 12:48:46 +0100 Subject: Install CMake export files Rework of the closed pull request #768 --- CMakeLists.txt | 31 +------------ cmake/googletestConfig.cmake.in | 35 --------------- googlemock/CMakeLists.txt | 84 ++++++++--------------------------- googletest/CMakeLists.txt | 77 ++++++++++++-------------------- googletest/cmake/Config.cmake.in | 9 ++++ googletest/cmake/internal_utils.cmake | 35 ++++++++++++++- 6 files changed, 93 insertions(+), 178 deletions(-) delete mode 100644 cmake/googletestConfig.cmake.in create mode 100644 googletest/cmake/Config.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt index db1b289..d773211 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,39 +12,12 @@ enable_testing() include(CMakeDependentOption) include(GNUInstallDirs) -option(BUILD_GTEST "Builds the googletest subproject" OFF) - #Note that googlemock target already builds googletest option(BUILD_GMOCK "Builds the googlemock subproject" ON) +option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) -cmake_dependent_option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON "BUILD_GTEST OR BUILD_GMOCK" OFF) -cmake_dependent_option(INSTALL_GMOCK "Enable installation of googlemock. (Projects embedding googlemock may want to turn this OFF.)" ON "BUILD_GMOCK" OFF) - -if(WIN32) - set(INSTALL_CMAKE_DIR "cmake" CACHE PATH "CMake exported targets") -else() - set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/gtest" CACHE PATH "CMake exported targets") -endif() - -set(googletest_install_targets) if(BUILD_GMOCK) add_subdirectory( googlemock ) -elseif(BUILD_GTEST) +else() add_subdirectory( googletest ) endif() - -if(googletest_install_targets) - include(CMakePackageConfigHelpers) - configure_package_config_file( - "${CMAKE_CURRENT_LIST_DIR}/cmake/googletestConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/googletestConfig.cmake" - INSTALL_DESTINATION "${INSTALL_CMAKE_DIR}") - write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/googletestConfigVersion.cmake - VERSION "${GOOGLETEST_VERSION}" - COMPATIBILITY SameMajorVersion) - install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/googletestConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/googletestConfigVersion.cmake - DESTINATION "${INSTALL_CMAKE_DIR}") -endif() diff --git a/cmake/googletestConfig.cmake.in b/cmake/googletestConfig.cmake.in deleted file mode 100644 index 3a5957f..0000000 --- a/cmake/googletestConfig.cmake.in +++ /dev/null @@ -1,35 +0,0 @@ -@PACKAGE_INIT@ - -set(googletest_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@) - -set(googletest_NAMESPACE_TARGETS) -set(googletest_ALL_INCLUDE_DIRS) - -foreach(target @googletest_install_targets@) - include(${CMAKE_CURRENT_LIST_DIR}/${target}ConfigInternal.cmake) - - add_library(googletest::${target} INTERFACE IMPORTED) - set_target_properties(googletest::${target} - PROPERTIES - INTERFACE_LINK_LIBRARIES googletest_${target} - IMPORTED_GLOBAL ON) - if(googletest_BUILD_SHARED_LIBS) - set_target_properties(googletest::${target} - PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1") - endif() - add_library(${target} ALIAS googletest::${target}) - - get_target_property(${target}_INCLUDE_DIRS googletest_${target} INTERFACE_INCLUDE_DIRECTORIES) - - list(APPEND googletest_ALL_INCLUDE_DIRS ${${target}_INCLUDE_DIRS}) - list(APPEND googletest_NAMESPACE_TARGETS googletest::${target}) -endforeach() - -list(REMOVE_DUPLICATES googletest_ALL_INCLUDE_DIRS) -set(GOOGLETEST_INCLUDE_DIRS ${googletest_ALL_INCLUDE_DIRS}) - -list(REMOVE_DUPLICATES googletest_NAMESPACE_TARGETS) -set(GOOGLETEST_LIBRARIES ${googletest_NAMESPACE_TARGETS}) - -set(GOOGLETEST_VERSION "@GOOGLETEST_VERSION@") diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index 1db14a2..195d254 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -54,15 +54,11 @@ add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest") # These commands only run if this is the main project if(CMAKE_PROJECT_NAME STREQUAL "gmock" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution") - # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to # make it prominent in the GUI. option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) - else() - mark_as_advanced(gmock_build_tests) - endif() # Although Google Test's CMakeLists.txt calls this function, the @@ -71,12 +67,13 @@ endif() config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake # Adds Google Mock's and Google Test's header directories to the search path. -include_directories("${gmock_SOURCE_DIR}/include" - "${gmock_SOURCE_DIR}" - "${gtest_SOURCE_DIR}/include" - # This directory is needed to build directly from Google - # Test sources. - "${gtest_SOURCE_DIR}") +set(gmock_build_include_dirs + "${gmock_SOURCE_DIR}/include" + "${gmock_SOURCE_DIR}" + "${gtest_SOURCE_DIR}/include" + # This directory is needed to build directly from Google Test sources. + "${gtest_SOURCE_DIR}") +include_directories(${gmock_build_include_dirs}) # Summary of tuple support for Microsoft Visual Studio: # Compiler version(MS) version(cmake) Support @@ -111,69 +108,26 @@ if (MSVC) src/gmock_main.cc) else() cxx_library(gmock "${cxx_strict}" src/gmock-all.cc) - target_link_libraries(gmock gtest) + target_link_libraries(gmock PUBLIC gtest) cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc) - target_link_libraries(gmock_main gmock) + target_link_libraries(gmock_main PUBLIC gmock) endif() - # If the CMake version supports it, attach header directory information # to the targets for when we are part of a parent build (ie being pulled # in via add_subdirectory() rather than being a standalone build). if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") - target_include_directories(gmock SYSTEM - INTERFACE - $ - $ - $ - $ - $) - target_include_directories(gmock_main SYSTEM - INTERFACE - $ - $ - $ - $ - $) + target_include_directories(gmock SYSTEM INTERFACE + "$" + $) + target_include_directories(gmock_main SYSTEM INTERFACE + "$" + $) endif() ######################################################################## # # Install rules -if(INSTALL_GMOCK) - install(TARGETS gmock - EXPORT gmockConfigInternal - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") - install(EXPORT gmockConfigInternal - DESTINATION "${INSTALL_CMAKE_DIR}" - NAMESPACE googletest_) - install(TARGETS gmock_main - EXPORT gmock_mainConfigInternal - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") - install(EXPORT gmock_mainConfigInternal - DESTINATION "${INSTALL_CMAKE_DIR}" - NAMESPACE googletest_) - set(googletest_install_targets - ${googletest_install_targets} gmock gmock_main PARENT_SCOPE) - - install(DIRECTORY "${gmock_SOURCE_DIR}/include/gmock" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") - - # configure and install pkgconfig files - configure_file( - cmake/gmock.pc.in - "${gmock_BINARY_DIR}/gmock.pc" - @ONLY) - configure_file( - cmake/gmock_main.pc.in - "${gmock_BINARY_DIR}/gmock_main.pc" - @ONLY) - install(FILES "${gmock_BINARY_DIR}/gmock.pc" "${gmock_BINARY_DIR}/gmock_main.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") -endif() +install_project(gmock gmock_main) ######################################################################## # @@ -240,13 +194,13 @@ if (gmock_build_tests) endif() else() cxx_library(gmock_main_no_exception "${cxx_no_exception}" src/gmock_main.cc) - target_link_libraries(gmock_main_no_exception gmock) + target_link_libraries(gmock_main_no_exception PUBLIC gmock) cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" src/gmock_main.cc) - target_link_libraries(gmock_main_no_rtti gmock) + target_link_libraries(gmock_main_no_rtti PUBLIC gmock) cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" src/gmock_main.cc) - target_link_libraries(gmock_main_use_own_tuple gmock) + target_link_libraries(gmock_main_use_own_tuple PUBLIC gmock) endif() cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}" gmock_main_no_exception test/gmock-more-actions_test.cc) diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index 3ab964f..2ac9aa0 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -85,10 +85,30 @@ include(cmake/internal_utils.cmake) config_compiler_and_linker() # Defined in internal_utils.cmake. +# Create the CMake package file descriptors. +if (INSTALL_GTEST) + include(CMakePackageConfigHelpers) + set(cmake_package_name GTest) + set(targets_export_name ${cmake_package_name}Targets CACHE INTERNAL "") + set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated" CACHE INTERNAL "") + set(cmake_files_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${cmake_package_name}") + set(version_file "${generated_dir}/${cmake_package_name}ConfigVersion.cmake") + write_basic_package_version_file(${version_file} COMPATIBILITY AnyNewerVersion) + install(EXPORT ${targets_export_name} + NAMESPACE ${cmake_package_name}:: + DESTINATION ${cmake_files_install_dir}) + set(config_file "${generated_dir}/${cmake_package_name}Config.cmake") + configure_package_config_file("${gtest_SOURCE_DIR}/cmake/Config.cmake.in" + "${config_file}" INSTALL_DESTINATION ${cmake_files_install_dir}) + install(FILES ${version_file} ${config_file} + DESTINATION ${cmake_files_install_dir}) +endif() + # Where Google Test's .h files can be found. -include_directories( +set(gtest_build_include_dirs "${gtest_SOURCE_DIR}/include" "${gtest_SOURCE_DIR}") +include_directories(${gtest_build_include_dirs}) # Summary of tuple support for Microsoft Visual Studio: # Compiler version(MS) version(cmake) Support @@ -112,62 +132,23 @@ endif() # aggressive about warnings. cxx_library(gtest "${cxx_strict}" src/gtest-all.cc) cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc) -target_link_libraries(gtest_main gtest) - # If the CMake version supports it, attach header directory information # to the targets for when we are part of a parent build (ie being pulled # in via add_subdirectory() rather than being a standalone build). if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") - target_include_directories(gtest SYSTEM - INTERFACE - $ - $ - $) - target_include_directories(gtest_main SYSTEM - INTERFACE - $ - $ - $) + target_include_directories(gtest SYSTEM INTERFACE + "$" + $) + target_include_directories(gtest_main SYSTEM INTERFACE + "$" + $) endif() +target_link_libraries(gtest_main PUBLIC gtest) ######################################################################## # # Install rules -if(INSTALL_GTEST) - install(TARGETS gtest - EXPORT gtestConfigInternal - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") - install(EXPORT gtestConfigInternal - DESTINATION "${INSTALL_CMAKE_DIR}" - NAMESPACE googletest_) - install(TARGETS gtest_main - EXPORT gtest_mainConfigInternal - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") - install(EXPORT gtest_mainConfigInternal - DESTINATION "${INSTALL_CMAKE_DIR}" - NAMESPACE googletest_) - set(googletest_install_targets - ${googletest_install_targets} gtest gtest_main PARENT_SCOPE) - - install(DIRECTORY "${gtest_SOURCE_DIR}/include/gtest" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") - - # configure and install pkgconfig files - configure_file( - cmake/gtest.pc.in - "${gtest_BINARY_DIR}/gtest.pc" - @ONLY) - configure_file( - cmake/gtest_main.pc.in - "${gtest_BINARY_DIR}/gtest_main.pc" - @ONLY) - install(FILES "${gtest_BINARY_DIR}/gtest.pc" "${gtest_BINARY_DIR}/gtest_main.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") -endif() +install_project(gtest gtest_main) ######################################################################## # diff --git a/googletest/cmake/Config.cmake.in b/googletest/cmake/Config.cmake.in new file mode 100644 index 0000000..12be449 --- /dev/null +++ b/googletest/cmake/Config.cmake.in @@ -0,0 +1,9 @@ +@PACKAGE_INIT@ +include(CMakeFindDependencyMacro) +if (@GTEST_HAS_PTHREAD@) + set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@) + find_dependency(Threads) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") +check_required_components("@project_name@") diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 566c02f..94702de 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -171,9 +171,18 @@ function(cxx_library_with_type name type cxx_flags) set_target_properties(${name} PROPERTIES COMPILE_DEFINITIONS "GTEST_CREATE_SHARED_LIBRARY=1") + if (NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") + target_compile_definitions(${name} INTERFACE + $) + endif() endif() if (DEFINED GTEST_HAS_PTHREAD) - target_link_libraries(${name} ${CMAKE_THREAD_LIBS_INIT}) + if ("${CMAKE_VERSION}" VERSION_LESS "3.1.0") + set(threads_spec ${CMAKE_THREAD_LIBS_INIT}) + else() + set(threads_spec Threads::Threads) + endif() + target_link_libraries(${name} PUBLIC ${threads_spec}) endif() endfunction() @@ -283,3 +292,27 @@ function(py_test name) endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1) endif(PYTHONINTERP_FOUND) endfunction() + +# install_project(targets...) +# +# Installs the specified targets and configures the associated pkgconfig files. +function(install_project) + if(INSTALL_GTEST) + install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + # Install the project targets. + install(TARGETS ${ARGN} + EXPORT ${targets_export_name} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + # Configure and install pkgconfig files. + foreach(t ${ARGN}) + set(configured_pc "${generated_dir}/${t}.pc") + configure_file("${PROJECT_SOURCE_DIR}/cmake/${t}.pc.in" + "${configured_pc}" @ONLY) + install(FILES "${configured_pc}" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + endforeach() + endif() +endfunction() -- cgit v0.12