From b25c0787c02793891c4930727a44c69d006eb3e2 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Tue, 28 Feb 2023 15:29:05 +0100 Subject: [PATCH] test: Fix [-Wunused-result] --- test/device/_error_state.cxx | 8 ++++---- test/device/_version.cxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/device/_error_state.cxx b/test/device/_error_state.cxx index a63c3c07..046ac61f 100644 --- a/test/device/_error_state.cxx +++ b/test/device/_error_state.cxx @@ -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 * * GNU Lesser General Public Licence (LGPL) version 3, * @@ -37,9 +37,9 @@ class BadDevice : public Device SetTransport("shmem"); - ChangeState(Transition::InitDevice); + ChangeStateOrThrow(Transition::InitDevice); WaitForState(State::InitializingDevice); - ChangeState(Transition::CompleteInit); + ChangeStateOrThrow(Transition::CompleteInit); WaitForState(State::Initialized); parts.AddPart(NewMessage()); @@ -52,7 +52,7 @@ class BadDevice : public Device ~BadDevice() override { - ChangeState(Transition::ResetDevice); + ChangeStateOrThrow(Transition::ResetDevice); if (fDeviceThread.joinable()) { fDeviceThread.join(); diff --git a/test/device/_version.cxx b/test/device/_version.cxx index 9e71738d..67c2cc55 100644 --- a/test/device/_version.cxx +++ b/test/device/_version.cxx @@ -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 * * GNU Lesser General Public Licence (LGPL) version 3, * @@ -37,7 +37,7 @@ class Version : public ::testing::Test fair::mq::tools::Version TestDeviceVersion() { TestVersion versionDevice({1, 2, 3}); - versionDevice.ChangeState("END"); + versionDevice.ChangeStateOrThrow("END"); return versionDevice.GetVersion(); }