gtsam  4.0.0
gtsam
TestableAssertions.h File Reference

Provides additional testing facilities for common data structures. More...

Go to the source code of this file.

Namespaces

 gtsam
 Global functions in a separate testing namespace.
 

Functions

bool gtsam::assert_equal (const Key &expected, const Key &actual, double tol=0.0)
 Equals testing for basic types.
 
template<class V >
bool gtsam::assert_equal (const boost::optional< V > &expected, const boost::optional< V > &actual, double tol=1e-9)
 Comparisons for boost.optional objects that checks whether objects exist before comparing their values. More...
 
template<class V >
bool gtsam::assert_equal (const V &expected, const boost::optional< V > &actual, double tol=1e-9)
 
template<class V >
bool gtsam::assert_equal (const V &expected, const boost::optional< const V & > &actual, double tol=1e-9)
 
template<class V >
bool gtsam::assert_equal (const std::vector< V > &expected, const std::vector< V > &actual, double tol=1e-9)
 Version of assert_equals to work with vectors. More...
 
template<class V1 , class V2 >
bool gtsam::assert_container_equal (const std::map< V1, V2 > &expected, const std::map< V1, V2 > &actual, double tol=1e-9)
 Function for comparing maps of testable->testable TODO: replace with more generalized version.
 
template<class V2 >
bool gtsam::assert_container_equal (const std::map< size_t, V2 > &expected, const std::map< size_t, V2 > &actual, double tol=1e-9)
 Function for comparing maps of size_t->testable.
 
template<class V1 , class V2 >
bool gtsam::assert_container_equal (const std::vector< std::pair< V1, V2 > > &expected, const std::vector< std::pair< V1, V2 > > &actual, double tol=1e-9)
 Function for comparing vector of pairs (testable, testable)
 
template<class V >
bool gtsam::assert_container_equal (const V &expected, const V &actual, double tol=1e-9)
 General function for comparing containers of testable objects.
 
template<class V2 >
bool gtsam::assert_container_equality (const std::map< size_t, V2 > &expected, const std::map< size_t, V2 > &actual)
 Function for comparing maps of size_t->testable Types are assumed to have operator ==.
 
template<class V >
bool gtsam::assert_container_equality (const V &expected, const V &actual)
 General function for comparing containers of objects with operator==.
 
bool gtsam::assert_equal (const std::string &expected, const std::string &actual)
 Compare strings for unit tests.
 
template<class V >
bool gtsam::assert_inequal (const V &expected, const V &actual, double tol=1e-9)
 Allow for testing inequality.
 

Detailed Description

Provides additional testing facilities for common data structures.

Author
Alex Cunningham