Rename TEST_ENV macro to BARRIER_TEST_ENV

As requested in #846.
This commit is contained in:
James Le Cuirot 2020-08-22 19:25:35 +01:00
parent c3aba1b20b
commit 1418196af1
No known key found for this signature in database
GPG Key ID: 1226415D00DD3137
22 changed files with 24 additions and 24 deletions

View File

@ -24,7 +24,7 @@
#include "common/stdset.h" #include "common/stdset.h"
#include "common/stdvector.h" #include "common/stdvector.h"
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
#include <gtest/gtest_prod.h> #include <gtest/gtest_prod.h>
#endif #endif
@ -329,7 +329,7 @@ public:
//@} //@}
private: private:
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
FRIEND_TEST(KeyMapTests, FRIEND_TEST(KeyMapTests,
findBestKey_requiredDown_matchExactFirstItem); findBestKey_requiredDown_matchExactFirstItem);
FRIEND_TEST(KeyMapTests, FRIEND_TEST(KeyMapTests,

View File

@ -42,7 +42,7 @@ public:
Screen(IPlatformScreen* platformScreen, IEventQueue* events); Screen(IPlatformScreen* platformScreen, IEventQueue* events);
virtual ~Screen(); virtual ~Screen();
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
Screen() : m_mock(true) { } Screen() : m_mock(true) { }
#endif #endif

View File

@ -59,7 +59,7 @@ public:
// sending dragging information to server // sending dragging information to server
void sendDragInfo(UInt32 fileCount, const char* info, size_t size); void sendDragInfo(UInt32 fileCount, const char* info, size_t size);
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
void handleDataForTest() { handleData(Event(), NULL); } void handleDataForTest() { handleData(Event(), NULL); }
#endif #endif

View File

@ -82,7 +82,7 @@ private:
ClientList m_clients; ClientList m_clients;
mutable std::mutex m_clientsMutex; mutable std::mutex m_clientsMutex;
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
public: public:
IpcServer() : IpcServer() :
m_mock(true), m_mock(true),

View File

@ -136,7 +136,7 @@ private:
bool m_lock; bool m_lock;
}; };
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
public: // yuck public: // yuck
#endif #endif
typedef std::vector<KeyModifierMask> KeyModifierMaskList; typedef std::vector<KeyModifierMask> KeyModifierMaskList;
@ -169,7 +169,7 @@ private:
// autorepeat state // autorepeat state
XKeyboardState m_keyboardState; XKeyboardState m_keyboardState;
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
public: public:
SInt32 group() const { return m_group; } SInt32 group() const { return m_group; }
void group(const SInt32& group) { m_group = group; } void group(const SInt32& group) { m_group = group; }

View File

@ -174,7 +174,7 @@ public:
Config(IEventQueue* events); Config(IEventQueue* events);
virtual ~Config(); virtual ~Config();
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
Config() : m_inputFilter(NULL) { } Config() : m_inputFilter(NULL) { }
#endif #endif

View File

@ -333,7 +333,7 @@ public:
InputFilter(const InputFilter&); InputFilter(const InputFilter&);
virtual ~InputFilter(); virtual ~InputFilter();
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
InputFilter() : m_primaryClient(NULL) { } InputFilter() : m_primaryClient(NULL) { }
#endif #endif

View File

@ -37,7 +37,7 @@ public:
PrimaryClient(const std::string& name, barrier::Screen* screen); PrimaryClient(const std::string& name, barrier::Screen* screen);
~PrimaryClient(); ~PrimaryClient();
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
PrimaryClient() : BaseClientProxy("") { } PrimaryClient() : BaseClientProxy("") { }
#endif #endif

View File

@ -110,7 +110,7 @@ public:
barrier::Screen* screen, IEventQueue* events, ServerArgs const& args); barrier::Screen* screen, IEventQueue* events, ServerArgs const& args);
~Server(); ~Server();
#ifdef TEST_ENV #ifdef BARRIER_TEST_ENV
Server() : m_mock(true), m_config(NULL) { } Server() : m_mock(true), m_config(NULL) { }
void setActive(BaseClientProxy* active) { m_active = active; } void setActive(BaseClientProxy* active) { m_active = active; }
#endif #endif

View File

@ -19,7 +19,7 @@
// TODO: fix, tests failing intermittently on mac. // TODO: fix, tests failing intermittently on mac.
#ifndef WINAPI_CARBON #ifndef WINAPI_CARBON
#define TEST_ENV #define BARRIER_TEST_ENV
#include "test/global/TestEventQueue.h" #include "test/global/TestEventQueue.h"
#include "ipc/IpcServer.h" #include "ipc/IpcServer.h"

View File

@ -18,7 +18,7 @@
// TODO: fix, tests failing intermittently on mac. // TODO: fix, tests failing intermittently on mac.
#ifndef WINAPI_CARBON #ifndef WINAPI_CARBON
#define TEST_ENV #define BARRIER_TEST_ENV
#include "test/mock/server/MockConfig.h" #include "test/mock/server/MockConfig.h"
#include "test/mock/server/MockPrimaryClient.h" #include "test/mock/server/MockPrimaryClient.h"

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define TEST_ENV #define BARRIER_TEST_ENV
#include "test/mock/barrier/MockEventQueue.h" #include "test/mock/barrier/MockEventQueue.h"
#include "test/mock/barrier/MockKeyMap.h" #include "test/mock/barrier/MockKeyMap.h"

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define TEST_ENV #define BARRIER_TEST_ENV
#include "test/mock/barrier/MockKeyMap.h" #include "test/mock/barrier/MockKeyMap.h"
#include "test/mock/barrier/MockEventQueue.h" #include "test/mock/barrier/MockEventQueue.h"

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#define TEST_ENV #define BARRIER_TEST_ENV
#include "barrier/App.h" #include "barrier/App.h"

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#define TEST_ENV #define BARRIER_TEST_ENV
#include "barrier/ArgParser.h" #include "barrier/ArgParser.h"

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#define TEST_ENV #define BARRIER_TEST_ENV
#include "barrier/Screen.h" #include "barrier/Screen.h"

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#define TEST_ENV #define BARRIER_TEST_ENV
#include "server/Config.h" #include "server/Config.h"

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#define TEST_ENV #define BARRIER_TEST_ENV
#include "server/InputFilter.h" #include "server/InputFilter.h"

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#define TEST_ENV #define BARRIER_TEST_ENV
#include "server/PrimaryClient.h" #include "server/PrimaryClient.h"
#include "base/String.h" #include "base/String.h"

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#define TEST_ENV #define BARRIER_TEST_ENV
#include "server/Server.h" #include "server/Server.h"

View File

@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define TEST_ENV #define BARRIER_TEST_ENV
#include "barrier/KeyMap.h" #include "barrier/KeyMap.h"

View File

@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define TEST_ENV #define BARRIER_TEST_ENV
#include "test/mock/ipc/MockIpcServer.h" #include "test/mock/ipc/MockIpcServer.h"