F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
TestUtils.hpp File Reference

Go to the source code of this file.

Macros

#define SEND_CMD(cmd, status, ...)    SEND_CMD_COMP(TEST_COMP, cmd, status, ## __VA_ARGS__)
 
#define SEND_CMD_COMP(comp, cmd, status, ...)
 
#define SEND_CMD_NO_EXPECT(cmd, ...)    SEND_CMD_COMP_NO_EXPECT(TEST_COMP, cmd, ## __VA_ARGS__)
 
#define SEND_CMD_COMP_NO_EXPECT(comp, cmd, ...)
 
#define ASSERT_LAST_CMD(cmd, status)    ASSERT_LAST_CMD_COMP(TEST_COMP, cmd, status)
 
#define ASSERT_LAST_CMD_COMP(comp, cmd, status)
 
#define ASSERT_LAST_TLM(name, value)
 
#define ASSERT_LAST_EVENT(name, ...)
 
#define ASSERT_LAST_PORT_OUT(port, ...)
 

Macro Definition Documentation

◆ ASSERT_LAST_CMD

#define ASSERT_LAST_CMD (   cmd,
  status 
)     ASSERT_LAST_CMD_COMP(TEST_COMP, cmd, status)

Definition at line 89 of file TestUtils.hpp.

◆ ASSERT_LAST_CMD_COMP

#define ASSERT_LAST_CMD_COMP (   comp,
  cmd,
  status 
)
Value:
ASSERT_GT(this->cmdResponseHistory->size(), 0); \
ASSERT_CMD_RESPONSE(this->cmdResponseHistory->size()-1, comp::OPCODE_ ## cmd, CMD_SEQ, status);

Definition at line 92 of file TestUtils.hpp.

◆ ASSERT_LAST_EVENT

#define ASSERT_LAST_EVENT (   name,
  ... 
)
Value:
ASSERT_GT(this->eventHistory_ ## name->size(), 0); \
ASSERT_EVENTS_ ## name(this->eventHistory_ ## name->size()-1, ## __VA_ARGS__);

Definition at line 118 of file TestUtils.hpp.

◆ ASSERT_LAST_PORT_OUT

#define ASSERT_LAST_PORT_OUT (   port,
  ... 
)
Value:
ASSERT_GT(this->fromPortHistory_ ## port->size(), 0); \
ASSERT_from_ ## port(__VA_ARGS__);

Definition at line 132 of file TestUtils.hpp.

◆ ASSERT_LAST_TLM

#define ASSERT_LAST_TLM (   name,
  value 
)
Value:
ASSERT_GT(this->tlmHistory_ ## name->size(), 0); \
ASSERT_TLM_ ## name(this->tlmHistory_ ## name->size()-1, value);

Definition at line 105 of file TestUtils.hpp.

◆ SEND_CMD

#define SEND_CMD (   cmd,
  status,
  ... 
)     SEND_CMD_COMP(TEST_COMP, cmd, status, ## __VA_ARGS__)

Definition at line 53 of file TestUtils.hpp.

◆ SEND_CMD_COMP

#define SEND_CMD_COMP (   comp,
  cmd,
  status,
  ... 
)
Value:
this->sendCmd_ ## cmd(INSTANCE, CMD_SEQ, ## __VA_ARGS__); \
this->component.doDispatch(); \
ASSERT_LAST_CMD(cmd, status);

Definition at line 56 of file TestUtils.hpp.

◆ SEND_CMD_COMP_NO_EXPECT

#define SEND_CMD_COMP_NO_EXPECT (   comp,
  cmd,
  ... 
)
Value:
this->sendCmd_ ## cmd(INSTANCE, CMD_SEQ, ## __VA_ARGS__); \
this->component.doDispatch();

Definition at line 73 of file TestUtils.hpp.

◆ SEND_CMD_NO_EXPECT

#define SEND_CMD_NO_EXPECT (   cmd,
  ... 
)     SEND_CMD_COMP_NO_EXPECT(TEST_COMP, cmd, ## __VA_ARGS__)

Definition at line 70 of file TestUtils.hpp.