10 #include <gtest/gtest.h> 18 #include <mrpt/config.h> 20 #include <json/json.h> 26 TEST(SchemaSerialization, JSON_archive)
33 auto pos = ss.str().find(
"\"datatype\" : \"CPose2D\"");
34 EXPECT_TRUE(pos != std::string::npos);
44 EXPECT_NEAR(pt1.x(), pt2.x(), 1e-6);
45 EXPECT_NEAR(pt1.y(), pt2.y(), 1e-6);
46 EXPECT_NEAR(pt1.phi(), pt2.phi(), 1e-6);
49 TEST(SchemaSerialization, JSON_raw)
58 auto pos = ss.str().find(
"\"datatype\" : \"CPose2D\"");
59 EXPECT_TRUE(pos != std::string::npos);
68 EXPECT_NEAR(pt1.x(), pt2.x(), 1e-6);
69 EXPECT_NEAR(pt1.y(), pt2.y(), 1e-6);
70 EXPECT_NEAR(pt1.phi(), pt2.phi(), 1e-6);
TEST(NodeletsTests, pub_sub_multithread_test)
Virtual base class for "schematic archives" (JSON, XML,...)
Base template class for schema-capable "archives", e.g.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
CSchemeArchiveBase archiveJSON()
Returns an archive for reading/writing in JSON format.