summaryrefslogtreecommitdiff
path: root/test/list-cameras.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/list-cameras.cpp')
-rw-r--r--test/list-cameras.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/list-cameras.cpp b/test/list-cameras.cpp
index 070cbf2b..55551d7e 100644
--- a/test/list-cameras.cpp
+++ b/test/list-cameras.cpp
@@ -20,8 +20,8 @@ class ListTest : public Test
protected:
int init()
{
- cm = CameraManager::instance();
- cm->start();
+ cm_ = new CameraManager();
+ cm_->start();
return 0;
}
@@ -30,7 +30,7 @@ protected:
{
unsigned int count = 0;
- for (const std::shared_ptr<Camera> &camera : cm->cameras()) {
+ for (const std::shared_ptr<Camera> &camera : cm_->cameras()) {
cout << "- " << camera->name() << endl;
count++;
}
@@ -40,11 +40,12 @@ protected:
void cleanup()
{
- cm->stop();
+ cm_->stop();
+ delete cm_;
}
private:
- CameraManager *cm;
+ CameraManager *cm_;
};
TEST_REGISTER(ListTest)