24 using namespace gtsam;
44 if(
sizeof(
Key) == 8) {
46 Key key = 0x7841000000000005;
55 }
else if(
sizeof(
Key) == 4) {
72 EXPECT(LabeledSymbol::TypeTest(
'c')(key));
73 EXPECT(!LabeledSymbol::TypeTest(
'd')(key));
74 EXPECT(LabeledSymbol::LabelTest(
'A')(key));
75 EXPECT(!LabeledSymbol::LabelTest(
'D')(key));
76 EXPECT(LabeledSymbol::TypeLabelTest(
'c',
'A')(key));
77 EXPECT(!LabeledSymbol::TypeLabelTest(
'c',
'D')(key));
92 EXPECT(
"special" == ss2.str());
97 EXPECT(
"cA3" == ss3.str());
const gtsam::Symbol key('X', 0)
Provides additional testing facilities for common data structures.
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
TEST(LabeledSymbol, KeyLabeledSymbolConversion)
#define EXPECT(condition)
string labeledSymbolMyFormatter(Key key)
Key symbol(unsigned char c, std::uint64_t j)
#define EXPECT_LONGS_EQUAL(expected, actual)
static const gtsam::KeyFormatter MultiRobotKeyFormatter
std::uint64_t Key
Integer nonlinear key type.