Functions
brake_test_utils_test Namespace Reference

Functions

::testing::AssertionResult compareJointStateMessages (const JointStateConstPtr &msg1, const JointStateConstPtr &msg2)
 Checks for identical names and positions in joint state messages. More...
 
 TEST (BrakeTestUtilsTest, testExceptionDtor)
 Test increases function coverage by ensuring that all Dtor variants are called. More...
 
 TEST (BrakeTestUtilsTest, testCompareJointStatePositions)
 
 TEST (BrakeTestUtilsTest, testGetCurrentJointStates)
 
 TEST (BrakeTestUtilsTest, testDetectRobotMotion)
 

Function Documentation

::testing::AssertionResult brake_test_utils_test::compareJointStateMessages ( const JointStateConstPtr &  msg1,
const JointStateConstPtr &  msg2 
)
static

Checks for identical names and positions in joint state messages.

Definition at line 44 of file unittest_brake_test_utils.cpp.

brake_test_utils_test::TEST ( BrakeTestUtilsTest  ,
testExceptionDtor   
)

Test increases function coverage by ensuring that all Dtor variants are called.

Definition at line 71 of file unittest_brake_test_utils.cpp.

brake_test_utils_test::TEST ( BrakeTestUtilsTest  ,
testCompareJointStatePositions   
)

Test the compareJointStatePositions utility function

Test Sequence:

  1. Compare two equal joint states
  2. Compare two joint states with a difference in all joints slightly below the tolerance
  3. Compare two joint_states with a difference in one joint slightly above the tolerance, repeat the test for all joints.

Expected Results:

  1. Returns true
  2. Returns true
  3. Always returns false

Definition at line 96 of file unittest_brake_test_utils.cpp.

brake_test_utils_test::TEST ( BrakeTestUtilsTest  ,
testGetCurrentJointStates   
)

Test the getCurrentJointStates utility function

Test Sequence:

  1. Call getCurrentJointStates() without publishing to the joint_states topic
  2. Call getCurrentJointStates() and publish on the joint_states topic asynchronously

Expected Results:

  1. Exception is thrown
  2. Published message is obtained

Definition at line 148 of file unittest_brake_test_utils.cpp.

brake_test_utils_test::TEST ( BrakeTestUtilsTest  ,
testDetectRobotMotion   
)

Test the detectRobotMotion utility function

Test Sequence:

  1. Publish fixed joint states and call detectRobotMotion()
  2. Publish changing joint states and call detectRobotMotion()

Expected Results:

  1. Returns false.
  2. Returns true.

Definition at line 186 of file unittest_brake_test_utils.cpp.



prbt_hardware_support
Author(s):
autogenerated on Tue Feb 2 2021 03:50:18