AWViz-ROS
Loading...
Searching...
No Matches
test_tf_tree.cpp File Reference
#include <awviz_common/transformation/tf_tree.hpp>
#include <gtest/gtest.h>
#include <optional>

Functions

 TEST (TfTreeTest, Construct)
 
 TEST (TfTreeTest, Emplace)
 
 TEST (TfTreeTest, GetFrames)
 
 TEST (TfTreeTest, GetFrame)
 
 TEST (TfTreeTest, GetParent)
 
 TEST (TfTreeTest, ContainsFrame)
 
 TEST (TfTreeTest, EntityPath)
 
 TEST (TfTreeTest, CanLinkedTo)
 
int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ TEST() [1/8]

TEST ( TfTreeTest  ,
CanLinkedTo   
)

Test suite for TfTree class.

This test case includes checking if the input frame can link to the specified frame ID.

◆ TEST() [2/8]

TEST ( TfTreeTest  ,
Construct   
)

Test suite for the TfTree class.

This test case includes constructing a new TfTree object.

◆ TEST() [3/8]

TEST ( TfTreeTest  ,
ContainsFrame   
)

Test suite for TfTree class.

This test case includes checking if the specified frame or ID is contained in the tree.

Note
When checking the frame, returns true if an item whose key and value both are the same as the input frame is contained in the tree.
When checking the ID, returns true if an item whose key is the same as the ID of the input frame is contained in the tree.

◆ TEST() [4/8]

TEST ( TfTreeTest  ,
Emplace   
)

Test suite for the TfTree class.

This test case includes emplacing a another TfFrame object.

◆ TEST() [5/8]

TEST ( TfTreeTest  ,
EntityPath   
)

Test suite for TfTree class.

This test case includes retrieving a entity path of the specified frame.

Note
The entity path will be in the format "/<Parent0>/<Parent1>/.../<FrameID>", where "<Parent0>" represents the deepest parent frame.

◆ TEST() [6/8]

TEST ( TfTreeTest  ,
GetFrame   
)

Test suite for the TfTree class.

This test case includes retrieving the specified frame from the tree. If the corresponding frame doesn't exist returns std::nullopt.

◆ TEST() [7/8]

TEST ( TfTreeTest  ,
GetFrames   
)

Test suite for the TfTree class.

This test case includes retrieving all frames in the tree.

◆ TEST() [8/8]

TEST ( TfTreeTest  ,
GetParent   
)

Test suite for the TfTree class.

This test case includes retrieving the parent of the specified frame from the tree. If the corresponding parent frame doesn't exist returns std::nullopt.