Skip to content

Commit

Permalink
Rename TEST_ENV macro to BARRIER_TEST_ENV
Browse files Browse the repository at this point in the history
As requested in debauchee#846.
  • Loading branch information
chewi committed Aug 22, 2020
1 parent c3aba1b commit 1418196
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/lib/barrier/KeyMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "common/stdset.h"
#include "common/stdvector.h"

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
#include <gtest/gtest_prod.h>
#endif

Expand Down Expand Up @@ -329,7 +329,7 @@ class KeyMap {
//@}

private:
#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
FRIEND_TEST(KeyMapTests,
findBestKey_requiredDown_matchExactFirstItem);
FRIEND_TEST(KeyMapTests,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/barrier/Screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Screen : public IScreen {
Screen(IPlatformScreen* platformScreen, IEventQueue* events);
virtual ~Screen();

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
Screen() : m_mock(true) { }
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lib/client/ServerProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ServerProxy {
// sending dragging information to server
void sendDragInfo(UInt32 fileCount, const char* info, size_t size);

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
void handleDataForTest() { handleData(Event(), NULL); }
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lib/ipc/IpcServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class IpcServer {
ClientList m_clients;
mutable std::mutex m_clientsMutex;

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
public:
IpcServer() :
m_mock(true),
Expand Down
4 changes: 2 additions & 2 deletions src/lib/platform/XWindowsKeyState.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class XWindowsKeyState : public KeyState {
bool m_lock;
};

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
public: // yuck
#endif
typedef std::vector<KeyModifierMask> KeyModifierMaskList;
Expand Down Expand Up @@ -169,7 +169,7 @@ class XWindowsKeyState : public KeyState {
// autorepeat state
XKeyboardState m_keyboardState;

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
public:
SInt32 group() const { return m_group; }
void group(const SInt32& group) { m_group = group; }
Expand Down
2 changes: 1 addition & 1 deletion src/lib/server/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class Config {
Config(IEventQueue* events);
virtual ~Config();

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
Config() : m_inputFilter(NULL) { }
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lib/server/InputFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class InputFilter {
InputFilter(const InputFilter&);
virtual ~InputFilter();

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
InputFilter() : m_primaryClient(NULL) { }
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lib/server/PrimaryClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PrimaryClient : public BaseClientProxy {
PrimaryClient(const std::string& name, barrier::Screen* screen);
~PrimaryClient();

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
PrimaryClient() : BaseClientProxy("") { }
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/lib/server/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Server : public INode {
barrier::Screen* screen, IEventQueue* events, ServerArgs const& args);
~Server();

#ifdef TEST_ENV
#ifdef BARRIER_TEST_ENV
Server() : m_mock(true), m_config(NULL) { }
void setActive(BaseClientProxy* active) { m_active = active; }
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/test/integtests/ipc/IpcTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TODO: fix, tests failing intermittently on mac.
#ifndef WINAPI_CARBON

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "test/global/TestEventQueue.h"
#include "ipc/IpcServer.h"
Expand Down
2 changes: 1 addition & 1 deletion src/test/integtests/net/NetworkTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// TODO: fix, tests failing intermittently on mac.
#ifndef WINAPI_CARBON

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "test/mock/server/MockConfig.h"
#include "test/mock/server/MockPrimaryClient.h"
Expand Down
2 changes: 1 addition & 1 deletion src/test/integtests/platform/MSWindowsKeyStateTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* 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/MockKeyMap.h"
Expand Down
2 changes: 1 addition & 1 deletion src/test/integtests/platform/XWindowsKeyStateTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* 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/MockEventQueue.h"
Expand Down
2 changes: 1 addition & 1 deletion src/test/mock/barrier/MockApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma once

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "barrier/App.h"

Expand Down
2 changes: 1 addition & 1 deletion src/test/mock/barrier/MockArgParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma once

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "barrier/ArgParser.h"

Expand Down
2 changes: 1 addition & 1 deletion src/test/mock/barrier/MockScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma once

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "barrier/Screen.h"

Expand Down
2 changes: 1 addition & 1 deletion src/test/mock/server/MockConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma once

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "server/Config.h"

Expand Down
2 changes: 1 addition & 1 deletion src/test/mock/server/MockInputFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma once

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "server/InputFilter.h"

Expand Down
2 changes: 1 addition & 1 deletion src/test/mock/server/MockPrimaryClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma once

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "server/PrimaryClient.h"
#include "base/String.h"
Expand Down
2 changes: 1 addition & 1 deletion src/test/mock/server/MockServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma once

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "server/Server.h"

Expand Down
2 changes: 1 addition & 1 deletion src/test/unittests/barrier/KeyMapTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#define TEST_ENV
#define BARRIER_TEST_ENV

#include "barrier/KeyMap.h"

Expand Down
2 changes: 1 addition & 1 deletion src/test/unittests/ipc/IpcLogOutputterTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* 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"

Expand Down

0 comments on commit 1418196

Please sign in to comment.