From d4b65d8e73107e912cd72f150717bc7ce2d617ad Mon Sep 17 00:00:00 2001 From: sawinglogz <3787776-sawinglogz@users.noreply.gitlab.com> Date: Sat, 4 May 2019 21:50:45 -0400 Subject: [PATCH] Make Event and Loader/PRS1Loader protected and private members public during unit testing. --- oscar/SleepLib/event.h | 7 ++++++- oscar/SleepLib/loader_plugins/prs1_loader.h | 4 ++++ oscar/SleepLib/machine_loader.h | 6 +++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/oscar/SleepLib/event.h b/oscar/SleepLib/event.h index fdb2ee13..3ab3f7cc 100644 --- a/oscar/SleepLib/event.h +++ b/oscar/SleepLib/event.h @@ -1,4 +1,4 @@ -/* SleepLib Event Class Header +/* SleepLib Event Class Header * * Copyright (C) 2011-2018 Mark Watkins * @@ -13,6 +13,11 @@ #include "machine_common.h" +#ifdef UNITTEST_MODE +#define private public +#define protected public +#endif + //! \brief EventLists can either be Waveform or Event types enum EventListType { EVL_Waveform, EVL_Event }; diff --git a/oscar/SleepLib/loader_plugins/prs1_loader.h b/oscar/SleepLib/loader_plugins/prs1_loader.h index 4985ce36..fd4bf620 100644 --- a/oscar/SleepLib/loader_plugins/prs1_loader.h +++ b/oscar/SleepLib/loader_plugins/prs1_loader.h @@ -15,6 +15,10 @@ #include "SleepLib/machine_loader.h" #include "SleepLib/profiles.h" +#ifdef UNITTEST_MODE +#define private public +#define protected public +#endif //******************************************************************************************** /// IMPORTANT!!! diff --git a/oscar/SleepLib/machine_loader.h b/oscar/SleepLib/machine_loader.h index ad4a8bc1..ce717bb2 100644 --- a/oscar/SleepLib/machine_loader.h +++ b/oscar/SleepLib/machine_loader.h @@ -1,4 +1,4 @@ -/* SleepLib MachineLoader Base Class Header +/* SleepLib MachineLoader Base Class Header * * Copyright (c) 2018 Mark Watkins * @@ -22,6 +22,10 @@ #include "zlib.h" #endif +#ifdef UNITTEST_MODE +#define private public +#define protected public +#endif class MachineLoader; enum DeviceStatus { NEUTRAL, IMPORTING, LIVE, DETECTING };