Skip to content

Commit 6b84408

Browse files
authored
Clear scene before exiting wide_angle_camera_test (#266)
Signed-off-by: Ian Chen <[email protected]>
1 parent 86b42a2 commit 6b84408

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/gz/sensors/WideAngleCameraSensor.hh

-6
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,6 @@ namespace gz
138138
/// \return True on success.
139139
private: bool CreateCamera();
140140

141-
/// \brief Callback that is triggered when the scene changes on
142-
/// the Manager.
143-
/// \param[in] _scene Pointer to the new scene.
144-
private: void OnSceneChange(gz::rendering::ScenePtr /*_scene*/)
145-
{ }
146-
147141
GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
148142
/// \brief Data pointer for private data
149143
/// \internal

test/integration/wide_angle_camera.cc

+6
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,13 @@ void WideAngleCameraSensorTest::ImagesWithBuiltinSDF(
217217
EXPECT_GT(b, g);
218218
EXPECT_GT(b, r);
219219

220+
auto sensorId = sensor->Id();
221+
EXPECT_TRUE(mgr.Remove(sensorId));
222+
EXPECT_EQ(nullptr, mgr.Sensor(sensorId));
223+
220224
// Clean up
225+
box.reset();
226+
blue.reset();
221227
engine->DestroyScene(scene);
222228
gz::rendering::unloadEngine(engine->Name());
223229
}

0 commit comments

Comments
 (0)