Classes | Namespaces | Macros | Functions | Variables
unittest_stop1_executor.cpp File Reference
#include <atomic>
#include <chrono>
#include <functional>
#include <memory>
#include <thread>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <ros/ros.h>
#include <pilz_testutils/async_test.h>
#include <prbt_hardware_support/stop1_executor.h>
#include <prbt_hardware_support/service_function_decl.h>
Include dependency graph for unittest_stop1_executor.cpp:

Go to the source code of this file.

Classes

class  prbt_hardware_support_tests::Stop1ExecutorForTests
 
class  prbt_hardware_support_tests::Stop1ExecutorTest
 

Namespaces

 prbt_hardware_support_tests
 

Macros

#define EXPECT_HALT   EXPECT_CALL(*this, halt_func()).WillOnce(DoAll(ACTION_OPEN_BARRIER_VOID(HALT_SRV_CALLED_EVENT), Return(true)))
 
#define EXPECT_HOLD   EXPECT_CALL(*this, hold_func()).WillOnce(DoAll(ACTION_OPEN_BARRIER_VOID(HOLD_SRV_CALLED_EVENT), Return(true)))
 
#define EXPECT_RECOVER   EXPECT_CALL(*this, recover_func()).WillOnce(DoAll(ACTION_OPEN_BARRIER_VOID(RECOVER_SRV_CALLED_EVENT), Return(true)))
 
#define EXPECT_UNHOLD   EXPECT_CALL(*this, unhold_func()).WillOnce(DoAll(ACTION_OPEN_BARRIER_VOID(UNHOLD_SRV_CALLED_EVENT), Return(true)))
 

Functions

int main (int argc, char **argv)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testDestructor)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testEnable)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testEnableStopEnable)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testSpamEnablePlusStop)
 Test spaming enable plus subsequent stop. More...
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testSpamRunPermittedActivePlusEnable)
 Test spamming RUN_PERMITTED=false plus subsequent enable. More...
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testSkippingHoldPlusEnable)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testEnableDuringHoldService)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testEnableDuringHaltService)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testEnableDisableDuringHaltService)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testRecoverFailPlusRetry)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testUnholdFail)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testHoldFail)
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testHoldImmediatelyAfterUnhold)
 Test hold immediately when run_permitted changes to false during unhold. More...
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testExitInStateEnabling)
 Test stopping the state machine in state Enabling. More...
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testExitInStateStopping)
 Test stopping the state machine in state Stopping. More...
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testExitInStateStopRequestedDuringEnable)
 Test stopping the state machine in state StopRequestedDuringEnable. More...
 
 prbt_hardware_support_tests::TEST_F (Stop1ExecutorTest, testExitInStateEnableRequestDuringStop)
 Test stopping the state machine in state EnableRequestDuringStop. More...
 

Variables

const std::string prbt_hardware_support_tests::HALT_SRV_CALLED_EVENT { "halt_srv_called" }
 
const std::string prbt_hardware_support_tests::HOLD_SRV_CALLED_EVENT { "hold_srv_called" }
 
const std::string prbt_hardware_support_tests::RECOVER_SRV_CALLED_EVENT { "recover_srv_called" }
 
const std::string prbt_hardware_support_tests::UNHOLD_SRV_CALLED_EVENT { "unhold_srv_called" }
 

Macro Definition Documentation

◆ EXPECT_HALT

#define EXPECT_HALT   EXPECT_CALL(*this, halt_func()).WillOnce(DoAll(ACTION_OPEN_BARRIER_VOID(HALT_SRV_CALLED_EVENT), Return(true)))

Definition at line 43 of file unittest_stop1_executor.cpp.

◆ EXPECT_HOLD

#define EXPECT_HOLD   EXPECT_CALL(*this, hold_func()).WillOnce(DoAll(ACTION_OPEN_BARRIER_VOID(HOLD_SRV_CALLED_EVENT), Return(true)))

Definition at line 40 of file unittest_stop1_executor.cpp.

◆ EXPECT_RECOVER

#define EXPECT_RECOVER   EXPECT_CALL(*this, recover_func()).WillOnce(DoAll(ACTION_OPEN_BARRIER_VOID(RECOVER_SRV_CALLED_EVENT), Return(true)))

Definition at line 34 of file unittest_stop1_executor.cpp.

◆ EXPECT_UNHOLD

#define EXPECT_UNHOLD   EXPECT_CALL(*this, unhold_func()).WillOnce(DoAll(ACTION_OPEN_BARRIER_VOID(UNHOLD_SRV_CALLED_EVENT), Return(true)))

Definition at line 37 of file unittest_stop1_executor.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1059 of file unittest_stop1_executor.cpp.



prbt_hardware_support
Author(s):
autogenerated on Mon Feb 28 2022 23:14:34