fixed: silenced gtest warning on osx106
This commit is contained in:
parent
19bcb9dfae
commit
ad8905ccbf
|
@ -0,0 +1,32 @@
|
||||||
|
/*
|
||||||
|
* synergy -- mouse and keyboard sharing utility
|
||||||
|
* Copyright (C) 2014 Bolton Software Ltd.
|
||||||
|
*
|
||||||
|
* This package is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* found in the file COPYING that should have accompanied this file.
|
||||||
|
*
|
||||||
|
* This package 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// HACK: gcc on osx106 doesn't give you an easy way to hide warnings
|
||||||
|
// from included headers, so use the system_header pragma. the downside
|
||||||
|
// is that everything in the header file following this also has warnings
|
||||||
|
// ignored, so we need to put it in a separate header file.
|
||||||
|
#if __APPLE__
|
||||||
|
# pragma GCC system_header
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// gmock includes gtest which has a warning on osx106 (signed/unsigned
|
||||||
|
// int compare), so include our special header here first to silence
|
||||||
|
// the warning.
|
||||||
|
#include "test/global/gtest.h"
|
||||||
|
#include <gmock/gmock.h>
|
|
@ -25,4 +25,5 @@
|
||||||
# pragma GCC system_header
|
# pragma GCC system_header
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// gtest has a warning on osx106 (signed/unsigned int compare).
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
|
@ -14,16 +14,26 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
file(GLOB headers "*.h")
|
file(GLOB_RECURSE headers "*.h")
|
||||||
file(GLOB sources "*.cpp")
|
file(GLOB_RECURSE sources "*.cpp")
|
||||||
|
|
||||||
|
# remove arch files (specific arch added later).
|
||||||
|
file(GLOB remove_arch "arch/*")
|
||||||
|
list(REMOVE_ITEM headers ${remove_arch})
|
||||||
|
list(REMOVE_ITEM sources ${remove_arch})
|
||||||
|
|
||||||
|
# remove platform files (specific platform added later).
|
||||||
|
file(GLOB remove_platform "platform/*")
|
||||||
|
list(REMOVE_ITEM headers ${remove_platform})
|
||||||
|
list(REMOVE_ITEM sources ${remove_platform})
|
||||||
|
|
||||||
# arch
|
# arch
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
file(GLOB arch_sources "arch/CArchWindows*.cpp")
|
file(GLOB arch_sources "arch/ArchWindows*.cpp")
|
||||||
file(GLOB arch_headers "arch/CArchWindows*.h")
|
file(GLOB arch_headers "arch/ArchWindows*.h")
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
file(GLOB arch_sources "arch/CArchUnix*.cpp")
|
file(GLOB arch_sources "arch/ArchUnix*.cpp")
|
||||||
file(GLOB arch_headers "arch/CArchUnix*.h")
|
file(GLOB arch_headers "arch/ArchUnix*.h")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND sources ${arch_sources})
|
list(APPEND sources ${arch_sources})
|
||||||
|
@ -31,19 +41,31 @@ list(APPEND headers ${arch_headers})
|
||||||
|
|
||||||
# platform
|
# platform
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
file(GLOB platform_sources "platform/CMSWindows*.cpp")
|
file(GLOB platform_sources "platform/MSWindows*.cpp")
|
||||||
file(GLOB platform_headers "platform/CMSWindows*.h")
|
file(GLOB platform_headers "platform/MSWindows*.h")
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
file(GLOB platform_sources "platform/COSX*.cpp")
|
file(GLOB platform_sources "platform/OSX*.cpp")
|
||||||
file(GLOB platform_headers "platform/COSX*.h")
|
file(GLOB platform_headers "platform/OSX*.h")
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
file(GLOB platform_sources "platform/CXWindows*.cpp")
|
file(GLOB platform_sources "platform/XWindows*.cpp")
|
||||||
file(GLOB platform_headers "platform/CXWindows*.h")
|
file(GLOB platform_headers "platform/XWindows*.h")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND sources ${platform_sources})
|
list(APPEND sources ${platform_sources})
|
||||||
list(APPEND headers ${platform_headers})
|
list(APPEND headers ${platform_headers})
|
||||||
|
|
||||||
|
file(GLOB_RECURSE global_headers "../../test/global/*.h")
|
||||||
|
file(GLOB_RECURSE global_sources "../../test/global/*.cpp")
|
||||||
|
|
||||||
|
list(APPEND headers ${global_headers})
|
||||||
|
list(APPEND sources ${global_sources})
|
||||||
|
|
||||||
|
file(GLOB_RECURSE mock_headers "../../test/mock/*.h")
|
||||||
|
file(GLOB_RECURSE mock_sources "../../test/mock/*.cpp")
|
||||||
|
|
||||||
|
list(APPEND headers ${mock_headers})
|
||||||
|
list(APPEND sources ${mock_sources})
|
||||||
|
|
||||||
if (SYNERGY_ADD_HEADERS)
|
if (SYNERGY_ADD_HEADERS)
|
||||||
list(APPEND sources ${headers})
|
list(APPEND sources ${headers})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "arch/win32/ArchMiscWindows.h"
|
#include "arch/win32/ArchMiscWindows.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include "platform/OSXClipboard.h"
|
#include "platform/OSXClipboard.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
TEST(COSXClipboardTests, empty_openCalled_returnsTrue)
|
TEST(COSXClipboardTests, empty_openCalled_returnsTrue)
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "test/mock/synergy/MockKeyMap.h"
|
||||||
|
#include "test/mock/synergy/MockEventQueue.h"
|
||||||
#include "platform/OSXKeyState.h"
|
#include "platform/OSXKeyState.h"
|
||||||
#include "synergy/CMockKeyMap.h"
|
|
||||||
#include "synergy/CMockEventQueue.h"
|
|
||||||
#include "base/Log.h"
|
#include "base/Log.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
#define SHIFT_ID_L kKeyShift_L
|
#define SHIFT_ID_L kKeyShift_L
|
||||||
#define SHIFT_ID_R kKeyShift_R
|
#define SHIFT_ID_R kKeyShift_R
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "arch/Arch.h"
|
#include "arch/Arch.h"
|
||||||
#include "base/EventQueue.h"
|
#include "base/EventQueue.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
// disabling these tests - the return value of CGCursorIsVisible is unreliable.
|
// disabling these tests - the return value of CGCursorIsVisible is unreliable.
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "client/Client.h"
|
#include "client/Client.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class IEventQueue;
|
class IEventQueue;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "io/CryptoStream.h"
|
#include "io/CryptoStream.h"
|
||||||
#include "io/CryptoOptions.h"
|
#include "io/CryptoOptions.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class CMockCryptoStream : public CCryptoStream
|
class CMockCryptoStream : public CCryptoStream
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "io/IStream.h"
|
#include "io/IStream.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class IEventQueue;
|
class IEventQueue;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "server/Config.h"
|
#include "server/Config.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class CMockConfig : public CConfig
|
class CMockConfig : public CConfig
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "server/InputFilter.h"
|
#include "server/InputFilter.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class CMockInputFilter : public CInputFilter
|
class CMockInputFilter : public CInputFilter
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "synergy/PrimaryClient.h"
|
#include "synergy/PrimaryClient.h"
|
||||||
#include "base/String.h"
|
#include "base/String.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class CMockPrimaryClient : public CPrimaryClient
|
class CMockPrimaryClient : public CPrimaryClient
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "base/IEventQueue.h"
|
#include "base/IEventQueue.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class CMockEventQueue : public IEventQueue
|
class CMockEventQueue : public IEventQueue
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "synergy/KeyMap.h"
|
#include "synergy/KeyMap.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class CMockKeyMap : public CKeyMap
|
class CMockKeyMap : public CKeyMap
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "synergy/Screen.h"
|
#include "synergy/Screen.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class CMockScreen : public CScreen
|
class CMockScreen : public CScreen
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,18 @@
|
||||||
file(GLOB_RECURSE headers "*.h")
|
file(GLOB_RECURSE headers "*.h")
|
||||||
file(GLOB_RECURSE sources "*.cpp")
|
file(GLOB_RECURSE sources "*.cpp")
|
||||||
|
|
||||||
|
file(GLOB_RECURSE global_headers "../../test/global/*.h")
|
||||||
|
file(GLOB_RECURSE global_sources "../../test/global/*.cpp")
|
||||||
|
|
||||||
|
list(APPEND headers ${global_headers})
|
||||||
|
list(APPEND sources ${global_sources})
|
||||||
|
|
||||||
|
file(GLOB_RECURSE mock_headers "../../test/mock/*.h")
|
||||||
|
file(GLOB_RECURSE mock_sources "../../test/mock/*.cpp")
|
||||||
|
|
||||||
|
list(APPEND headers ${mock_headers})
|
||||||
|
list(APPEND sources ${mock_sources})
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
../../
|
../../
|
||||||
../../lib/
|
../../lib/
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "arch/win32/ArchMiscWindows.h"
|
#include "arch/win32/ArchMiscWindows.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "client/ServerProxy.h"
|
#include "client/ServerProxy.h"
|
||||||
#include "synergy/protocol_types.h"
|
#include "synergy/protocol_types.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
using ::testing::Invoke;
|
using ::testing::Invoke;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "test/mock/synergy/MockEventQueue.h"
|
#include "test/mock/synergy/MockEventQueue.h"
|
||||||
#include "server/ClientProxy1_4.h"
|
#include "server/ClientProxy1_4.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
using ::testing::NiceMock;
|
using ::testing::NiceMock;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "io/CryptoStream.h"
|
#include "io/CryptoStream.h"
|
||||||
#include "io/CryptoOptions.h"
|
#include "io/CryptoOptions.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
using ::testing::Invoke;
|
using ::testing::Invoke;
|
||||||
|
|
|
@ -17,11 +17,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "test/unittests/synergy/KeyStateTests.h"
|
#include "test/unittests/synergy/KeyStateTests.h"
|
||||||
|
|
||||||
#include "test/mock/synergy/MockEventQueue.h"
|
#include "test/mock/synergy/MockEventQueue.h"
|
||||||
#include "test/mock/synergy/MockKeyMap.h"
|
#include "test/mock/synergy/MockKeyMap.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
|
||||||
#include "test/global/gtest.h"
|
#include "test/global/gtest.h"
|
||||||
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
using ::testing::NiceMock;
|
using ::testing::NiceMock;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include "synergy/KeyState.h"
|
#include "synergy/KeyState.h"
|
||||||
|
|
||||||
#include "gmock/gmock.h"
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class CMockKeyMap;
|
class CMockKeyMap;
|
||||||
class CMockEventQueue;
|
class CMockEventQueue;
|
||||||
|
|
Loading…
Reference in New Issue