Merge pull request #264 from ProfFan/fix/define_point3_vector

Fix Unit Test when GTSAM_DEFINE_POINTS_AS_VECTORS is defined
release/4.3a0
Fan Jiang 2020-04-01 13:55:23 -04:00 committed by GitHub
commit e2ed25328b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);