diff options
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/docs/advanced.md | 4 | ||||
-rw-r--r-- | googletest/include/gtest/gtest-death-test.h | 5 | ||||
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 8 | ||||
-rw-r--r-- | googletest/test/googletest-param-test-test.cc | 6 |
4 files changed, 12 insertions, 11 deletions
diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md index d65f1eff..3c3c6fe9 100644 --- a/googletest/docs/advanced.md +++ b/googletest/docs/advanced.md @@ -401,7 +401,7 @@ alone with them. For a list of matchers gMock provides, read your [own matchers](../../googlemock/docs/cook_book.md#NewMatchers) too. gMock is bundled with googletest, so you don't need to add any build dependency -in order to take advantage of this. Just include `"testing/base/public/gmock.h"` +in order to take advantage of this. Just include `"gmock/gmock.h"` and you're ready to go. ### More String Assertions @@ -863,7 +863,7 @@ restored afterwards, so you need not do that yourself. For example: ```c++ int main(int argc, char** argv) { - InitGoogle(argv[0], &argc, &argv, true); + ::testing::InitGoogleTest(&argc, argv); ::testing::FLAGS_gtest_death_test_style = "fast"; return RUN_ALL_TESTS(); } diff --git a/googletest/include/gtest/gtest-death-test.h b/googletest/include/gtest/gtest-death-test.h index dc878ffb..2bd41cf3 100644 --- a/googletest/include/gtest/gtest-death-test.h +++ b/googletest/include/gtest/gtest-death-test.h @@ -190,11 +190,10 @@ GTEST_API_ bool InDeathTestChild(); class GTEST_API_ ExitedWithCode { public: explicit ExitedWithCode(int exit_code); + ExitedWithCode(const ExitedWithCode&) = default; + void operator=(const ExitedWithCode& other) = delete; bool operator()(int exit_status) const; private: - // No implementation - assignment is unsupported. - void operator=(const ExitedWithCode& other); - const int exit_code_; }; diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 44307a13..893c7f30 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -681,8 +681,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // A macro to disallow copy constructor and operator= // This should be used in the private: declarations for a class. #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \ - type(type const &) = delete; \ - type& operator=(type const &) = delete + type(type const&) = delete; \ + type& operator=(type const&) = delete // A macro to disallow move operator= // This should be used in the private: declarations for a class. @@ -692,8 +692,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // A macro to disallow move constructor and operator= // This should be used in the private: declarations for a class. #define GTEST_DISALLOW_MOVE_AND_ASSIGN_(type) \ - type(type &&) noexcept = delete; \ - type& operator=(type &&) noexcept = delete + type(type&&) noexcept = delete; \ + type& operator=(type&&) noexcept = delete // Tell the compiler to warn about unused return values for functions declared // with this macro. The macro should be used on function declarations diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc index 2b26e95f..c852220e 100644 --- a/googletest/test/googletest-param-test-test.cc +++ b/googletest/test/googletest-param-test-test.cc @@ -491,8 +491,10 @@ class NonDefaultConstructAssignString { public: NonDefaultConstructAssignString(const std::string& s) : str_(s) {} NonDefaultConstructAssignString() = delete; - NonDefaultConstructAssignString(const NonDefaultConstructAssignString&) = default; - NonDefaultConstructAssignString& operator=(const NonDefaultConstructAssignString&) = delete; + NonDefaultConstructAssignString(const NonDefaultConstructAssignString&) = + default; + NonDefaultConstructAssignString& operator=( + const NonDefaultConstructAssignString&) = delete; ~NonDefaultConstructAssignString() = default; const std::string& str() const { return str_; } |