diff options
-rw-r--r-- | autobuild.xml | 46 | ||||
-rw-r--r-- | indra/cmake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/cmake/GoogleMock.cmake | 32 | ||||
-rw-r--r-- | indra/cmake/LLAddBuildTest.cmake | 7 | ||||
-rw-r--r-- | indra/llcorehttp/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/llmessage/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/llmessage/tests/llmockhttpclient.h | 66 | ||||
-rw-r--r-- | indra/test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/test/test.cpp | 17 |
9 files changed, 0 insertions, 173 deletions
diff --git a/autobuild.xml b/autobuild.xml index 387699ed47..182f7876ce 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -711,52 +711,6 @@ <key>description</key> <string>glh - is a platform-indepenedent C++ OpenGL helper library</string> </map> - <key>googlemock</key> - <map> - <key>platforms</key> - <map> - <key>darwin64</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>dce3174b12136746f5f910e311e895c1b47bf8fb</string> - <key>hash_algorithm</key> - <string>sha1</string> - <key>url</key> - <string>https://github.com/secondlife/3p-googlemock/releases/download/v1.7.0.2b109d4/googlemock-1.7.0.2b109d4-darwin64-2b109d4.tar.zst</string> - </map> - <key>name</key> - <string>darwin64</string> - </map> - <key>windows64</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>265813f84b04c3b03f3d7d33e149b3d5e3cf31db</string> - <key>hash_algorithm</key> - <string>sha1</string> - <key>url</key> - <string>https://github.com/secondlife/3p-googlemock/releases/download/v1.7.0.2b109d4/googlemock-1.7.0.2b109d4-windows64-2b109d4.tar.zst</string> - </map> - <key>name</key> - <string>windows64</string> - </map> - </map> - <key>license</key> - <string>BSD</string> - <key>license_file</key> - <string>LICENSES/gmock.txt</string> - <key>copyright</key> - <string>Copyright 2008, Google Inc.</string> - <key>version</key> - <string>1.7.0.2b109d4</string> - <key>name</key> - <string>googlemock</string> - <key>description</key> - <string>a library for writing and using C++ mock classes</string> - </map> <key>gstreamer</key> <map> <key>platforms</key> diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 737609c89c..a9f8643f3b 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -26,7 +26,6 @@ set(cmake_SOURCE_FILES FreeType.cmake GLEXT.cmake GLH.cmake - GoogleMock.cmake Havok.cmake Hunspell.cmake ICU4C.cmake diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake deleted file mode 100644 index e4520fe96e..0000000000 --- a/indra/cmake/GoogleMock.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) -include(Linking) - -include_guard() - -add_library( ll::googlemock INTERFACE IMPORTED ) -if(USE_CONAN) - target_link_libraries( ll::googlemock INTERFACE CONAN_PKG::gtest ) - - #Not very nice, but for the moment we need this for tut.hpp - target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) - return() -endif() - -use_prebuilt_binary(googlemock) - -target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) - -if (LINUX) - # VWR-24366: gmock is underlinked, it needs gtest. - target_link_libraries( ll::googlemock INTERFACE gmock gtest) -elseif(WINDOWS) - target_link_libraries( ll::googlemock INTERFACE gmock) - target_include_directories( ll::googlemock SYSTEM INTERFACE - ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_DIR}/include/gmock) -elseif(DARWIN) - target_link_libraries( ll::googlemock INTERFACE gmock gtest) -endif(LINUX) - - diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 2172b56da2..6408f1200c 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -1,7 +1,6 @@ # -*- cmake -*- include(00-Common) include(LLTestCommand) -include(GoogleMock) include(bugsplat) include(Tut) @@ -19,10 +18,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) # # More info and examples at: https://wiki.secondlife.com/wiki/How_to_add_unit_tests_to_indra_code - # This here looks weird, but is needed. It will inject GoogleMock into projects that forgot to include `this` (LLAddBuildTest.cmake) - # But through some other means have access to this macro - include(GoogleMock) - if(LL_TEST_VERBOSE) message("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}") endif() @@ -41,7 +36,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) set(alltest_LIBRARIES llcommon - ll::googlemock ) if(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! @@ -204,7 +198,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST set(libraries ${library_dependencies} - ll::googlemock ) # Add test executable build target diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 87796abd3c..5650c4c8ba 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -3,7 +3,6 @@ project(llcorehttp) include(00-Common) -include(GoogleMock) include(CURL) include(OpenSSL) include(NGHTTP2) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index e44309476b..40d08f4f17 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -3,7 +3,6 @@ project(llmessage) include(00-Common) -include(GoogleMock) include(LLAddBuildTest) include(LLCommon) include(LLCoreHttp) diff --git a/indra/llmessage/tests/llmockhttpclient.h b/indra/llmessage/tests/llmockhttpclient.h deleted file mode 100644 index af26bf8803..0000000000 --- a/indra/llmessage/tests/llmockhttpclient.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file - * @brief - * - * $LicenseInfo:firstyear=2008&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -/* Macro Definitions */ -#ifndef LL_LLMOCKHTTPCLIENT_H -#define LL_LLMOCKHTTPCLIENT_H - -#include "linden_common.h" -#include "llhttpclientinterface.h" - -#include <gmock/gmock.h> - -class LLMockHTTPClient : public LLHTTPClientInterface -{ -public: - MOCK_METHOD2(get, void(const std::string& url, LLCurl::ResponderPtr responder)); - MOCK_METHOD3(get, void(const std::string& url, LLCurl::ResponderPtr responder, const LLSD& headers)); - MOCK_METHOD3(put, void(const std::string& url, const LLSD& body, LLCurl::ResponderPtr responder)); -}; - -// A helper to match responder types -template<typename T> -struct ResponderType -{ - bool operator()(LLCurl::ResponderPtr ptr) const - { - T* p = dynamic_cast<T*>(ptr.get()); - return p != NULL; - } -}; - -inline bool operator==(const LLSD& l, const LLSD& r) -{ - std::ostringstream ls, rs; - ls << l; - rs << r; - return ls.str() == rs.str(); - -} - - -#endif //LL_LLMOCKHTTPCLIENT_H - diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 4a0a8716c4..3dcddf9dc2 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -9,7 +9,6 @@ include(Linking) include(Tut) include(LLAddBuildTest) include(bugsplat) -include(GoogleMock) set(test_SOURCE_FILES io.cpp @@ -65,7 +64,6 @@ target_link_libraries(lltest llxml llcommon llcorehttp - ll::googlemock ) if (WINDOWS) diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 94478a5263..be3b326afe 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -53,17 +53,6 @@ # include "ctype_workaround.h" #endif -#ifndef LL_WINDOWS - -typedef struct { - void *re_pcre; - size_t re_nsub; - size_t re_erroffset; -} regex_t; -#include <gmock/gmock.h> -#include <gtest/gtest.h> -#endif - #if LL_MSVC #pragma warning (push) #pragma warning (disable : 4702) // warning C4702: unreachable code @@ -528,12 +517,6 @@ static LLTrace::ThreadRecorder* sMasterThreadRecorder = NULL; int main(int argc, char **argv) { - // The following line must be executed to initialize Google Mock - // (and Google Test) before running the tests. -#ifndef LL_WINDOWS - ::testing::InitGoogleMock(&argc, argv); -#endif - ll_init_apr(); apr_getopt_t* os = NULL; if(APR_SUCCESS != apr_getopt_init(&os, gAPRPoolp, argc, argv)) |