Fix unittest when GTSAM_DEFINE_POINTS_AS_VECTORS is defined

release/4.3a0
Fan Jiang 2020-03-31 22:22:12 -04:00
parent e7632608e5
commit 7fcacf90c6
1 changed files with 7 additions and 0 deletions

View File

@ -1008,7 +1008,14 @@ TEST(Pose3, print) {
// Generate the expected output // Generate the expected output
std::stringstream expected; std::stringstream expected;
Point3 translation(1, 2, 3); Point3 translation(1, 2, 3);
#ifdef GTSAM_TYPEDEF_POINTS_TO_VECTORS
expected << "1\n"
"2\n"
"3;\n";
#else
expected << '[' << translation.x() << ", " << translation.y() << ", " << translation.z() << "]\';"; expected << '[' << translation.x() << ", " << translation.y() << ", " << translation.z() << "]\';";
#endif
// reset cout to the original stream // reset cout to the original stream
std::cout.rdbuf(oldbuf); std::cout.rdbuf(oldbuf);