mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Add Version member to FairMQDevice, settable via constructor
This commit is contained in:
committed by
Mohammad Al-Turany
parent
3d8175bfd6
commit
65f1b96dc3
46
fairmq/test/device/_device_version.cxx
Normal file
46
fairmq/test/device/_device_version.cxx
Normal file
@@ -0,0 +1,46 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#include "TestVersion.h"
|
||||
|
||||
#include <fairmq/Tools.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <sstream> // std::stringstream
|
||||
#include <thread>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
using namespace std;
|
||||
using namespace fair::mq::test;
|
||||
|
||||
class DeviceVersion : public ::testing::Test {
|
||||
public:
|
||||
DeviceVersion()
|
||||
{}
|
||||
|
||||
fair::mq::tools::Version TestDeviceVersion()
|
||||
{
|
||||
fair::mq::test::TestVersion versionDevice({1, 2, 3});
|
||||
versionDevice.ChangeState("END");
|
||||
|
||||
return versionDevice.GetVersion();
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(DeviceVersion, getter)
|
||||
{
|
||||
struct fair::mq::tools::Version v{1, 2, 3};
|
||||
fair::mq::tools::Version version = TestDeviceVersion();
|
||||
|
||||
EXPECT_EQ(v, version);
|
||||
}
|
||||
|
||||
} // namespace
|
Reference in New Issue
Block a user