Skip to content

Commit

Permalink
perception: Update to new Value APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri committed Mar 7, 2019
1 parent eb8a13f commit 62b82f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions perception/test/depth_image_to_point_cloud_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ class DepthImageToPointCloudTest : public ::testing::Test {
if (kFields & pc_flags::kRGBs) {
DepthImageToPointCloud::Convert(
camera_info, camera_pose, depth_image, color_image, scale,
&(cloud->GetMutableValueOrThrow<PointCloud>()));
&(cloud->get_mutable_value<PointCloud>()));
} else {
DepthImageToPointCloud::Convert(
camera_info, camera_pose, depth_image, nullopt, scale,
&(cloud->GetMutableValueOrThrow<PointCloud>()));
&(cloud->get_mutable_value<PointCloud>()));
}
}
}
Expand Down Expand Up @@ -437,15 +437,15 @@ TYPED_TEST(DepthImageToPointCloudTest, ResetStorage) {
abstract_value = std::make_unique<Value<PointCloud>>(0, fields);
this->DoConvert(camera, nullopt, depth_image, color_image, nullopt,
abstract_value.get());
cloud = &(abstract_value->GetValueOrThrow<PointCloud>());
cloud = &(abstract_value->get_value<PointCloud>());
EXPECT_EQ(cloud->fields(), fields);
EXPECT_TRUE(TestFixture::CompareClouds(*cloud, expected_cloud));

// If the storage was the wrong size, then Calc should be able to resize it.
abstract_value = std::make_unique<Value<PointCloud>>(22, fields);
this->DoConvert(camera, nullopt, depth_image, color_image, nullopt,
abstract_value.get());
cloud = &(abstract_value->GetValueOrThrow<PointCloud>());
cloud = &(abstract_value->get_value<PointCloud>());
EXPECT_EQ(cloud->fields(), fields);
EXPECT_TRUE(TestFixture::CompareClouds(*cloud, expected_cloud));

Expand All @@ -464,7 +464,7 @@ TYPED_TEST(DepthImageToPointCloudTest, ResetStorage) {
abstract_value = std::make_unique<Value<PointCloud>>(1, fields);
this->DoConvert(camera, nullopt, depth_image, color_image, nullopt,
abstract_value.get());
cloud = &(abstract_value->GetValueOrThrow<PointCloud>());
cloud = &(abstract_value->get_value<PointCloud>());
EXPECT_EQ(cloud->fields(), fields);
EXPECT_TRUE(TestFixture::CompareClouds(*cloud, expected_cloud));
}
Expand Down

0 comments on commit 62b82f9

Please sign in to comment.