From 68f19facc26aba2e1d3e73978b7daf9b0bfa3970 Mon Sep 17 00:00:00 2001 From: Claus Stovgaard Date: Tue, 30 Aug 2016 16:15:46 +0200 Subject: Moved the ignoring of *.pyc files to top level for also covering googlemock python scripts. --- .gitignore | 2 ++ googletest/.gitignore | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 googletest/.gitignore diff --git a/.gitignore b/.gitignore index ce310bc3..1da12d1c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ # Ignore CI build directory build/ +# python +*.pyc diff --git a/googletest/.gitignore b/googletest/.gitignore deleted file mode 100644 index 4b7be4b9..00000000 --- a/googletest/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# python -*.pyc -- cgit v1.2.3 From 484ec91c2274f7b06e6a7736060be04fe35998bd Mon Sep 17 00:00:00 2001 From: drgler Date: Wed, 9 Aug 2017 19:07:22 +0200 Subject: Infinite Loop when calling a mock function that takes boost::filesystem::path as parameter #521: Add is_same type trait --- googletest/include/gtest/internal/gtest-port.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index f6cd3c03..7e008c05 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -2241,6 +2241,12 @@ template const bool bool_constant::value; typedef bool_constant false_type; typedef bool_constant true_type; +template +struct is_same : public false_type {}; + +template +struct is_same : public true_type {}; + template struct is_pointer : public false_type {}; -- cgit v1.2.3 From 71ca4bae1085d7f2adefcbd16b0b7cebb81d540f Mon Sep 17 00:00:00 2001 From: drgler Date: Wed, 9 Aug 2017 19:07:22 +0200 Subject: Infinite Loop when calling a mock function that takes boost::filesystem::path as parameter #521: Add is_same type trait and prevent infinite loops for recursive containers --- googletest/include/gtest/gtest-printers.h | 19 +++++++++------- googletest/include/gtest/internal/gtest-internal.h | 25 ++++++++++++++++++++++ googletest/include/gtest/internal/gtest-port.h | 6 ++++++ 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/googletest/include/gtest/gtest-printers.h b/googletest/include/gtest/gtest-printers.h index e850d605..fba76614 100644 --- a/googletest/include/gtest/gtest-printers.h +++ b/googletest/include/gtest/gtest-printers.h @@ -460,15 +460,17 @@ void PrintTo(const T& value, ::std::ostream* os) { // DefaultPrintTo() is overloaded. The type of its first argument // determines which version will be picked. // - // Note that we check for container types here, prior to we check - // for protocol message types in our operator<<. The rationale is: + // Note that we check for recursive and other container types here, prior + // to we check for protocol message types in our operator<<. The rationale is: // // For protocol messages, we want to give people a chance to // override Google Mock's format by defining a PrintTo() or // operator<<. For STL containers, other formats can be // incompatible with Google Mock's format for the container // elements; therefore we check for container types here to ensure - // that our format is used. + // that our format is used. To prevent an infinite runtime recursion + // during the output of recursive container types, we check first for + // those. // // Note that MSVC and clang-cl do allow an implicit conversion from // pointer-to-function to pointer-to-object, but clang-cl warns on it. @@ -477,16 +479,17 @@ void PrintTo(const T& value, ::std::ostream* os) { // function pointers so that the `*os << p` in the object pointer overload // doesn't cause that warning either. DefaultPrintTo( - WrapPrinterType(0)) == sizeof(IsContainer) - ? kPrintContainer : !is_pointer::value - ? kPrintOther + WrapPrinterType< + (sizeof(IsContainerTest(0)) == sizeof(IsContainer)) && !IsRecursiveContainer::value + ? kPrintContainer : !is_pointer::value + ? kPrintOther #if GTEST_LANG_CXX11 : std::is_function::type>::value #else : !internal::ImplicitlyConvertible::value #endif - ? kPrintFunctionPointer - : kPrintPointer>(), + ? kPrintFunctionPointer + : kPrintPointer>(), value, os); } diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 72d83f0b..2a6e4dad 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -940,6 +940,31 @@ typedef char IsNotContainer; template IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; } +template (0)) == sizeof(IsContainer) +> +struct IsRecursiveContainerImpl; + +template +struct IsRecursiveContainerImpl : public false_type {}; + +template +struct IsRecursiveContainerImpl { + typedef + typename IteratorTraits::value_type + value_type; + typedef is_same type; +}; + +// IsRecursiveContainer is a unary compile-time predicate that +// evaluates whether C is a recursive container type. A recursive container +// type is a container type whose value_type is equal to the container type +// itself. An example for a recursive container type is +// boost::filesystem::path, whose iterator has a value_type that is equal to +// boost::filesystem::path. +template +struct IsRecursiveContainer : public IsRecursiveContainerImpl::type {}; + // EnableIf::type is void when 'Cond' is true, and // undefined when 'Cond' is false. To use SFINAE to make a function // overload only apply when a particular expression is true, add diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index f6cd3c03..7e008c05 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -2241,6 +2241,12 @@ template const bool bool_constant::value; typedef bool_constant false_type; typedef bool_constant true_type; +template +struct is_same : public false_type {}; + +template +struct is_same : public true_type {}; + template struct is_pointer : public false_type {}; -- cgit v1.2.3 From 6e1970e2376c14bf658eb88f655a054030353f9f Mon Sep 17 00:00:00 2001 From: Alyssa Wilk Date: Thu, 10 Aug 2017 09:41:09 -0400 Subject: Adding a flag option to change the default mock type --- googlemock/include/gmock/gmock-spec-builders.h | 1 - googlemock/include/gmock/gmock.h | 1 + googlemock/src/gmock-spec-builders.cc | 3 +- googlemock/src/gmock.cc | 24 ++++++++++++++- googlemock/test/gmock-spec-builders_test.cc | 35 ++++++++++++++++++++++ googlemock/test/gmock_test.cc | 41 ++++++++++++++++++++++++++ 6 files changed, 102 insertions(+), 3 deletions(-) diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h index 39f72129..96802444 100644 --- a/googlemock/include/gmock/gmock-spec-builders.h +++ b/googlemock/include/gmock/gmock-spec-builders.h @@ -363,7 +363,6 @@ enum CallReaction { kAllow, kWarn, kFail, - kDefault = kWarn // By default, warn about uninteresting calls. }; } // namespace internal diff --git a/googlemock/include/gmock/gmock.h b/googlemock/include/gmock/gmock.h index 6735c71b..5764bc85 100644 --- a/googlemock/include/gmock/gmock.h +++ b/googlemock/include/gmock/gmock.h @@ -71,6 +71,7 @@ namespace testing { // Declares Google Mock flags that we want a user to use programmatically. GMOCK_DECLARE_bool_(catch_leaked_mocks); GMOCK_DECLARE_string_(verbose); +GMOCK_DECLARE_int32_(default_mock_behavior); // Initializes Google Mock. This must be called before running the // tests. In particular, it parses the command line for the flags diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index 2fa1ee4b..1fc8d988 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -648,7 +648,8 @@ internal::CallReaction Mock::GetReactionOnUninterestingCalls( GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { internal::MutexLock l(&internal::g_gmock_mutex); return (g_uninteresting_call_reaction.count(mock_obj) == 0) ? - internal::kDefault : g_uninteresting_call_reaction[mock_obj]; + static_cast(GMOCK_FLAG(default_mock_behavior)) : + g_uninteresting_call_reaction[mock_obj]; } // Tells Google Mock to ignore mock_obj when checking for leaked mock diff --git a/googlemock/src/gmock.cc b/googlemock/src/gmock.cc index eac3d842..3c370510 100644 --- a/googlemock/src/gmock.cc +++ b/googlemock/src/gmock.cc @@ -48,6 +48,13 @@ GMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity, " warning - prints warnings and errors.\n" " error - prints errors only."); +GMOCK_DEFINE_int32_(default_mock_behavior, 1, + "Controls the default behavior of mocks." + " Valid values:\n" + " 0 - by default, mocks act as NiceMocks.\n" + " 1 - by default, mocks act as NaggyMocks.\n" + " 2 - by default, mocks act as StrictMocks."); + namespace internal { // Parses a string as a command line flag. The string should have the @@ -120,6 +127,19 @@ static bool ParseGoogleMockStringFlag(const char* str, const char* flag, return true; } +static bool ParseGoogleMockIntFlag(const char* str, const char* flag, + int* value) { + // Gets the value of the flag as a string. + const char* const value_str = ParseGoogleMockFlagValue(str, flag, true); + + // Aborts if the parsing failed. + if (value_str == NULL) return false; + + // Sets *value to the value of the flag. + *value = atoi(value_str); + return true; +} + // The internal implementation of InitGoogleMock(). // // The type parameter CharType can be instantiated to either char or @@ -138,7 +158,9 @@ void InitGoogleMockImpl(int* argc, CharType** argv) { // Do we see a Google Mock flag? if (ParseGoogleMockBoolFlag(arg, "catch_leaked_mocks", &GMOCK_FLAG(catch_leaked_mocks)) || - ParseGoogleMockStringFlag(arg, "verbose", &GMOCK_FLAG(verbose))) { + ParseGoogleMockStringFlag(arg, "verbose", &GMOCK_FLAG(verbose)) || + ParseGoogleMockIntFlag(arg, "default_mock_behavior", + &GMOCK_FLAG(default_mock_behavior))) { // Yes. Shift the remainder of the argv list left by one. Note // that argv has (*argc + 1) elements, the last one always being // NULL. The following loop moves the trailing NULL element as diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index 389e0709..00cb1198 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -93,8 +93,11 @@ using testing::Sequence; using testing::SetArgPointee; using testing::internal::ExpectationTester; using testing::internal::FormatFileLocation; +using testing::internal::kAllow; using testing::internal::kErrorVerbosity; +using testing::internal::kFail; using testing::internal::kInfoVerbosity; +using testing::internal::kWarn; using testing::internal::kWarningVerbosity; using testing::internal::linked_ptr; @@ -691,6 +694,38 @@ TEST(ExpectCallSyntaxTest, WarnsOnTooFewActions) { b.DoB(); } +TEST(ExpectCallSyntaxTest, WarningIsErrorWithFlag) { + int original_behavior = testing::GMOCK_FLAG(default_mock_behavior); + + testing::GMOCK_FLAG(default_mock_behavior) = kAllow; + CaptureStdout(); + { + MockA a; + a.DoA(0); + } + std::string output = GetCapturedStdout(); + EXPECT_TRUE(output.empty()) << output; + + testing::GMOCK_FLAG(default_mock_behavior) = kWarn; + CaptureStdout(); + { + MockA a; + a.DoA(0); + } + std::string warning_output = GetCapturedStdout(); + EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output); + EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", warning_output); + + testing::GMOCK_FLAG(default_mock_behavior) = kFail; + EXPECT_NONFATAL_FAILURE({ + MockA a; + a.DoA(0); + },"Uninteresting mock function call"); + + testing::GMOCK_FLAG(default_mock_behavior) = original_behavior; +} + + #endif // GTEST_HAS_STREAM_REDIRECTION // Tests the semantics of ON_CALL(). diff --git a/googlemock/test/gmock_test.cc b/googlemock/test/gmock_test.cc index d8d0c57b..28995345 100644 --- a/googlemock/test/gmock_test.cc +++ b/googlemock/test/gmock_test.cc @@ -40,6 +40,7 @@ #if !defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_) +using testing::GMOCK_FLAG(default_mock_behavior); using testing::GMOCK_FLAG(verbose); using testing::InitGoogleMock; @@ -103,6 +104,26 @@ TEST(InitGoogleMockTest, ParsesSingleFlag) { TestInitGoogleMock(argv, new_argv, "info"); } +TEST(InitGoogleMockTest, ParsesMultipleFlags) { + int old_default_behavior = GMOCK_FLAG(default_mock_behavior); + const wchar_t* argv[] = { + L"foo.exe", + L"--gmock_verbose=info", + L"--gmock_default_mock_behavior=2", + NULL + }; + + const wchar_t* new_argv[] = { + L"foo.exe", + NULL + }; + + TestInitGoogleMock(argv, new_argv, "info"); + EXPECT_EQ(2, GMOCK_FLAG(default_mock_behavior)); + EXPECT_NE(2, old_default_behavior); + GMOCK_FLAG(default_mock_behavior) = old_default_behavior; +} + TEST(InitGoogleMockTest, ParsesUnrecognizedFlag) { const char* argv[] = { "foo.exe", @@ -177,6 +198,26 @@ TEST(WideInitGoogleMockTest, ParsesSingleFlag) { TestInitGoogleMock(argv, new_argv, "info"); } +TEST(WideInitGoogleMockTest, ParsesMultipleFlags) { + int old_default_behavior = GMOCK_FLAG(default_mock_behavior); + const wchar_t* argv[] = { + L"foo.exe", + L"--gmock_verbose=info", + L"--gmock_default_mock_behavior=2", + NULL + }; + + const wchar_t* new_argv[] = { + L"foo.exe", + NULL + }; + + TestInitGoogleMock(argv, new_argv, "info"); + EXPECT_EQ(2, GMOCK_FLAG(default_mock_behavior)); + EXPECT_NE(2, old_default_behavior); + GMOCK_FLAG(default_mock_behavior) = old_default_behavior; +} + TEST(WideInitGoogleMockTest, ParsesUnrecognizedFlag) { const wchar_t* argv[] = { L"foo.exe", -- cgit v1.2.3 From 8604c4adac40573f806cfadae44e22f8dfaf212a Mon Sep 17 00:00:00 2001 From: David Seifert Date: Mon, 14 Aug 2017 13:45:56 +0200 Subject: Add support for pkgconfig --- googlemock/CMakeLists.txt | 19 ++++++++++++++++++- googlemock/cmake/gmock.pc.in | 9 +++++++++ googlemock/cmake/gmock_main.pc.in | 9 +++++++++ googletest/CMakeLists.txt | 19 ++++++++++++++++++- googletest/cmake/gtest.pc.in | 9 +++++++++ googletest/cmake/gtest_main.pc.in | 10 ++++++++++ googletest/cmake/internal_utils.cmake | 6 ++++-- 7 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 googlemock/cmake/gmock.pc.in create mode 100644 googlemock/cmake/gmock_main.pc.in create mode 100644 googletest/cmake/gtest.pc.in create mode 100644 googletest/cmake/gtest_main.pc.in diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index c3c8aaeb..bd759dfd 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -37,7 +37,12 @@ endif() # as ${gmock_SOURCE_DIR} and to the root binary directory as # ${gmock_BINARY_DIR}. # Language "C" is required for find_package(Threads). -project(gmock CXX C) +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) +endif() cmake_minimum_required(VERSION 2.6.4) if (COMMAND set_up_hermetic_build) @@ -110,6 +115,18 @@ if(INSTALL_GMOCK) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + # configure and install pkgconfig files + configure_file( + cmake/gmock.pc.in + "${CMAKE_BINARY_DIR}/gmock.pc" + @ONLY) + configure_file( + cmake/gmock_main.pc.in + "${CMAKE_BINARY_DIR}/gmock_main.pc" + @ONLY) + install(FILES "${CMAKE_BINARY_DIR}/gmock.pc" "${CMAKE_BINARY_DIR}/gmock_main.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endif() ######################################################################## diff --git a/googlemock/cmake/gmock.pc.in b/googlemock/cmake/gmock.pc.in new file mode 100644 index 00000000..c4416426 --- /dev/null +++ b/googlemock/cmake/gmock.pc.in @@ -0,0 +1,9 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: gmock +Description: GoogleMock (without main() function) +Version: @PROJECT_VERSION@ +URL: https://github.com/google/googletest +Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@ +Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ diff --git a/googlemock/cmake/gmock_main.pc.in b/googlemock/cmake/gmock_main.pc.in new file mode 100644 index 00000000..c377dba1 --- /dev/null +++ b/googlemock/cmake/gmock_main.pc.in @@ -0,0 +1,9 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: gmock_main +Description: GoogleMock (with main() function) +Version: @PROJECT_VERSION@ +URL: https://github.com/google/googletest +Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@ +Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index a570e27a..b5414608 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -44,7 +44,12 @@ endif() # as ${gtest_SOURCE_DIR} and to the root binary directory as # ${gtest_BINARY_DIR}. # Language "C" is required for find_package(Threads). -project(gtest CXX C) +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) +endif() cmake_minimum_required(VERSION 2.6.4) if (COMMAND set_up_hermetic_build) @@ -109,6 +114,18 @@ if(INSTALL_GTEST) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + # configure and install pkgconfig files + configure_file( + cmake/gtest.pc.in + "${CMAKE_BINARY_DIR}/gtest.pc" + @ONLY) + configure_file( + cmake/gtest_main.pc.in + "${CMAKE_BINARY_DIR}/gtest_main.pc" + @ONLY) + install(FILES "${CMAKE_BINARY_DIR}/gtest.pc" "${CMAKE_BINARY_DIR}/gtest_main.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endif() ######################################################################## diff --git a/googletest/cmake/gtest.pc.in b/googletest/cmake/gtest.pc.in new file mode 100644 index 00000000..e7967ad5 --- /dev/null +++ b/googletest/cmake/gtest.pc.in @@ -0,0 +1,9 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: gtest +Description: GoogleTest (without main() function) +Version: @PROJECT_VERSION@ +URL: https://github.com/google/googletest +Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@ +Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ diff --git a/googletest/cmake/gtest_main.pc.in b/googletest/cmake/gtest_main.pc.in new file mode 100644 index 00000000..fe25d9c7 --- /dev/null +++ b/googletest/cmake/gtest_main.pc.in @@ -0,0 +1,10 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: gtest_main +Description: GoogleTest (with main() function) +Version: @PROJECT_VERSION@ +URL: https://github.com/google/googletest +Requires: gtest +Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@ +Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 8878dc1a..f0f54d02 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -50,6 +50,7 @@ macro(config_compiler_and_linker) # instead, we use windows threading primitives if (NOT gtest_disable_pthreads AND NOT MINGW) # Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT. + set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads) endif() @@ -126,10 +127,11 @@ macro(config_compiler_and_linker) endif() if (CMAKE_USE_PTHREADS_INIT) # The pthreads library is available and allowed. - set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=1") + set(GTEST_HAS_PTHREAD_MACRO "-DGTEST_HAS_PTHREAD=1") else() - set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=0") + set(GTEST_HAS_PTHREAD_MACRO "-DGTEST_HAS_PTHREAD=0") endif() + set(cxx_base_flags "${cxx_base_flags} ${GTEST_HAS_PTHREAD_MACRO}") # For building gtest's own tests and samples. set(cxx_exception "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_exception_flags}") -- cgit v1.2.3 From 9cacce4e5ca01f2c15775cf5e59297a7b422cd8b Mon Sep 17 00:00:00 2001 From: David Seifert Date: Mon, 14 Aug 2017 13:45:56 +0200 Subject: Add documentation for pkg-config --- googletest/docs/FAQ.md | 6 ++ googletest/docs/Pkgconfig.md | 146 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 googletest/docs/Pkgconfig.md diff --git a/googletest/docs/FAQ.md b/googletest/docs/FAQ.md index a9733c69..36f5f7fb 100644 --- a/googletest/docs/FAQ.md +++ b/googletest/docs/FAQ.md @@ -1060,6 +1060,12 @@ TEST_F(CoolTest, DoSomething) { If you try to build Google Test's Xcode project with Xcode 4.0 or later, you may encounter an error message that looks like "Missing SDK in target gtest\_framework: /Developer/SDKs/MacOSX10.4u.sdk". That means that Xcode does not support the SDK the project is targeting. See the Xcode section in the [README](../README.md) file on how to resolve this. +## How do I easily discover the flags needed for GoogleTest? ## + +GoogleTest (and GoogleMock) now support discovering all necessary flags using pkg-config. +See the [pkg-config guide](Pkgconfig.md) on how you can easily discover all compiler and +linker flags using pkg-config. + ## My question is not covered in your FAQ! ## If you cannot find the answer to your question in this FAQ, there are diff --git a/googletest/docs/Pkgconfig.md b/googletest/docs/Pkgconfig.md new file mode 100644 index 00000000..97612894 --- /dev/null +++ b/googletest/docs/Pkgconfig.md @@ -0,0 +1,146 @@ +## Using GoogleTest from various build systems ## + +GoogleTest comes with pkg-config files that can be used to determine all +necessary flags for compiling and linking to GoogleTest (and GoogleMock). +Pkg-config is a standardised plain-text format containing + + * the includedir (-I) path + * necessary macro (-D) definitions + * further required flags (-pthread) + * the library (-L) path + * the library (-l) to link to + +All current build systems support pkg-config in one way or another. For +all examples here we assume you want to compile the sample +`samples/sample3_unittest.cc`. + + +### CMake ### + +Using `pkg-config` in CMake is fairly easy: + +``` +cmake_minimum_required(VERSION 3.0) + +cmake_policy(SET CMP0048 NEW) +project(my_gtest_pkgconfig VERSION 0.0.1 LANGUAGES CXX) + +find_package(PkgConfig) +pkg_search_module(GTEST REQUIRED gtest_main) + +add_executable(testapp samples/sample3_unittest.cc) +target_link_libraries(testapp ${GTEST_LDFLAGS}) +target_compile_options(testapp PUBLIC ${GTEST_CFLAGS}) + +include(CTest) +add_test(first_and_only_test testapp) +``` + +It is generally recommended that you use `target_compile_options` + `_CFLAGS` +over `target_include_directories` + `_INCLUDE_DIRS` as the former includes not +just -I flags (GoogleTest might require a macro indicating to internal headers +that all libraries have been compiled with threading enabled. In addition, +GoogleTest might also require `-pthread` in the compiling step, and as such +splitting the pkg-config `Cflags` variable into include dirs and macros for +`target_compile_definitions()` might still miss this). The same recommendation +goes for using `_LDFLAGS` over the more commonplace `_LIBRARIES`, which +happens to discard `-L` flags and `-pthread`. + + +### Autotools ### + +Finding GoogleTest in Autoconf and using it from Automake is also fairly easy: + +In your `configure.ac`: + +``` +AC_PREREQ([2.69]) +AC_INIT([my_gtest_pkgconfig], [0.0.1]) +AC_CONFIG_SRCDIR([samples/sample3_unittest.cc]) +AC_PROG_CXX + +PKG_CHECK_MODULES([GTEST], [gtest_main]) + +AM_INIT_AUTOMAKE([foreign subdir-objects]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +``` + +and in your `Makefile.am`: + +``` +check_PROGRAMS = testapp +TESTS = $(check_PROGRAMS) + +testapp_SOURCES = samples/sample3_unittest.cc +testapp_CXXFLAGS = $(GTEST_CFLAGS) +testapp_LDADD = $(GTEST_LIBS) +``` + + +### Meson ### + +Meson natively uses pkgconfig to query dependencies: + +``` +project('my_gtest_pkgconfig', 'cpp', version : '0.0.1') + +gtest_dep = dependency('gtest_main') + +testapp = executable( + 'testapp', + files(['samples/sample3_unittest.cc']), + dependencies : gtest_dep, + install : false) + +test('first_and_only_test', testapp) +``` + + +### Plain Makefiles ### + +Since `pkg-config` is a small Unix command-line utility, it can be used +in handwritten `Makefile`s too: + +``` +GTEST_CFLAGS = `pkg-config --cflags gtest_main` +GTEST_LIBS = `pkg-config --libs gtest_main` + +.PHONY: tests all + +tests: all + ./testapp + +all: testapp + +testapp: testapp.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) $< -o $@ $(GTEST_LIBS) + +testapp.o: samples/sample3_unittest.cc + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -c -o $@ $(GTEST_CFLAGS) +``` + + +### Help! pkg-config can't find GoogleTest! ### + +Let's say you have a `CMakeLists.txt` along the lines of the one in this +tutorial and you try to run `cmake`. It is very possible that you get a +failure along the lines of: + +``` +-- Checking for one of the modules 'gtest_main' +CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:640 (message): + None of the required 'gtest_main' found +``` + +These failures are common if you installed GoogleTest yourself and have not +sourced it from a distro or other package manager. If so, you need to tell +pkg-config where it can find the `.pc` files containing the information. +Say you installed GoogleTest to `/usr/local`, then it might be that the +`.pc` files are installed under `/usr/local/lib64/pkgconfig`. If you set + +``` +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig +``` + +pkg-config will also try to look in `PKG_CONFIG_PATH` to find `gtest_main.pc`. -- cgit v1.2.3 From a4121dd54b58e88107166d8c8ed9eca58ce96629 Mon Sep 17 00:00:00 2001 From: misterg Date: Mon, 14 Aug 2017 18:21:07 -0400 Subject: Change AppVeyor Status Badge to point to new AppVeyor Project Location --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 076484e4..c99a3d98 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ # Google Test # [![Build Status](https://travis-ci.org/google/googletest.svg?branch=master)](https://travis-ci.org/google/googletest) -[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/BillyDonahue/googletest/branch/master) +#[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/BillyDonahue/googletest/branch/master) +[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/google/googletest/branch/master) + Welcome to **Google Test**, Google's C++ test framework! -- cgit v1.2.3 From 3f3a3ada2022a8b4255b408ef5d2ab439e987c08 Mon Sep 17 00:00:00 2001 From: misterg Date: Mon, 14 Aug 2017 18:22:03 -0400 Subject: Change AppVeyor Status Badge to point to new AppVeyor Project Location --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c99a3d98..026da075 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ # Google Test # [![Build Status](https://travis-ci.org/google/googletest.svg?branch=master)](https://travis-ci.org/google/googletest) -#[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/BillyDonahue/googletest/branch/master) [![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/google/googletest/branch/master) -- cgit v1.2.3 From 9469fb687d040b60c8749b7617fee4e77c7f6409 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Wed, 16 Aug 2017 10:49:06 -0400 Subject: Fix problem installing gtest when gmock enabled Fix a bug deciding whether to enable the option to install Google Test caused by one of the dependent option dependencies not being defined yet. Fixes #1198; impossible to install Google Test if Google Mock is built. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 96cdadef..f8a97faa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,10 +19,11 @@ else() endif() option(BUILD_GTEST "Builds the googletest subproject" OFF) -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) #Note that googlemock target already builds googletest 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(BUILD_GMOCK) -- cgit v1.2.3 From 5b4166f05fbc133d165b54e25fef2c88430bbc2c Mon Sep 17 00:00:00 2001 From: Maurice Gilden Date: Thu, 27 Jul 2017 11:12:12 +0200 Subject: Add function name to exception if there's no default action --- googlemock/src/gmock-spec-builders.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index 2fa1ee4b..f761f97e 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -364,7 +364,7 @@ UntypedFunctionMockerBase::UntypedInvokeWith(const void* const untyped_args) if (!need_to_report_uninteresting_call) { // Perform the action without printing the call information. - return this->UntypedPerformDefaultAction(untyped_args, ""); + return this->UntypedPerformDefaultAction(untyped_args, "Function call: " + std::string(Name())); } // Warns about the uninteresting call. -- cgit v1.2.3 From a2803bc37dafdaad05b335e64a83aff03096a4ba Mon Sep 17 00:00:00 2001 From: Alyssa Wilk Date: Wed, 16 Aug 2017 12:43:26 -0400 Subject: Handling invalid flag values --- googlemock/src/gmock-spec-builders.cc | 9 ++++++++- googlemock/test/gmock-spec-builders_test.cc | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index 1fc8d988..a725d185 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -508,6 +508,13 @@ bool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked() return expectations_met; } +CallReaction intToCallReaction(int mock_behavior) { + if (mock_behavior >= kAllow && mock_behavior <= kFail) { + return static_cast(mock_behavior); + } + return kWarn; +} + } // namespace internal // Class Mock. @@ -648,7 +655,7 @@ internal::CallReaction Mock::GetReactionOnUninterestingCalls( GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { internal::MutexLock l(&internal::g_gmock_mutex); return (g_uninteresting_call_reaction.count(mock_obj) == 0) ? - static_cast(GMOCK_FLAG(default_mock_behavior)) : + internal::intToCallReaction(GMOCK_FLAG(default_mock_behavior)) : g_uninteresting_call_reaction[mock_obj]; } diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index 00cb1198..34088de1 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -722,6 +722,26 @@ TEST(ExpectCallSyntaxTest, WarningIsErrorWithFlag) { a.DoA(0); },"Uninteresting mock function call"); + // Out of bounds values are converted to kWarn + testing::GMOCK_FLAG(default_mock_behavior) = -1; + CaptureStdout(); + { + MockA a; + a.DoA(0); + } + warning_output = GetCapturedStdout(); + EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output); + EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", warning_output); + testing::GMOCK_FLAG(default_mock_behavior) = 3; + CaptureStdout(); + { + MockA a; + a.DoA(0); + } + warning_output = GetCapturedStdout(); + EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output); + EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", warning_output); + testing::GMOCK_FLAG(default_mock_behavior) = original_behavior; } -- cgit v1.2.3 From 1fe692ce49f1fc3c7003d052451e147c9b5f19a6 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Wed, 16 Aug 2017 23:42:53 -0700 Subject: Update README.md Another AppVeyor move --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 33df79a8..3efd2ebf 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ # Google Test # [![Build Status](https://travis-ci.org/google/googletest.svg?branch=master)](https://travis-ci.org/google/googletest) -[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/google/googletest/branch/master) - +[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/GoogleTestAppVeyor/googletest/branch/master) Welcome to **Google Test**, Google's C++ test framework! -- cgit v1.2.3 From 95f18d99383c27bf645e8dc4f5dcaa188f6bafe3 Mon Sep 17 00:00:00 2001 From: Maurice Gilden Date: Fri, 18 Aug 2017 11:21:28 +0200 Subject: adds test for NiceMock with unknown return value --- googlemock/test/gmock-nice-strict_test.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index 5d6ccc4f..5e6d53be 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -79,6 +79,7 @@ class MockFoo : public Foo { MOCK_METHOD0(DoThis, void()); MOCK_METHOD1(DoThat, int(bool flag)); + MOCK_METHOD0(ReturnSomething, Mock()); private: GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo); @@ -207,6 +208,20 @@ TEST(NiceMockTest, AllowsExpectedCall) { nice_foo.DoThis(); } +// Tests that an unexpected call on a nice mock which returns a non-built in +// default value throws an exception and the exception contains the name of +// the method. +TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes) { + NiceMock nice_foo; + try { + nice_foo.ReturnSomething(); + FAIL(); + } catch (const std::runtime_error& ex) { + const std::string exception_msg(ex.what()); + EXPECT_NE(exception_msg.find("ReturnSomething"), std::string::npos); + } +} + // Tests that an unexpected call on a nice mock fails. TEST(NiceMockTest, UnexpectedCallFails) { NiceMock nice_foo; -- cgit v1.2.3 From cc99900036ae3514d8918acba87817fa24f6c993 Mon Sep 17 00:00:00 2001 From: Maurice Gilden Date: Fri, 18 Aug 2017 11:46:15 +0200 Subject: Fix test if exceptions are not supported --- googlemock/test/gmock-nice-strict_test.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index 5e6d53be..86706814 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -213,6 +213,7 @@ TEST(NiceMockTest, AllowsExpectedCall) { // the method. TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes) { NiceMock nice_foo; +#if GTEST_HAS_EXCEPTIONS try { nice_foo.ReturnSomething(); FAIL(); @@ -220,6 +221,11 @@ TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes) { const std::string exception_msg(ex.what()); EXPECT_NE(exception_msg.find("ReturnSomething"), std::string::npos); } +#else + EXPECT_DEATH_IF_SUPPORTED({ + nice_foo.ReturnSomething(); + }, ""); +#endif } // Tests that an unexpected call on a nice mock fails. -- cgit v1.2.3 From 36777251c07788549eaa72a9be0cf482ab322c46 Mon Sep 17 00:00:00 2001 From: Maurice Gilden Date: Fri, 18 Aug 2017 12:28:50 +0200 Subject: Switch return type to class without default constructor --- googlemock/test/gmock-nice-strict_test.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index 86706814..1d7784b1 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -62,6 +62,12 @@ using testing::internal::CaptureStdout; using testing::internal::GetCapturedStdout; #endif +// Dummy class without default constructor. +class Dummy { + public: + Dummy(int) {} +}; + // Defines some mock classes needed by the tests. class Foo { @@ -79,7 +85,7 @@ class MockFoo : public Foo { MOCK_METHOD0(DoThis, void()); MOCK_METHOD1(DoThat, int(bool flag)); - MOCK_METHOD0(ReturnSomething, Mock()); + MOCK_METHOD0(ReturnSomething, Dummy()); private: GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo); -- cgit v1.2.3 From b0ed43e72447c99f297dc86a75d7d58d53af5a07 Mon Sep 17 00:00:00 2001 From: Maurice Gilden Date: Fri, 18 Aug 2017 15:27:02 +0200 Subject: Change tabs to spaces in test case --- googlemock/test/gmock-nice-strict_test.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index 1d7784b1..a8032e24 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -218,19 +218,19 @@ TEST(NiceMockTest, AllowsExpectedCall) { // default value throws an exception and the exception contains the name of // the method. TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes) { - NiceMock nice_foo; + NiceMock nice_foo; #if GTEST_HAS_EXCEPTIONS - try { - nice_foo.ReturnSomething(); - FAIL(); - } catch (const std::runtime_error& ex) { - const std::string exception_msg(ex.what()); - EXPECT_NE(exception_msg.find("ReturnSomething"), std::string::npos); - } + try { + nice_foo.ReturnSomething(); + FAIL(); + } catch (const std::runtime_error& ex) { + const std::string exception_msg(ex.what()); + EXPECT_NE(exception_msg.find("ReturnSomething"), std::string::npos); + } #else - EXPECT_DEATH_IF_SUPPORTED({ - nice_foo.ReturnSomething(); - }, ""); + EXPECT_DEATH_IF_SUPPORTED({ + nice_foo.ReturnSomething(); + }, ""); #endif } -- cgit v1.2.3 From 5518a1d350d59b22669440b175a5be045d544c35 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 18 Aug 2017 15:18:58 -0400 Subject: Adding CMake visibility policy setting This policy setting will silence a warning when using with a visibility settings on targets. Due to the forced `cmake_minimum_version`, policy settings in CMakeLists calling this one (including the main CMakeLists) are lost, forcing the change to be made here. --- googletest/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index b5414608..59343ed2 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -52,6 +52,10 @@ else() endif() cmake_minimum_required(VERSION 2.6.4) +if (POLICY CMP0063) # Visibility + cmake_policy(SET CMP0063 NEW) +endif (POLICY CMP0063) + if (COMMAND set_up_hermetic_build) set_up_hermetic_build() endif() -- cgit v1.2.3 From 026735daf34cf180e34a976b3167cc4b311e3f11 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Sun, 20 Aug 2017 15:15:31 -0400 Subject: Proposing these changes, please review Slightly better names and cleaner tests. Please review --- googlemock/test/gmock-nice-strict_test.cc | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index a8032e24..2cb0a96d 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -62,10 +62,10 @@ using testing::internal::CaptureStdout; using testing::internal::GetCapturedStdout; #endif -// Dummy class without default constructor. -class Dummy { +// Class without default constructor. +class NotDefaultConstructible { public: - Dummy(int) {} + NotDefaultConstructible(int) {} }; // Defines some mock classes needed by the tests. @@ -85,7 +85,7 @@ class MockFoo : public Foo { MOCK_METHOD0(DoThis, void()); MOCK_METHOD1(DoThat, int(bool flag)); - MOCK_METHOD0(ReturnSomething, Dummy()); + MOCK_METHOD0(ReturnNonDefaultConstructible, NotDefaultConstructible()); private: GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo); @@ -214,23 +214,20 @@ TEST(NiceMockTest, AllowsExpectedCall) { nice_foo.DoThis(); } -// Tests that an unexpected call on a nice mock which returns a non-built in -// default value throws an exception and the exception contains the name of -// the method. +// Tests that an unexpected call on a nice mock which returns a not-default-constructible +// type throws an exception and the exception contains the method's name. TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes) { NiceMock nice_foo; #if GTEST_HAS_EXCEPTIONS try { - nice_foo.ReturnSomething(); + nice_foo.ReturnNonDefaultConstructible(); FAIL(); } catch (const std::runtime_error& ex) { const std::string exception_msg(ex.what()); - EXPECT_NE(exception_msg.find("ReturnSomething"), std::string::npos); + EXPECT_THAT(ex.what(), HasSubstr("ReturnNonDefaultConstructible")); } #else - EXPECT_DEATH_IF_SUPPORTED({ - nice_foo.ReturnSomething(); - }, ""); + EXPECT_DEATH_IF_SUPPORTED({ nice_foo.ReturnNonDefaultConstructible(); }, ""); #endif } -- cgit v1.2.3 From 3cf65b5d86d46cceb96ac44672fad84e2d5ad5a7 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Sun, 20 Aug 2017 15:20:13 -0400 Subject: Added "explicit" as per compiler suggestion --- googlemock/test/gmock-nice-strict_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index 2cb0a96d..fce9ca5b 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -65,7 +65,7 @@ using testing::internal::GetCapturedStdout; // Class without default constructor. class NotDefaultConstructible { public: - NotDefaultConstructible(int) {} + explicit NotDefaultConstructible(int) {} }; // Defines some mock classes needed by the tests. -- cgit v1.2.3 From 1ee8079651584b6bcc444f4b7a66dd2c65a79eb6 Mon Sep 17 00:00:00 2001 From: Maurice Gilden Date: Mon, 21 Aug 2017 10:10:14 +0200 Subject: Remove unused variable --- googlemock/test/gmock-nice-strict_test.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index fce9ca5b..0eac6439 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -223,7 +223,6 @@ TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes) { nice_foo.ReturnNonDefaultConstructible(); FAIL(); } catch (const std::runtime_error& ex) { - const std::string exception_msg(ex.what()); EXPECT_THAT(ex.what(), HasSubstr("ReturnNonDefaultConstructible")); } #else -- cgit v1.2.3 From 966b549c88032ec43ecd344ab19ca9ca36c30ad9 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 22 Aug 2017 16:06:26 +0200 Subject: Support ref-qualified member functions in Property(). --- googlemock/include/gmock/gmock-matchers.h | 35 ++++++++++++++++++++++++------- googlemock/test/gmock-matchers_test.cc | 20 ++++++++++++++++++ 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 3a97c438..c446bf7d 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -2232,7 +2232,10 @@ class FieldMatcher { // Implements the Property() matcher for matching a property // (i.e. return value of a getter method) of an object. -template +// +// Property is a const-qualified member function of Class returning +// PropertyType. +template class PropertyMatcher { public: // The property may have a reference type, so 'const PropertyType&' @@ -2241,8 +2244,7 @@ class PropertyMatcher { // PropertyType being a reference or not. typedef GTEST_REFERENCE_TO_CONST_(PropertyType) RefToConstProperty; - PropertyMatcher(PropertyType (Class::*property)() const, - const Matcher& matcher) + PropertyMatcher(Property property, const Matcher& matcher) : property_(property), matcher_(matcher) {} void DescribeTo(::std::ostream* os) const { @@ -2295,7 +2297,7 @@ class PropertyMatcher { return MatchAndExplainImpl(false_type(), *p, listener); } - PropertyType (Class::*property_)() const; + Property property_; const Matcher matcher_; GTEST_DISALLOW_ASSIGN_(PropertyMatcher); @@ -3908,11 +3910,13 @@ inline PolymorphicMatcher< // Property(&Foo::str, StartsWith("hi")) // matches a Foo object x iff x.str() starts with "hi". template -inline PolymorphicMatcher< - internal::PropertyMatcher > Property( - PropertyType (Class::*property)() const, const PropertyMatcher& matcher) { +inline PolymorphicMatcher > +Property(PropertyType (Class::*property)() const, + const PropertyMatcher& matcher) { return MakePolymorphicMatcher( - internal::PropertyMatcher( + internal::PropertyMatcher( property, MatcherCast(matcher))); // The call to MatcherCast() is required for supporting inner @@ -3921,6 +3925,21 @@ inline PolymorphicMatcher< // to compile where bar() returns an int32 and m is a matcher for int64. } +#if GTEST_LANG_CXX11 +// The same as above but for reference-qualified member functions. +template +inline PolymorphicMatcher > +Property(PropertyType (Class::*property)() const &, + const PropertyMatcher& matcher) { + return MakePolymorphicMatcher( + internal::PropertyMatcher( + property, + MatcherCast(matcher))); +} +#endif + // Creates a matcher that matches an object iff the result of applying // a callable to x matches 'matcher'. // For example, diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index f5ab7c81..fc867487 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -3588,10 +3588,15 @@ class AClass { // A getter that returns a reference to const. const std::string& s() const { return s_; } +#if GTEST_LANG_CXX11 + const std::string& s_ref() const & { return s_; } +#endif + void set_s(const std::string& new_s) { s_ = new_s; } // A getter that returns a reference to non-const. double& x() const { return x_; } + private: int n_; std::string s_; @@ -3635,6 +3640,21 @@ TEST(PropertyTest, WorksForReferenceToConstProperty) { EXPECT_FALSE(m.Matches(a)); } +#if GTEST_LANG_CXX11 +// Tests that Property(&Foo::property, ...) works when property() is +// ref-qualified. +TEST(PropertyTest, WorksForRefQualifiedProperty) { + Matcher m = Property(&AClass::s_ref, StartsWith("hi")); + + AClass a; + a.set_s("hill"); + EXPECT_TRUE(m.Matches(a)); + + a.set_s("hole"); + EXPECT_FALSE(m.Matches(a)); +} +#endif + // Tests that Property(&Foo::property, ...) works when property() // returns a reference to non-const. TEST(PropertyTest, WorksForReferenceToNonConstProperty) { -- cgit v1.2.3 From 88269cd365fa5da9d2d6bd04a283ded660c1a0c3 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Tue, 23 Feb 2016 23:17:36 +0300 Subject: Support x64 configuration for old VS2010 projects VS2010 solution only to simplify old users (who used these solutions) upgrading to new gtest/gmock, new users should use CMake generated solutions. VS2010 solution can be opened in any new VS. --- googlemock/msvc/2010/gmock.sln | 14 ++ googlemock/msvc/2010/gmock.vcxproj | 75 +++++++- googlemock/msvc/2010/gmock_config.props | 4 +- googlemock/msvc/2010/gmock_main.vcxproj | 75 +++++++- googlemock/msvc/2010/gmock_test.vcxproj | 91 +++++++++- googletest/msvc/2010/gtest-md.sln | 55 ++++++ googletest/msvc/2010/gtest-md.vcxproj | 149 +++++++++++++++ googletest/msvc/2010/gtest-md.vcxproj.filters | 18 ++ googletest/msvc/2010/gtest.sln | 55 ++++++ googletest/msvc/2010/gtest.vcxproj | 149 +++++++++++++++ googletest/msvc/2010/gtest.vcxproj.filters | 18 ++ googletest/msvc/2010/gtest_main-md.vcxproj | 154 ++++++++++++++++ googletest/msvc/2010/gtest_main-md.vcxproj.filters | 18 ++ googletest/msvc/2010/gtest_main.vcxproj | 162 +++++++++++++++++ googletest/msvc/2010/gtest_main.vcxproj.filters | 18 ++ googletest/msvc/2010/gtest_prod_test-md.vcxproj | 199 +++++++++++++++++++++ .../msvc/2010/gtest_prod_test-md.vcxproj.filters | 26 +++ googletest/msvc/2010/gtest_prod_test.vcxproj | 191 ++++++++++++++++++++ .../msvc/2010/gtest_prod_test.vcxproj.filters | 26 +++ googletest/msvc/2010/gtest_unittest-md.vcxproj | 188 +++++++++++++++++++ .../msvc/2010/gtest_unittest-md.vcxproj.filters | 18 ++ googletest/msvc/2010/gtest_unittest.vcxproj | 180 +++++++++++++++++++ .../msvc/2010/gtest_unittest.vcxproj.filters | 18 ++ 23 files changed, 1879 insertions(+), 22 deletions(-) create mode 100644 googletest/msvc/2010/gtest-md.sln create mode 100644 googletest/msvc/2010/gtest-md.vcxproj create mode 100644 googletest/msvc/2010/gtest-md.vcxproj.filters create mode 100644 googletest/msvc/2010/gtest.sln create mode 100644 googletest/msvc/2010/gtest.vcxproj create mode 100644 googletest/msvc/2010/gtest.vcxproj.filters create mode 100644 googletest/msvc/2010/gtest_main-md.vcxproj create mode 100644 googletest/msvc/2010/gtest_main-md.vcxproj.filters create mode 100644 googletest/msvc/2010/gtest_main.vcxproj create mode 100644 googletest/msvc/2010/gtest_main.vcxproj.filters create mode 100644 googletest/msvc/2010/gtest_prod_test-md.vcxproj create mode 100644 googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters create mode 100644 googletest/msvc/2010/gtest_prod_test.vcxproj create mode 100644 googletest/msvc/2010/gtest_prod_test.vcxproj.filters create mode 100644 googletest/msvc/2010/gtest_unittest-md.vcxproj create mode 100644 googletest/msvc/2010/gtest_unittest-md.vcxproj.filters create mode 100644 googletest/msvc/2010/gtest_unittest.vcxproj create mode 100644 googletest/msvc/2010/gtest_unittest.vcxproj.filters diff --git a/googlemock/msvc/2010/gmock.sln b/googlemock/msvc/2010/gmock.sln index d9496569..bb48f5be 100644 --- a/googlemock/msvc/2010/gmock.sln +++ b/googlemock/msvc/2010/gmock.sln @@ -10,21 +10,35 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32 {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|x64.ActiveCfg = Debug|x64 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|x64.Build.0 = Debug|x64 {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32 {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|x64.ActiveCfg = Release|x64 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|x64.Build.0 = Release|x64 {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32 {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32 + {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|x64.ActiveCfg = Debug|x64 + {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|x64.Build.0 = Debug|x64 {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32 {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32 + {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|x64.ActiveCfg = Release|x64 + {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|x64.Build.0 = Release|x64 {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32 {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32 + {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|x64.ActiveCfg = Debug|x64 + {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|x64.Build.0 = Debug|x64 {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32 {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32 + {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|x64.ActiveCfg = Release|x64 + {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/googlemock/msvc/2010/gmock.vcxproj b/googlemock/msvc/2010/gmock.vcxproj index 21a85ef6..7bc71d31 100644 --- a/googlemock/msvc/2010/gmock.vcxproj +++ b/googlemock/msvc/2010/gmock.vcxproj @@ -1,14 +1,22 @@ - + Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5} @@ -20,10 +28,23 @@ StaticLibrary Unicode true + v100 + + + StaticLibrary + Unicode + true + v100 StaticLibrary Unicode + v100 + + + StaticLibrary + Unicode + v100 @@ -32,23 +53,39 @@ + + + + + + + + <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + Disabled ..\..\include;..\..;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -58,10 +95,34 @@ ProgramDatabase + + + Disabled + ..\..\include;..\..;%(AdditionalIncludeDirectories) + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + ..\..\include;..\..;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + + + + ..\..\include;..\..;%(AdditionalIncludeDirectories) + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded @@ -73,10 +134,12 @@ $(GTestDir);%(AdditionalIncludeDirectories) + $(GTestDir);%(AdditionalIncludeDirectories) $(GTestDir);%(AdditionalIncludeDirectories) + $(GTestDir);%(AdditionalIncludeDirectories) - + \ No newline at end of file diff --git a/googlemock/msvc/2010/gmock_config.props b/googlemock/msvc/2010/gmock_config.props index 441f31cf..017d710b 100644 --- a/googlemock/msvc/2010/gmock_config.props +++ b/googlemock/msvc/2010/gmock_config.props @@ -1,4 +1,4 @@ - + ../../../googletest @@ -16,4 +16,4 @@ $(GTestDir) - + \ No newline at end of file diff --git a/googlemock/msvc/2010/gmock_main.vcxproj b/googlemock/msvc/2010/gmock_main.vcxproj index 27fecd5f..43da043d 100644 --- a/googlemock/msvc/2010/gmock_main.vcxproj +++ b/googlemock/msvc/2010/gmock_main.vcxproj @@ -1,14 +1,22 @@ - + Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {E4EF614B-30DF-4954-8C53-580A0BF6B589} @@ -20,10 +28,23 @@ StaticLibrary Unicode true + v100 + + + StaticLibrary + Unicode + true + v100 StaticLibrary Unicode + v100 + + + StaticLibrary + Unicode + v100 @@ -32,23 +53,39 @@ + + + + + + + + <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + Disabled ../../include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -58,10 +95,34 @@ ProgramDatabase + + + Disabled + ../../include;%(AdditionalIncludeDirectories) + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + ../../include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + + + + ../../include;%(AdditionalIncludeDirectories) + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded @@ -79,10 +140,12 @@ ../../include;%(AdditionalIncludeDirectories) + ../../include;%(AdditionalIncludeDirectories) ../../include;%(AdditionalIncludeDirectories) + ../../include;%(AdditionalIncludeDirectories) - + \ No newline at end of file diff --git a/googlemock/msvc/2010/gmock_test.vcxproj b/googlemock/msvc/2010/gmock_test.vcxproj index 265439ec..dcbeb587 100644 --- a/googlemock/msvc/2010/gmock_test.vcxproj +++ b/googlemock/msvc/2010/gmock_test.vcxproj @@ -1,14 +1,22 @@ - + Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {F10D22F8-AC7B-4213-8720-608E7D878CD2} @@ -20,10 +28,23 @@ Application Unicode true + v100 + + + Application + Unicode + true + v100 Application Unicode + v100 + + + Application + Unicode + v100 @@ -32,26 +53,44 @@ + + + + + + + + <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ true - $(SolutionDir)$(Configuration)\ + true + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ false + false + + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ /bigobj %(AdditionalOptions) Disabled - ..\..\include;..\..;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories) + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -66,11 +105,29 @@ MachineX86 + + + /bigobj %(AdditionalOptions) + Disabled + ..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories) + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + true + Console + + /bigobj %(AdditionalOptions) - ..\..\include;..\..;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories) + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreaded @@ -85,6 +142,24 @@ MachineX86 + + + /bigobj %(AdditionalOptions) + ..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories) + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + + true + Console + true + true + + {e4ef614b-30df-4954-8c53-580a0bf6b589} @@ -98,4 +173,4 @@ - + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest-md.sln b/googletest/msvc/2010/gtest-md.sln new file mode 100644 index 00000000..e36b33b6 --- /dev/null +++ b/googletest/msvc/2010/gtest-md.sln @@ -0,0 +1,55 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-md", "gtest-md.vcxproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main-md", "gtest_main-md.vcxproj", "{3AF54C8A-10BF-4332-9147-F68ED9862033}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test-md", "gtest_prod_test-md.vcxproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest-md", "gtest_unittest-md.vcxproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug|Win32.ActiveCfg = Debug|Win32 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug|Win32.Build.0 = Debug|Win32 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug|x64.ActiveCfg = Debug|x64 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug|x64.Build.0 = Debug|x64 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release|Win32.ActiveCfg = Release|Win32 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release|Win32.Build.0 = Release|Win32 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release|x64.ActiveCfg = Release|x64 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release|x64.Build.0 = Release|x64 + {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug|Win32.Build.0 = Debug|Win32 + {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug|x64.ActiveCfg = Debug|x64 + {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug|x64.Build.0 = Debug|x64 + {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release|Win32.ActiveCfg = Release|Win32 + {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release|Win32.Build.0 = Release|Win32 + {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release|x64.ActiveCfg = Release|x64 + {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release|x64.Build.0 = Release|x64 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug|Win32.ActiveCfg = Debug|Win32 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug|Win32.Build.0 = Debug|Win32 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug|x64.ActiveCfg = Debug|x64 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug|x64.Build.0 = Debug|x64 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release|Win32.ActiveCfg = Release|Win32 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release|Win32.Build.0 = Release|Win32 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release|x64.ActiveCfg = Release|x64 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release|x64.Build.0 = Release|x64 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug|Win32.Build.0 = Debug|Win32 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug|x64.ActiveCfg = Debug|x64 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug|x64.Build.0 = Debug|x64 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release|Win32.ActiveCfg = Release|Win32 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release|Win32.Build.0 = Release|Win32 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release|x64.ActiveCfg = Release|x64 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/googletest/msvc/2010/gtest-md.vcxproj b/googletest/msvc/2010/gtest-md.vcxproj new file mode 100644 index 00000000..16a6ff12 --- /dev/null +++ b/googletest/msvc/2010/gtest-md.vcxproj @@ -0,0 +1,149 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8} + Win32Proj + + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + gtestd + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + gtest + + + gtestd + + + gtest + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest-md.vcxproj.filters b/googletest/msvc/2010/gtest-md.vcxproj.filters new file mode 100644 index 00000000..69edeff2 --- /dev/null +++ b/googletest/msvc/2010/gtest-md.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest.sln b/googletest/msvc/2010/gtest.sln new file mode 100644 index 00000000..cacd5c0c --- /dev/null +++ b/googletest/msvc/2010/gtest.sln @@ -0,0 +1,55 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "gtest.vcxproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main", "gtest_main.vcxproj", "{3AF54C8A-10BF-4332-9147-F68ED9862032}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest", "gtest_unittest.vcxproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test", "gtest_prod_test.vcxproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug|Win32.ActiveCfg = Debug|Win32 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug|Win32.Build.0 = Debug|Win32 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug|x64.ActiveCfg = Debug|x64 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug|x64.Build.0 = Debug|x64 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release|Win32.ActiveCfg = Release|Win32 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release|Win32.Build.0 = Release|Win32 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release|x64.ActiveCfg = Release|x64 + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release|x64.Build.0 = Release|x64 + {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug|Win32.Build.0 = Debug|Win32 + {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug|x64.ActiveCfg = Debug|x64 + {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug|x64.Build.0 = Debug|x64 + {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release|Win32.ActiveCfg = Release|Win32 + {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release|Win32.Build.0 = Release|Win32 + {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release|x64.ActiveCfg = Release|x64 + {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release|x64.Build.0 = Release|x64 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug|Win32.Build.0 = Debug|Win32 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug|x64.ActiveCfg = Debug|x64 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug|x64.Build.0 = Debug|x64 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release|Win32.ActiveCfg = Release|Win32 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release|Win32.Build.0 = Release|Win32 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release|x64.ActiveCfg = Release|x64 + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release|x64.Build.0 = Release|x64 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug|Win32.ActiveCfg = Debug|Win32 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug|Win32.Build.0 = Debug|Win32 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug|x64.ActiveCfg = Debug|x64 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug|x64.Build.0 = Debug|x64 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release|Win32.ActiveCfg = Release|Win32 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release|Win32.Build.0 = Release|Win32 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release|x64.ActiveCfg = Release|x64 + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/googletest/msvc/2010/gtest.vcxproj b/googletest/msvc/2010/gtest.vcxproj new file mode 100644 index 00000000..a46f5c7a --- /dev/null +++ b/googletest/msvc/2010/gtest.vcxproj @@ -0,0 +1,149 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7} + Win32Proj + + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + gtestd + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + gtest + + + gtestd + + + gtest + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest.vcxproj.filters b/googletest/msvc/2010/gtest.vcxproj.filters new file mode 100644 index 00000000..69edeff2 --- /dev/null +++ b/googletest/msvc/2010/gtest.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_main-md.vcxproj b/googletest/msvc/2010/gtest_main-md.vcxproj new file mode 100644 index 00000000..3d773895 --- /dev/null +++ b/googletest/msvc/2010/gtest_main-md.vcxproj @@ -0,0 +1,154 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3AF54C8A-10BF-4332-9147-F68ED9862033} + Win32Proj + + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + gtest_maind + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + gtest_main + + + gtest_maind + + + gtest_main + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + {c8f6c172-56f2-4e76-b5fa-c3b423b31be8} + + + + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_main-md.vcxproj.filters b/googletest/msvc/2010/gtest_main-md.vcxproj.filters new file mode 100644 index 00000000..726c773c --- /dev/null +++ b/googletest/msvc/2010/gtest_main-md.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_main.vcxproj b/googletest/msvc/2010/gtest_main.vcxproj new file mode 100644 index 00000000..8fb25897 --- /dev/null +++ b/googletest/msvc/2010/gtest_main.vcxproj @@ -0,0 +1,162 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3AF54C8A-10BF-4332-9147-F68ED9862032} + Win32Proj + + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + StaticLibrary + MultiByte + v100 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + gtest_maind + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + gtest_main + + + gtest_maind + + + gtest_main + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + $(OutDir)$(ProjectName)d.lib + + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + $(OutDir)$(ProjectName)d.lib + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + $(OutDir)$(ProjectName).lib + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + $(OutDir)$(ProjectName).lib + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + {c8f6c172-56f2-4e76-b5fa-c3b423b31be7} + + + + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_main.vcxproj.filters b/googletest/msvc/2010/gtest_main.vcxproj.filters new file mode 100644 index 00000000..726c773c --- /dev/null +++ b/googletest/msvc/2010/gtest_main.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_prod_test-md.vcxproj b/googletest/msvc/2010/gtest_prod_test-md.vcxproj new file mode 100644 index 00000000..830e5dce --- /dev/null +++ b/googletest/msvc/2010/gtest_prod_test-md.vcxproj @@ -0,0 +1,199 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB} + Win32Proj + + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + true + true + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + false + false + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + gtest_prod_test + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + gtest_prod_test + + + gtest_prod_test + + + gtest_prod_test + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Use + Level3 + EditAndContinue + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + $(OutDir)gtest_prod_test.pdb + Console + MachineX86 + + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + $(OutDir)gtest_prod_test.pdb + Console + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + Console + true + true + MachineX86 + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + Console + true + true + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + + + + + + + + {3af54c8a-10bf-4332-9147-f68ed9862033} + + + + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters b/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters new file mode 100644 index 00000000..ac367310 --- /dev/null +++ b/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters @@ -0,0 +1,26 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_prod_test.vcxproj b/googletest/msvc/2010/gtest_prod_test.vcxproj new file mode 100644 index 00000000..d42e1351 --- /dev/null +++ b/googletest/msvc/2010/gtest_prod_test.vcxproj @@ -0,0 +1,191 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA} + Win32Proj + + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + true + true + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + false + false + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + Use + Level3 + EditAndContinue + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + $(OutDir)gtest_prod_test.pdb + Console + MachineX86 + + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + $(OutDir)gtest_prod_test.pdb + Console + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + Console + true + true + MachineX86 + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + Console + true + true + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + + + + + + + + {3af54c8a-10bf-4332-9147-f68ed9862032} + + + + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_prod_test.vcxproj.filters b/googletest/msvc/2010/gtest_prod_test.vcxproj.filters new file mode 100644 index 00000000..ac367310 --- /dev/null +++ b/googletest/msvc/2010/gtest_prod_test.vcxproj.filters @@ -0,0 +1,26 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_unittest-md.vcxproj b/googletest/msvc/2010/gtest_unittest-md.vcxproj new file mode 100644 index 00000000..93b0dc4e --- /dev/null +++ b/googletest/msvc/2010/gtest_unittest-md.vcxproj @@ -0,0 +1,188 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4D9FDFB5-986A-4139-823C-F4EE0ED481A2} + Win32Proj + + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + true + true + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + false + false + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + gtest_unittest + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + gtest_unittest + + + gtest_unittest + + + gtest_unittest + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Use + Level3 + EditAndContinue + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + $(OutDir)gtest_unittest.pdb + Console + MachineX86 + + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + $(OutDir)gtest_unittest.pdb + Console + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + Console + true + true + MachineX86 + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + Console + true + true + + + + + MinSpace + MinSpace + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + Default + Default + + + + + ProgramDatabase + ProgramDatabase + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + + + + + {3af54c8a-10bf-4332-9147-f68ed9862033} + + + + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters b/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters new file mode 100644 index 00000000..047dae51 --- /dev/null +++ b/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_unittest.vcxproj b/googletest/msvc/2010/gtest_unittest.vcxproj new file mode 100644 index 00000000..ec6abde7 --- /dev/null +++ b/googletest/msvc/2010/gtest_unittest.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4D9FDFB5-986A-4139-823C-F4EE0ED481A1} + Win32Proj + + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + Application + MultiByte + v100 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + true + true + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + false + false + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + + + $(SolutionDir)$(SolutionName)\$(Platform)-$(Configuration)\ + $(OutDir)temp\$(ProjectName)\ + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + Use + Level3 + EditAndContinue + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + $(OutDir)gtest_unittest.pdb + Console + MachineX86 + + + + + Disabled + WIN32;_VARIADIC_MAX=10;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + $(OutDir)gtest_unittest.pdb + Console + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + Console + true + true + MachineX86 + + + + + WIN32;_VARIADIC_MAX=10;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + Use + Level3 + ProgramDatabase + ..\..\include;..\..;%(AdditionalIncludeDirectories) + + + true + Console + true + true + + + + + MinSpace + MinSpace + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + Default + Default + + + + + ProgramDatabase + ProgramDatabase + ..;..\include;%(AdditionalIncludeDirectories) + ..;..\include;%(AdditionalIncludeDirectories) + + + + + + + + + {3af54c8a-10bf-4332-9147-f68ed9862032} + + + + + + \ No newline at end of file diff --git a/googletest/msvc/2010/gtest_unittest.vcxproj.filters b/googletest/msvc/2010/gtest_unittest.vcxproj.filters new file mode 100644 index 00000000..047dae51 --- /dev/null +++ b/googletest/msvc/2010/gtest_unittest.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + \ No newline at end of file -- cgit v1.2.3 From 45287f3dffa494d612c4ba94199aeaa40c99571f Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Tue, 23 Feb 2016 23:17:36 +0300 Subject: Remove gtest VS2005 projects --- googletest/msvc/gtest-md.sln | 45 -------- googletest/msvc/gtest-md.vcproj | 126 ----------------------- googletest/msvc/gtest.sln | 45 -------- googletest/msvc/gtest.vcproj | 126 ----------------------- googletest/msvc/gtest_main-md.vcproj | 129 ----------------------- googletest/msvc/gtest_main.vcproj | 129 ----------------------- googletest/msvc/gtest_prod_test-md.vcproj | 164 ------------------------------ googletest/msvc/gtest_prod_test.vcproj | 164 ------------------------------ googletest/msvc/gtest_unittest-md.vcproj | 147 -------------------------- googletest/msvc/gtest_unittest.vcproj | 147 -------------------------- 10 files changed, 1222 deletions(-) delete mode 100644 googletest/msvc/gtest-md.sln delete mode 100644 googletest/msvc/gtest-md.vcproj delete mode 100644 googletest/msvc/gtest.sln delete mode 100644 googletest/msvc/gtest.vcproj delete mode 100644 googletest/msvc/gtest_main-md.vcproj delete mode 100644 googletest/msvc/gtest_main.vcproj delete mode 100644 googletest/msvc/gtest_prod_test-md.vcproj delete mode 100644 googletest/msvc/gtest_prod_test.vcproj delete mode 100644 googletest/msvc/gtest_unittest-md.vcproj delete mode 100644 googletest/msvc/gtest_unittest.vcproj diff --git a/googletest/msvc/gtest-md.sln b/googletest/msvc/gtest-md.sln deleted file mode 100644 index f7908da1..00000000 --- a/googletest/msvc/gtest-md.sln +++ /dev/null @@ -1,45 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-md", "gtest-md.vcproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main-md", "gtest_main-md.vcproj", "{3AF54C8A-10BF-4332-9147-F68ED9862033}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test-md", "gtest_prod_test-md.vcproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest-md", "gtest_unittest-md.vcproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A2}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug.ActiveCfg = Debug|Win32 - {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug.Build.0 = Debug|Win32 - {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release.ActiveCfg = Release|Win32 - {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release.Build.0 = Release|Win32 - {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug.ActiveCfg = Debug|Win32 - {3AF54C8A-10BF-4332-9147-F68ED9862033}.Debug.Build.0 = Debug|Win32 - {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release.ActiveCfg = Release|Win32 - {3AF54C8A-10BF-4332-9147-F68ED9862033}.Release.Build.0 = Release|Win32 - {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug.ActiveCfg = Debug|Win32 - {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Debug.Build.0 = Debug|Win32 - {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release.ActiveCfg = Release|Win32 - {24848551-EF4F-47E8-9A9D-EA4D49BC3ECB}.Release.Build.0 = Release|Win32 - {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug.ActiveCfg = Debug|Win32 - {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Debug.Build.0 = Debug|Win32 - {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release.ActiveCfg = Release|Win32 - {4D9FDFB5-986A-4139-823C-F4EE0ED481A2}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/googletest/msvc/gtest-md.vcproj b/googletest/msvc/gtest-md.vcproj deleted file mode 100644 index 1c35c3a5..00000000 --- a/googletest/msvc/gtest-md.vcproj +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/googletest/msvc/gtest.sln b/googletest/msvc/gtest.sln deleted file mode 100644 index ef4b057f..00000000 --- a/googletest/msvc/gtest.sln +++ /dev/null @@ -1,45 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "gtest.vcproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_main", "gtest_main.vcproj", "{3AF54C8A-10BF-4332-9147-F68ED9862032}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_unittest", "gtest_unittest.vcproj", "{4D9FDFB5-986A-4139-823C-F4EE0ED481A1}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest_prod_test", "gtest_prod_test.vcproj", "{24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug.ActiveCfg = Debug|Win32 - {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug.Build.0 = Debug|Win32 - {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release.ActiveCfg = Release|Win32 - {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release.Build.0 = Release|Win32 - {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug.ActiveCfg = Debug|Win32 - {3AF54C8A-10BF-4332-9147-F68ED9862032}.Debug.Build.0 = Debug|Win32 - {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release.ActiveCfg = Release|Win32 - {3AF54C8A-10BF-4332-9147-F68ED9862032}.Release.Build.0 = Release|Win32 - {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug.ActiveCfg = Debug|Win32 - {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Debug.Build.0 = Debug|Win32 - {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release.ActiveCfg = Release|Win32 - {4D9FDFB5-986A-4139-823C-F4EE0ED481A1}.Release.Build.0 = Release|Win32 - {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug.ActiveCfg = Debug|Win32 - {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Debug.Build.0 = Debug|Win32 - {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release.ActiveCfg = Release|Win32 - {24848551-EF4F-47E8-9A9D-EA4D49BC3ECA}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/googletest/msvc/gtest.vcproj b/googletest/msvc/gtest.vcproj deleted file mode 100644 index a8373ce9..00000000 --- a/googletest/msvc/gtest.vcproj +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/googletest/msvc/gtest_main-md.vcproj b/googletest/msvc/gtest_main-md.vcproj deleted file mode 100644 index b5379fe6..00000000 --- a/googletest/msvc/gtest_main-md.vcproj +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/googletest/msvc/gtest_main.vcproj b/googletest/msvc/gtest_main.vcproj deleted file mode 100644 index e8b763c5..00000000 --- a/googletest/msvc/gtest_main.vcproj +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/googletest/msvc/gtest_prod_test-md.vcproj b/googletest/msvc/gtest_prod_test-md.vcproj deleted file mode 100644 index 05b05d9e..00000000 --- a/googletest/msvc/gtest_prod_test-md.vcproj +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/googletest/msvc/gtest_prod_test.vcproj b/googletest/msvc/gtest_prod_test.vcproj deleted file mode 100644 index 6d7a2f02..00000000 --- a/googletest/msvc/gtest_prod_test.vcproj +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/googletest/msvc/gtest_unittest-md.vcproj b/googletest/msvc/gtest_unittest-md.vcproj deleted file mode 100644 index 38a5e566..00000000 --- a/googletest/msvc/gtest_unittest-md.vcproj +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/googletest/msvc/gtest_unittest.vcproj b/googletest/msvc/gtest_unittest.vcproj deleted file mode 100644 index cb1f52b1..00000000 --- a/googletest/msvc/gtest_unittest.vcproj +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3 From cb8ebf5c9a04e90e338483878e0cdb8f3fbaf6e1 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Tue, 22 Aug 2017 00:13:23 +0300 Subject: Support x64 configuration for old VS2015 projects --- googlemock/msvc/2015/gmock.sln | 14 ++++++ googlemock/msvc/2015/gmock.vcxproj | 65 ++++++++++++++++++++++++++- googlemock/msvc/2015/gmock_main.vcxproj | 65 ++++++++++++++++++++++++++- googlemock/msvc/2015/gmock_test.vcxproj | 79 +++++++++++++++++++++++++++++++-- 4 files changed, 216 insertions(+), 7 deletions(-) diff --git a/googlemock/msvc/2015/gmock.sln b/googlemock/msvc/2015/gmock.sln index c59e07fc..d4203a84 100644 --- a/googlemock/msvc/2015/gmock.sln +++ b/googlemock/msvc/2015/gmock.sln @@ -10,21 +10,35 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32 {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|x64.ActiveCfg = Debug|x64 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|x64.Build.0 = Debug|x64 {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32 {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|x64.ActiveCfg = Release|x64 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|x64.Build.0 = Release|x64 {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32 {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32 + {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|x64.ActiveCfg = Debug|x64 + {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|x64.Build.0 = Debug|x64 {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32 {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32 + {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|x64.ActiveCfg = Release|x64 + {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|x64.Build.0 = Release|x64 {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32 {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32 + {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|x64.ActiveCfg = Debug|x64 + {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|x64.Build.0 = Debug|x64 {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32 {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32 + {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|x64.ActiveCfg = Release|x64 + {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/googlemock/msvc/2015/gmock.vcxproj b/googlemock/msvc/2015/gmock.vcxproj index d5ddd091..c6b56e61 100644 --- a/googlemock/msvc/2015/gmock.vcxproj +++ b/googlemock/msvc/2015/gmock.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {34681F0D-CE45-415D-B5F2-5C662DFE3BD5} @@ -22,11 +30,22 @@ true v140 + + StaticLibrary + Unicode + true + v140 + StaticLibrary Unicode v140 + + StaticLibrary + Unicode + v140 + @@ -34,18 +53,34 @@ + + + + + + + + <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + Disabled @@ -60,6 +95,19 @@ ProgramDatabase + + + Disabled + ..\..\include;..\..;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + ..\..\include;..\..;%(AdditionalIncludeDirectories) @@ -71,11 +119,24 @@ ProgramDatabase + + + ..\..\include;..\..;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + $(GTestDir);%(AdditionalIncludeDirectories) + $(GTestDir);%(AdditionalIncludeDirectories) $(GTestDir);%(AdditionalIncludeDirectories) + $(GTestDir);%(AdditionalIncludeDirectories) diff --git a/googlemock/msvc/2015/gmock_main.vcxproj b/googlemock/msvc/2015/gmock_main.vcxproj index 76cc68b9..42381dfa 100644 --- a/googlemock/msvc/2015/gmock_main.vcxproj +++ b/googlemock/msvc/2015/gmock_main.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {E4EF614B-30DF-4954-8C53-580A0BF6B589} @@ -22,11 +30,22 @@ true v140 + + StaticLibrary + Unicode + true + v140 + StaticLibrary Unicode v140 + + StaticLibrary + Unicode + v140 + @@ -34,18 +53,34 @@ + + + + + + + + <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + Disabled @@ -60,6 +95,19 @@ ProgramDatabase + + + Disabled + ../../include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + ../../include;%(AdditionalIncludeDirectories) @@ -71,6 +119,17 @@ ProgramDatabase + + + ../../include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + {34681f0d-ce45-415d-b5f2-5c662dfe3bd5} @@ -81,7 +140,9 @@ ../../include;%(AdditionalIncludeDirectories) + ../../include;%(AdditionalIncludeDirectories) ../../include;%(AdditionalIncludeDirectories) + ../../include;%(AdditionalIncludeDirectories) diff --git a/googlemock/msvc/2015/gmock_test.vcxproj b/googlemock/msvc/2015/gmock_test.vcxproj index 76ea5534..01d1f201 100644 --- a/googlemock/msvc/2015/gmock_test.vcxproj +++ b/googlemock/msvc/2015/gmock_test.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {F10D22F8-AC7B-4213-8720-608E7D878CD2} @@ -22,11 +30,22 @@ true v140 + + Application + Unicode + true + v140 + Application Unicode v140 + + Application + Unicode + v140 + @@ -34,19 +53,37 @@ + + + + + + + + <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ true - $(SolutionDir)$(Configuration)\ + true + $(SolutionDir)$(Platform)-$(Configuration)\ $(OutDir)$(ProjectName)\ false + false + + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ + + + $(SolutionDir)$(Platform)-$(Configuration)\ + $(OutDir)$(ProjectName)\ @@ -68,10 +105,28 @@ MachineX86 + + + /bigobj %(AdditionalOptions) + Disabled + ..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + true + Console + + /bigobj %(AdditionalOptions) - ..\..\include;..\..;%(AdditionalIncludeDirectories) + ..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreaded @@ -87,6 +142,24 @@ MachineX86 + + + /bigobj %(AdditionalOptions) + ..\..\include;..\..;$(GTestDir);%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + + + true + Console + true + true + + {e4ef614b-30df-4954-8c53-580a0bf6b589} -- cgit v1.2.3 From fa5d3b3845aa4cc38eef41c2e7ba0e98bfe15b39 Mon Sep 17 00:00:00 2001 From: Alyssa Wilk Date: Mon, 28 Aug 2017 16:13:41 -0400 Subject: Applying lint checks from upstream google3 --- googlemock/test/gmock-spec-builders_test.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index 34088de1..c649bfd9 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -714,13 +714,14 @@ TEST(ExpectCallSyntaxTest, WarningIsErrorWithFlag) { } std::string warning_output = GetCapturedStdout(); EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output); - EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", warning_output); + EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", + warning_output); testing::GMOCK_FLAG(default_mock_behavior) = kFail; EXPECT_NONFATAL_FAILURE({ MockA a; a.DoA(0); - },"Uninteresting mock function call"); + }, "Uninteresting mock function call"); // Out of bounds values are converted to kWarn testing::GMOCK_FLAG(default_mock_behavior) = -1; @@ -731,7 +732,8 @@ TEST(ExpectCallSyntaxTest, WarningIsErrorWithFlag) { } warning_output = GetCapturedStdout(); EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output); - EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", warning_output); + EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", + warning_output); testing::GMOCK_FLAG(default_mock_behavior) = 3; CaptureStdout(); { @@ -740,7 +742,8 @@ TEST(ExpectCallSyntaxTest, WarningIsErrorWithFlag) { } warning_output = GetCapturedStdout(); EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output); - EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", warning_output); + EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call", + warning_output); testing::GMOCK_FLAG(default_mock_behavior) = original_behavior; } -- cgit v1.2.3 From daaed2b6cb7ba4165636a7de20a691e4e78a7d38 Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Mon, 14 Aug 2017 18:07:55 +0200 Subject: fix typo in comment and string (SetUpTestCase) --- googletest/test/gtest_unittest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 1d3c7c7a..0ae8e035 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -3115,13 +3115,13 @@ TEST(DISABLED_TestCase, DISABLED_TestShouldNotRun) { FAIL() << "Unexpected failure: Test in disabled test case should not be run."; } -// Check that when all tests in a test case are disabled, SetupTestCase() and +// Check that when all tests in a test case are disabled, SetUpTestCase() and // TearDownTestCase() are not called. class DisabledTestsTest : public Test { protected: static void SetUpTestCase() { FAIL() << "Unexpected failure: All tests disabled in test case. " - "SetupTestCase() should not be called."; + "SetUpTestCase() should not be called."; } static void TearDownTestCase() { -- cgit v1.2.3 From fe760e9c6d92f55c04c000ae65df2336ede42eea Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Tue, 29 Aug 2017 15:27:54 +0200 Subject: fix typo: xUnit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3efd2ebf..f858833d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ in its interior [googletest/README.md](googletest/README.md) file. ## Features ## - * An [XUnit](https://en.wikipedia.org/wiki/XUnit) test framework. + * An [xUnit](https://en.wikipedia.org/wiki/XUnit) test framework. * Test discovery. * A rich set of assertions. * User-defined assertions. -- cgit v1.2.3 From 8364718500dac72c141aa55dcb2483177356717d Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Tue, 29 Aug 2017 16:35:41 +0200 Subject: remove non-existing gmock_build_samples switch --- travis.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/travis.sh b/travis.sh index bdecbd96..cb36e989 100755 --- a/travis.sh +++ b/travis.sh @@ -6,7 +6,6 @@ mkdir build || true mkdir build/$GTEST_TARGET || true cd build/$GTEST_TARGET cmake -Dgtest_build_samples=ON \ - -Dgmock_build_samples=ON \ -Dgtest_build_tests=ON \ -Dgmock_build_tests=ON \ -DCMAKE_CXX_FLAGS=$CXX_FLAGS \ -- cgit v1.2.3 From 4a451575895dc665db33cd940b47f38e804a291d Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Tue, 29 Aug 2017 17:04:15 +0200 Subject: switch on verbose make --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3204dfac..a8c27409 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,9 +36,9 @@ compiler: script: ./travis.sh env: matrix: - - GTEST_TARGET=googletest SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE_MAKE=true VERBOSE - - GTEST_TARGET=googlemock SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE_MAKE=true VERBOSE - - GTEST_TARGET=googlemock SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug CXX_FLAGS=-std=c++11 VERBOSE_MAKE=true VERBOSE + - GTEST_TARGET=googletest SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE=1 + - GTEST_TARGET=googlemock SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE=1 + - GTEST_TARGET=googlemock SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE=1 CXX_FLAGS=-std=c++11 # - GTEST_TARGET=googletest SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false # - GTEST_TARGET=googlemock SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false notifications: -- cgit v1.2.3 From d33861dca6fac5482f0c82a413a2571172d16fac Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Tue, 29 Aug 2017 17:41:26 +0200 Subject: run combined build only There is no need for separate 'googlemock' and 'googletest' builds, as the 'googlemock' build includes 'googletest' and it's unit tests. --- .travis.yml | 7 ++----- travis.sh | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8c27409..c155e571 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,11 +36,8 @@ compiler: script: ./travis.sh env: matrix: - - GTEST_TARGET=googletest SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE=1 - - GTEST_TARGET=googlemock SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE=1 - - GTEST_TARGET=googlemock SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE=1 CXX_FLAGS=-std=c++11 -# - GTEST_TARGET=googletest SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false -# - GTEST_TARGET=googlemock SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false + - SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE=1 + - SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE=1 CXX_FLAGS=-std=c++11 notifications: email: false sudo: false diff --git a/travis.sh b/travis.sh index bdecbd96..1b23a3d4 100755 --- a/travis.sh +++ b/travis.sh @@ -3,13 +3,12 @@ set -evx env | sort mkdir build || true -mkdir build/$GTEST_TARGET || true -cd build/$GTEST_TARGET +cd build cmake -Dgtest_build_samples=ON \ -Dgmock_build_samples=ON \ -Dgtest_build_tests=ON \ -Dgmock_build_tests=ON \ -DCMAKE_CXX_FLAGS=$CXX_FLAGS \ - ../../$GTEST_TARGET + .. make CTEST_OUTPUT_ON_FAILURE=1 make test -- cgit v1.2.3 From 29c07aa9dbeb622a6f8f0d1d07c9f139e18b5dca Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Tue, 29 Aug 2017 21:19:45 +0200 Subject: remove Yob's comma mentioned in issue #1105 --- googlemock/docs/CookBook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemock/docs/CookBook.md b/googlemock/docs/CookBook.md index 6ea7f3a9..fa2d2fd0 100644 --- a/googlemock/docs/CookBook.md +++ b/googlemock/docs/CookBook.md @@ -148,7 +148,7 @@ Note that the mock class doesn't define `AppendPacket()`, unlike the real class. That's fine as long as the test doesn't need to call it. Next, you need a way to say that you want to use -`ConcretePacketStream` in production code, and use `MockPacketStream` +`ConcretePacketStream` in production code and to use `MockPacketStream` in tests. Since the functions are not virtual and the two classes are unrelated, you must specify your choice at _compile time_ (as opposed to run time). -- cgit v1.2.3 From bb8399e1baf9d984894a54ba1e6e9e4d20c11a35 Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Tue, 29 Aug 2017 21:20:46 +0200 Subject: use plural verb as mentioned in issue #1105 --- googlemock/docs/CookBook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemock/docs/CookBook.md b/googlemock/docs/CookBook.md index fa2d2fd0..753c6dd3 100644 --- a/googlemock/docs/CookBook.md +++ b/googlemock/docs/CookBook.md @@ -706,7 +706,7 @@ type `m` accepts): 1. When both `T` and `U` are built-in arithmetic types (`bool`, integers, and floating-point numbers), the conversion from `T` to `U` is not lossy (in other words, any value representable by `T` can also be represented by `U`); and 1. When `U` is a reference, `T` must also be a reference (as the underlying matcher may be interested in the address of the `U` value). -The code won't compile if any of these conditions isn't met. +The code won't compile if any of these conditions aren't met. Here's one example: -- cgit v1.2.3 From c3d1d33560462c923f06adb8e9c2f77ffbafa46c Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Tue, 29 Aug 2017 12:45:26 -0700 Subject: Detect Fuchsia, and set GTEST_HAS_PTHREAD on GTEST_OS_FUCHSIA --- googletest/include/gtest/internal/gtest-port-arch.h | 2 ++ googletest/include/gtest/internal/gtest-port.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port-arch.h b/googletest/include/gtest/internal/gtest-port-arch.h index f32fc06b..bb206167 100644 --- a/googletest/include/gtest/internal/gtest-port-arch.h +++ b/googletest/include/gtest/internal/gtest-port-arch.h @@ -69,6 +69,8 @@ # endif #elif defined __FreeBSD__ # define GTEST_OS_FREEBSD 1 +#elif defined __Fuchsia__ +# define GTEST_OS_FUCHSIA 1 #elif defined __linux__ # define GTEST_OS_LINUX 1 # if defined __ANDROID__ diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index c2a9f5f3..643beff9 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -122,6 +122,7 @@ // GTEST_OS_AIX - IBM AIX // GTEST_OS_CYGWIN - Cygwin // GTEST_OS_FREEBSD - FreeBSD +// GTEST_OS_FUCHSIA - Fuchsia // GTEST_OS_HPUX - HP-UX // GTEST_OS_LINUX - Linux // GTEST_OS_LINUX_ANDROID - Google Android @@ -607,8 +608,9 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; // // To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0 // to your compiler flags. -# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \ - || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD) +#define GTEST_HAS_PTHREAD \ + (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX || GTEST_OS_QNX || \ + GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA) #endif // GTEST_HAS_PTHREAD #if GTEST_HAS_PTHREAD -- cgit v1.2.3 From f0c72bfe09af0c5b6d48eb48456e2c4fca8858d7 Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Wed, 30 Aug 2017 12:19:59 +0200 Subject: fix SetUp/TearDownTestCase() in AdvancedGuide fixes issue #1087 --- googletest/docs/AdvancedGuide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/docs/AdvancedGuide.md b/googletest/docs/AdvancedGuide.md index a454bf45..1076496d 100644 --- a/googletest/docs/AdvancedGuide.md +++ b/googletest/docs/AdvancedGuide.md @@ -1623,8 +1623,8 @@ printf("We are in test %s of test case %s.\n", ``` `current_test_info()` returns a null pointer if no test is running. In -particular, you cannot find the test case name in `TestCaseSetUp()`, -`TestCaseTearDown()` (where you know the test case name implicitly), or +particular, you cannot find the test case name in `SetUpTestCase()`, +`TearDownTestCase()` (where you know the test case name implicitly), or functions called from them. _Availability:_ Linux, Windows, Mac. -- cgit v1.2.3 From 0eb49f4d6b59c0f21707a84f87948ffdfb3ce809 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Wed, 30 Aug 2017 11:29:06 -0700 Subject: Note that it is preferable for Googlers to create a CL internally first --- googletest/docs/DevGuide.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/googletest/docs/DevGuide.md b/googletest/docs/DevGuide.md index 4333a8e0..7bd78888 100644 --- a/googletest/docs/DevGuide.md +++ b/googletest/docs/DevGuide.md @@ -101,6 +101,10 @@ Please do submit code. Here's what you need to do: 1. Sign a Contributor License Agreement. 1. Create a Pull Request in the usual way. +If you are a Googler, it is preferable to first create an internal change and +have it reviewed and submitted, and then create a trivial upstreaming pull +request here. See go/gmock-contribute. + ## Google Test Committers ## The current members of the Google Test engineering team are the only -- cgit v1.2.3 From c4e01616af01e0518b48aa12a488347a63e0839c Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Wed, 30 Aug 2017 14:50:40 -0400 Subject: removed internal link ( not allowed in OSS) --- googletest/docs/DevGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/docs/DevGuide.md b/googletest/docs/DevGuide.md index 7bd78888..cffbe8f5 100644 --- a/googletest/docs/DevGuide.md +++ b/googletest/docs/DevGuide.md @@ -103,7 +103,7 @@ Please do submit code. Here's what you need to do: If you are a Googler, it is preferable to first create an internal change and have it reviewed and submitted, and then create a trivial upstreaming pull -request here. See go/gmock-contribute. +request here. ## Google Test Committers ## -- cgit v1.2.3 From fa70b84ab51e9af75d5c6ce0299a3d1950bde686 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Wed, 30 Aug 2017 14:51:36 -0400 Subject: Removed "Trivial" Who knows? may not be very trivial given the code drift between internal and OSS --- googletest/docs/DevGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/docs/DevGuide.md b/googletest/docs/DevGuide.md index cffbe8f5..88a3de9f 100644 --- a/googletest/docs/DevGuide.md +++ b/googletest/docs/DevGuide.md @@ -102,7 +102,7 @@ Please do submit code. Here's what you need to do: 1. Create a Pull Request in the usual way. If you are a Googler, it is preferable to first create an internal change and -have it reviewed and submitted, and then create a trivial upstreaming pull +have it reviewed and submitted, and then create an upstreaming pull request here. ## Google Test Committers ## -- cgit v1.2.3 From 5dde668e093151f334e47da8410c83d675f1be81 Mon Sep 17 00:00:00 2001 From: Arkadiy Shapkin Date: Mon, 5 Sep 2016 00:55:42 +0300 Subject: AppVeyor MinGW-w64 test build --- appveyor.yml | 89 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 36 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d613fd60..f129d7c5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,68 +4,85 @@ os: Visual Studio 2015 environment: matrix: - - Toolset: v140 - - Toolset: v120 - - Toolset: v110 - - Toolset: v100 + - compiler: msvc-14-seh + generator: "Visual Studio 14 2015" -platform: - - Win32 - - x64 + - compiler: msvc-14-seh + generator: "Visual Studio 14 2015 Win64" + + - compiler: msvc-12-seh + generator: "Visual Studio 12 2013" + + - compiler: msvc-12-seh + generator: "Visual Studio 12 2013 Win64" + + - compiler: msvc-11-seh + generator: "Visual Studio 11 2012" + + - compiler: msvc-11-seh + generator: "Visual Studio 11 2012 Win64" + + - compiler: msvc-10-seh + generator: "Visual Studio 10 2010" + + - compiler: gcc-5.3.0-posix + generator: "MinGW Makefiles" + cxx_path: 'C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin' + + - compiler: gcc-6.3.0-posix + generator: "MinGW Makefiles" + cxx_path: 'C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin' configuration: -# - Release - Debug + #- Release build: verbosity: minimal -artifacts: - - path: '_build/Testing/Temporary/*' - name: test_results - -before_build: +install: - ps: | - Write-Output "Configuration: $env:CONFIGURATION" - Write-Output "Platform: $env:PLATFORM" - $generator = switch ($env:TOOLSET) - { - "v140" {"Visual Studio 14 2015"} - "v120" {"Visual Studio 12 2013"} - "v110" {"Visual Studio 11 2012"} - "v100" {"Visual Studio 10 2010"} - } - if ($env:PLATFORM -eq "x64") - { - $generator = "$generator Win64" + Write-Output "Compiler: $env:compiler" + Write-Output "Generator: $env:generator" + + # git bash conflicts with MinGW makefiles + if ($env:generator -eq "MinGW Makefiles") { + $env:path = $env:path.replace("C:\Program Files\Git\usr\bin;", "") + if ($env:cxx_path -ne "") { + $env:path += ";$env:cxx_path" + } } build_script: - ps: | - if (($env:TOOLSET -eq "v100") -and ($env:PLATFORM -eq "x64")) - { - return - } md _build -Force | Out-Null cd _build - & cmake -G "$generator" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -Dgtest_build_tests=ON -Dgtest_build_samples=ON -Dgmock_build_tests=ON .. + $conf = if ($env:generator -eq "MinGW Makefiles") {"-DCMAKE_BUILD_TYPE=$env:configuration"} else {"-DCMAKE_CONFIGURATION_TYPES=Debug;Release"} + # Disable test for MinGW (gtest tests fail, gmock tests can not build) + $gtest_build_tests = if ($env:generator -eq "MinGW Makefiles") {"-Dgtest_build_tests=OFF"} else {"-Dgtest_build_tests=ON"} + $gmock_build_tests = if ($env:generator -eq "MinGW Makefiles") {"-Dgmock_build_tests=OFF"} else {"-Dgmock_build_tests=ON"} + & cmake -G "$env:generator" $conf -Dgtest_build_samples=ON $gtest_build_tests $gmock_build_tests .. if ($LastExitCode -ne 0) { throw "Exec: $ErrorMessage" } - & cmake --build . --config $env:CONFIGURATION + & cmake --build . --config $env:configuration if ($LastExitCode -ne 0) { throw "Exec: $ErrorMessage" } test_script: - ps: | - if (($env:Toolset -eq "v100") -and ($env:PLATFORM -eq "x64")) - { - return + if ($env:generator -eq "MinGW Makefiles") { + return # No test available for MinGW } - - & ctest -C $env:CONFIGURATION --output-on-failure + & ctest -C $env:configuration --timeout 300 --output-on-failure if ($LastExitCode -ne 0) { throw "Exec: $ErrorMessage" } + +artifacts: + - path: '_build/CMakeFiles/*.log' + name: logs + - path: '_build/Testing/**/*.xml' + name: test_results -- cgit v1.2.3 From 14cf7f574a4fac65525620e552577b7f57c9b867 Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Thu, 31 Aug 2017 16:10:36 +0200 Subject: fix example's comment --- googletest/docs/FAQ.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/docs/FAQ.md b/googletest/docs/FAQ.md index 36f5f7fb..76c23727 100644 --- a/googletest/docs/FAQ.md +++ b/googletest/docs/FAQ.md @@ -1034,7 +1034,7 @@ namespace bar { TEST(CoolTest, DoSomething) { SUCCEED(); } -} // namespace foo +} // namespace bar ``` However, the following code is **not allowed** and will produce a runtime error from Google Test because the test methods are using different test fixture classes with the same test case name. @@ -1052,7 +1052,7 @@ class CoolTest : public ::testing::Test {}; // Fixture: bar::CoolTest TEST_F(CoolTest, DoSomething) { SUCCEED(); } -} // namespace foo +} // namespace bar ``` ## How do I build Google Testing Framework with Xcode 4? ## -- cgit v1.2.3 From e033d8c73de8d757fa30d22626ae026f43be6bd5 Mon Sep 17 00:00:00 2001 From: Herbert Thielen Date: Thu, 31 Aug 2017 18:12:17 +0200 Subject: change links from former code.google.com to current github repository --- googlemock/README.md | 6 +++--- googlemock/docs/DevGuide.md | 4 ++-- googlemock/include/gmock/gmock-generated-actions.h | 2 +- googlemock/include/gmock/gmock-generated-actions.h.pump | 2 +- googlemock/include/gmock/gmock-generated-matchers.h | 2 +- googlemock/include/gmock/gmock-generated-matchers.h.pump | 2 +- googlemock/scripts/fuse_gmock_files.py | 2 +- googletest/docs/PumpManual.md | 2 +- googletest/scripts/fuse_gtest_files.py | 2 +- googletest/src/gtest.cc | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/googlemock/README.md b/googlemock/README.md index f0ea6a0e..f941f158 100644 --- a/googlemock/README.md +++ b/googlemock/README.md @@ -78,7 +78,7 @@ posting a question on the Google Mock is not a testing framework itself. Instead, it needs a testing framework for writing tests. Google Mock works seamlessly -with [Google Test](http://code.google.com/p/googletest/), but +with [Google Test](https://github.com/google/googletest), but you can also use it with [any C++ testing framework](../../master/googlemock/docs/ForDummies.md#using-google-mock-with-any-testing-framework). ### Requirements for End Users ### @@ -333,8 +333,8 @@ may need to tweak your compiler and/or linker flags. Please see the If you have custom matchers defined using `MatcherInterface` or `MakePolymorphicMatcher()`, you'll need to update their definitions to use the new matcher API ( -[monomorphic](http://code.google.com/p/googlemock/wiki/CookBook#Writing_New_Monomorphic_Matchers), -[polymorphic](http://code.google.com/p/googlemock/wiki/CookBook#Writing_New_Polymorphic_Matchers)). +[monomorphic](./docs/CookBook.md#writing-new-monomorphic-matchers), +[polymorphic](./docs/CookBook.md#writing-new-polymorphic-matchers)). Matchers defined using `MATCHER()` or `MATCHER_P*()` aren't affected. ### Developing Google Mock ### diff --git a/googlemock/docs/DevGuide.md b/googlemock/docs/DevGuide.md index adb74fe1..cae07e70 100644 --- a/googlemock/docs/DevGuide.md +++ b/googlemock/docs/DevGuide.md @@ -64,7 +64,7 @@ compile it in the [README](../README.md) file. A mocking framework is of no good if itself is not thoroughly tested. Tests should be written for any new code, and changes should be verified to not break existing tests before they are submitted for -review. To perform the tests, follow the instructions in [README](http://code.google.com/p/googlemock/source/browse/trunk/README) and +review. To perform the tests, follow the instructions in [README](../README.md) and verify that there are no failures. # Contributing Code # @@ -98,7 +98,7 @@ to conform to the style outlined [here](https://google.github.io/styleguide/cppg Please do submit code. Here's what you need to do: 1. Normally you should make your change against the SVN trunk instead of a branch or a tag, as the latter two are for release control and should be treated mostly as read-only. - 1. Decide which code you want to submit. A submission should be a set of changes that addresses one issue in the [Google Mock issue tracker](http://code.google.com/p/googlemock/issues/list). Please don't mix more than one logical change per submittal, because it makes the history hard to follow. If you want to make a change that doesn't have a corresponding issue in the issue tracker, please create one. + 1. Decide which code you want to submit. A submission should be a set of changes that addresses one issue in the [Google Mock issue tracker](https://github.com/google/googletest/issues). Please don't mix more than one logical change per submittal, because it makes the history hard to follow. If you want to make a change that doesn't have a corresponding issue in the issue tracker, please create one. 1. Also, coordinate with team members that are listed on the issue in question. This ensures that work isn't being duplicated and communicating your plan early also generally leads to better patches. 1. Ensure that your code adheres to the [Google Mock source code style](#Coding_Style.md). 1. Ensure that there are unit tests for your code. diff --git a/googlemock/include/gmock/gmock-generated-actions.h b/googlemock/include/gmock/gmock-generated-actions.h index b5a889c0..be4ebe4f 100644 --- a/googlemock/include/gmock/gmock-generated-actions.h +++ b/googlemock/include/gmock/gmock-generated-actions.h @@ -875,7 +875,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, // MORE INFORMATION: // // To learn more about using these macros, please search for 'ACTION' -// on http://code.google.com/p/googlemock/wiki/CookBook. +// on https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md // An internal macro needed for implementing ACTION*(). #define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\ diff --git a/googlemock/include/gmock/gmock-generated-actions.h.pump b/googlemock/include/gmock/gmock-generated-actions.h.pump index 66d9f9d5..712f65d6 100644 --- a/googlemock/include/gmock/gmock-generated-actions.h.pump +++ b/googlemock/include/gmock/gmock-generated-actions.h.pump @@ -357,7 +357,7 @@ $range j2 2..i // MORE INFORMATION: // // To learn more about using these macros, please search for 'ACTION' -// on http://code.google.com/p/googlemock/wiki/CookBook. +// on https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md $range i 0..n $range k 0..n-1 diff --git a/googlemock/include/gmock/gmock-generated-matchers.h b/googlemock/include/gmock/gmock-generated-matchers.h index 57056fd9..525f8a71 100644 --- a/googlemock/include/gmock/gmock-generated-matchers.h +++ b/googlemock/include/gmock/gmock-generated-matchers.h @@ -1376,7 +1376,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) { // ================ // // To learn more about using these macros, please search for 'MATCHER' -// on http://code.google.com/p/googlemock/wiki/CookBook. +// on https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md #define MATCHER(name, description)\ class name##Matcher {\ diff --git a/googlemock/include/gmock/gmock-generated-matchers.h.pump b/googlemock/include/gmock/gmock-generated-matchers.h.pump index de30c2c9..f91b1eab 100644 --- a/googlemock/include/gmock/gmock-generated-matchers.h.pump +++ b/googlemock/include/gmock/gmock-generated-matchers.h.pump @@ -587,7 +587,7 @@ $$ // show up in the generated code. // ================ // // To learn more about using these macros, please search for 'MATCHER' -// on http://code.google.com/p/googlemock/wiki/CookBook. +// on https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md $range i 0..n $for i diff --git a/googlemock/scripts/fuse_gmock_files.py b/googlemock/scripts/fuse_gmock_files.py index cb7fdf2f..9b6956f2 100755 --- a/googlemock/scripts/fuse_gmock_files.py +++ b/googlemock/scripts/fuse_gmock_files.py @@ -55,7 +55,7 @@ EXAMPLES This tool is experimental. In particular, it assumes that there is no conditional inclusion of Google Mock or Google Test headers. Please report any problems to googlemock@googlegroups.com. You can read -http://code.google.com/p/googlemock/wiki/CookBook for more +https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md for more information. """ diff --git a/googletest/docs/PumpManual.md b/googletest/docs/PumpManual.md index 109c7f2c..827bb24b 100644 --- a/googletest/docs/PumpManual.md +++ b/googletest/docs/PumpManual.md @@ -40,7 +40,7 @@ maintain. ## Highlights ## * The implementation is in a single Python script and thus ultra portable: no build or installation is needed and it works cross platforms. - * Pump tries to be smart with respect to [Google's style guide](http://code.google.com/p/google-styleguide/): it breaks long lines (easy to have when they are generated) at acceptable places to fit within 80 columns and indent the continuation lines correctly. + * Pump tries to be smart with respect to [Google's style guide](https://github.com/google/styleguide): it breaks long lines (easy to have when they are generated) at acceptable places to fit within 80 columns and indent the continuation lines correctly. * The format is human-readable and more concise than XML. * The format works relatively well with Emacs' C++ mode. diff --git a/googletest/scripts/fuse_gtest_files.py b/googletest/scripts/fuse_gtest_files.py index 3f3e9f36..9a5c8d36 100755 --- a/googletest/scripts/fuse_gtest_files.py +++ b/googletest/scripts/fuse_gtest_files.py @@ -52,7 +52,7 @@ EXAMPLES This tool is experimental. In particular, it assumes that there is no conditional inclusion of Google Test headers. Please report any problems to googletestframework@googlegroups.com. You can read -http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide for +https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md for more information. """ diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index b6087f9b..2484caf5 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -4812,7 +4812,7 @@ bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) { // each TestCase and TestInfo object. // If shard_tests == true, further filters tests based on sharding // variables in the environment - see -// http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide. +// https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md . // Returns the number of tests that should run. int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) { const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ? -- cgit v1.2.3