test: Fix [-Wunused-result]

This commit is contained in:
Dennis Klein 2023-02-28 15:29:05 +01:00 committed by Dennis Klein
parent 84de22f80b
commit b25c0787c0
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (C) 2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * Copyright (C) 2018-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* * * *
* This software is distributed under the terms of the * * This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, * * GNU Lesser General Public Licence (LGPL) version 3, *
@ -37,9 +37,9 @@ class BadDevice : public Device
SetTransport("shmem"); SetTransport("shmem");
ChangeState(Transition::InitDevice); ChangeStateOrThrow(Transition::InitDevice);
WaitForState(State::InitializingDevice); WaitForState(State::InitializingDevice);
ChangeState(Transition::CompleteInit); ChangeStateOrThrow(Transition::CompleteInit);
WaitForState(State::Initialized); WaitForState(State::Initialized);
parts.AddPart(NewMessage()); parts.AddPart(NewMessage());
@ -52,7 +52,7 @@ class BadDevice : public Device
~BadDevice() override ~BadDevice() override
{ {
ChangeState(Transition::ResetDevice); ChangeStateOrThrow(Transition::ResetDevice);
if (fDeviceThread.joinable()) { if (fDeviceThread.joinable()) {
fDeviceThread.join(); fDeviceThread.join();

View File

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* * * *
* This software is distributed under the terms of the * * This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, * * GNU Lesser General Public Licence (LGPL) version 3, *
@ -37,7 +37,7 @@ class Version : public ::testing::Test
fair::mq::tools::Version TestDeviceVersion() fair::mq::tools::Version TestDeviceVersion()
{ {
TestVersion versionDevice({1, 2, 3}); TestVersion versionDevice({1, 2, 3});
versionDevice.ChangeState("END"); versionDevice.ChangeStateOrThrow("END");
return versionDevice.GetVersion(); return versionDevice.GetVersion();
} }