Move test helper devices to headers

This commit is contained in:
Alexey Rybalchenko 2018-10-18 11:32:05 +02:00 committed by Dennis Klein
parent d4a4ea14d2
commit 1b53538d8c
15 changed files with 93 additions and 28 deletions

View File

@ -15,19 +15,19 @@ include(GTestHelper)
add_testhelper(runTestDevice
SOURCES
helper/runTestDevice.cxx
helper/devices/TestPairLeft.cxx
helper/devices/TestPairRight.cxx
helper/devices/TestPollIn.cxx
helper/devices/TestPollOut.cxx
helper/devices/TestPub.cxx
helper/devices/TestPull.cxx
helper/devices/TestPush.cxx
helper/devices/TestRep.cxx
helper/devices/TestReq.cxx
helper/devices/TestSub.cxx
helper/devices/TestTransferTimeout.cxx
helper/devices/TestWaitFor.cxx
helper/devices/TestExceptions.cxx
helper/devices/TestPairLeft.h
helper/devices/TestPairRight.h
helper/devices/TestPollIn.h
helper/devices/TestPollOut.h
helper/devices/TestPub.h
helper/devices/TestPull.h
helper/devices/TestPush.h
helper/devices/TestRep.h
helper/devices/TestReq.h
helper/devices/TestSub.h
helper/devices/TestTransferTimeout.h
helper/devices/TestWaitFor.h
helper/devices/TestExceptions.h
LINKS FairMQ
)

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_EXCEPTIONS_H
#define FAIR_MQ_TEST_EXCEPTIONS_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
@ -19,7 +22,7 @@ namespace mq
namespace test
{
class TestExceptions : public FairMQDevice
class Exceptions : public FairMQDevice
{
public:
auto Init() -> void override
@ -82,3 +85,5 @@ class TestExceptions : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_EXCEPTIONS_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_PAIRLEFT_H
#define FAIR_MQ_TEST_PAIRLEFT_H
#include <FairMQDevice.h>
#include <cstddef>
@ -60,3 +63,5 @@ class PairLeft : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_PAIRLEFT_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_PAIRRIGHT_H
#define FAIR_MQ_TEST_PAIRRIGHT_H
#include <FairMQDevice.h>
#include <cstddef>
#include <string>
@ -61,3 +64,5 @@ class PairRight : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_PAIRRIGHT_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_POLLIN_H
#define FAIR_MQ_TEST_POLLIN_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
#include <options/FairMQProgOptions.h>
@ -127,3 +130,5 @@ class PollIn : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_POLLIN_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_POLLOUT_H
#define FAIR_MQ_TEST_POLLOUT_H
#include <FairMQDevice.h>
#include <thread>
@ -36,3 +39,5 @@ class PollOut : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_POLLOUT_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_PUB_H
#define FAIR_MQ_TEST_PUB_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
#include <chrono>
@ -70,3 +73,5 @@ class Pub : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_PUB_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_PULL_H
#define FAIR_MQ_TEST_PULL_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
#include <thread>
@ -41,3 +44,5 @@ class Pull : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_PULL_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_PUSH_H
#define FAIR_MQ_TEST_PUSH_H
#include <FairMQDevice.h>
#include <thread>
@ -34,3 +37,5 @@ class Push : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_PUSH_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_REP_H
#define FAIR_MQ_TEST_REP_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
#include <thread>
@ -49,3 +52,5 @@ class Rep : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_REP_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_REQ_H
#define FAIR_MQ_TEST_REQ_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
#include <thread>
@ -41,3 +44,5 @@ class Req : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_REQ_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_SUB_H
#define FAIR_MQ_TEST_SUB_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
#include <chrono>
@ -64,3 +67,5 @@ class Sub : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_SUB_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_TRANSFERTIMEOUT_H
#define FAIR_MQ_TEST_TRANSFERTIMEOUT_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
@ -112,3 +115,5 @@ class TransferTimeout : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_TRANSFERTIMEOUT_H */

View File

@ -6,6 +6,9 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_TEST_WAITFOR_H
#define FAIR_MQ_TEST_WAITFOR_H
#include <FairMQDevice.h>
#include <FairMQLogger.h>
@ -31,3 +34,5 @@ class TestWaitFor : public FairMQDevice
} // namespace test
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_TEST_WAITFOR_H */

View File

@ -6,19 +6,19 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include "devices/TestPairLeft.cxx"
#include "devices/TestPairRight.cxx"
#include "devices/TestPollIn.cxx"
#include "devices/TestPollOut.cxx"
#include "devices/TestPub.cxx"
#include "devices/TestPull.cxx"
#include "devices/TestPush.cxx"
#include "devices/TestRep.cxx"
#include "devices/TestReq.cxx"
#include "devices/TestSub.cxx"
#include "devices/TestTransferTimeout.cxx"
#include "devices/TestWaitFor.cxx"
#include "devices/TestExceptions.cxx"
#include "devices/TestPairLeft.h"
#include "devices/TestPairRight.h"
#include "devices/TestPollIn.h"
#include "devices/TestPollOut.h"
#include "devices/TestPub.h"
#include "devices/TestPull.h"
#include "devices/TestPush.h"
#include "devices/TestRep.h"
#include "devices/TestReq.h"
#include "devices/TestSub.h"
#include "devices/TestTransferTimeout.h"
#include "devices/TestWaitFor.h"
#include "devices/TestExceptions.h"
#include <runFairMQDevice.h>
@ -90,7 +90,7 @@ auto getDevice(const FairMQProgOptions& config) -> FairMQDevicePtr
}
else if (0 == id.find("exceptions_"))
{
return new TestExceptions;
return new Exceptions;
}
else
{