|
gtsam 4.2
gtsam
|
Concept check for values that can be used in unit tests. More...
Go to the source code of this file.
Classes | |
| class | gtsam::IsTestable< T > |
| A testable concept check that should be placed in applicable unit tests and in generic algorithms. More... | |
| struct | gtsam::equals< V > |
| Template to create a binary predicate. More... | |
| struct | gtsam::equals_star< V > |
| Binary predicate on shared pointers. More... | |
| struct | gtsam::HasTestablePrereqs< T > |
| Requirements on type to pass it to Testable template below. More... | |
| struct | gtsam::Testable< T > |
| A helper that implements the traits interface for GTSAM types. More... | |
Namespaces | |
| namespace | gtsam |
| Global functions in a separate testing namespace. | |
Macros | |
| #define | GTSAM_PRINT(x) |
| #define | GTSAM_CONCEPT_TESTABLE_INST(T) |
| Macros for using the TestableConcept. | |
| #define | GTSAM_CONCEPT_TESTABLE_TYPE(T) |
Concept check for values that can be used in unit tests.
The necessary functions to implement for Testable are defined below with additional details as to the interface. The concept checking function will check whether or not the function exists in derived class and throw compile-time errors.
print with optional string naming the object void print(const std::string& name) const = 0;
equality up to tolerance tricky to implement, see PriorFactor for an example equals is not supposed to print out anything, just return true|false bool equals(const Derived& expected, double tol) const = 0;
| #define GTSAM_CONCEPT_TESTABLE_INST | ( | T | ) |
Macros for using the TestableConcept.
NOTE: intentionally not in the gtsam namespace to allow for classes not in the gtsam namespace to be more easily enforced as testable
| #define GTSAM_CONCEPT_TESTABLE_TYPE | ( | T | ) |
| #define GTSAM_PRINT | ( | x | ) |