summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/camera/capture.cpp5
-rw-r--r--test/camera/configuration_default.cpp17
-rw-r--r--test/camera/configuration_set.cpp3
-rw-r--r--test/camera/statemachine.cpp4
4 files changed, 10 insertions, 19 deletions
diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp
index f6932b75..b8dbdb62 100644
--- a/test/camera/capture.cpp
+++ b/test/camera/capture.cpp
@@ -42,10 +42,9 @@ protected:
int run()
{
- Stream *stream = *camera_->streams().begin();
- std::set<Stream *> streams = { stream };
std::map<Stream *, StreamConfiguration> conf =
- camera_->streamConfiguration(streams);
+ camera_->streamConfiguration({ Stream::VideoRecording() });
+ Stream *stream = conf.begin()->first;
StreamConfiguration *sconf = &conf.begin()->second;
if (!configurationValid(conf)) {
diff --git a/test/camera/configuration_default.cpp b/test/camera/configuration_default.cpp
index 856cd415..09861716 100644
--- a/test/camera/configuration_default.cpp
+++ b/test/camera/configuration_default.cpp
@@ -20,14 +20,10 @@ protected:
{
std::map<Stream *, StreamConfiguration> conf;
- /*
- * Test that asking for default configuration for a valid
- * array of streams returns something valid.
- */
- std::set<Stream *> streams = { *camera_->streams().begin() };
- conf = camera_->streamConfiguration(streams);
+ /* Test asking for configuration for a video stream. */
+ conf = camera_->streamConfiguration({ Stream::VideoRecording() });
if (conf.empty()) {
- cout << "Failed to retrieve configuration for valid streams"
+ cout << "Failed to retrieve configuration for video streams"
<< endl;
return TestFail;
}
@@ -39,12 +35,11 @@ protected:
/*
* Test that asking for configuration for an empty array of
- * streams returns an empty list of configurations.
+ * stream usages returns an empty list of configurations.
*/
- std::set<Stream *> streams_empty = {};
- conf = camera_->streamConfiguration(streams_empty);
+ conf = camera_->streamConfiguration({});
if (!conf.empty()) {
- cout << "Failed to retrieve configuration for empty streams"
+ cout << "Failed to retrieve configuration for empty usage list"
<< endl;
return TestFail;
}
diff --git a/test/camera/configuration_set.cpp b/test/camera/configuration_set.cpp
index cac1da95..1bc01e66 100644
--- a/test/camera/configuration_set.cpp
+++ b/test/camera/configuration_set.cpp
@@ -18,9 +18,8 @@ class ConfigurationSet : public CameraTest
protected:
int run()
{
- std::set<Stream *> streams = { *camera_->streams().begin() };
std::map<Stream *, StreamConfiguration> conf =
- camera_->streamConfiguration(streams);
+ camera_->streamConfiguration({ Stream::VideoRecording() });
StreamConfiguration *sconf = &conf.begin()->second;
if (!configurationValid(conf)) {
diff --git a/test/camera/statemachine.cpp b/test/camera/statemachine.cpp
index f4395f2b..ab3c6fb5 100644
--- a/test/camera/statemachine.cpp
+++ b/test/camera/statemachine.cpp
@@ -235,9 +235,7 @@ protected:
int run()
{
- Stream *stream = *camera_->streams().begin();
- std::set<Stream *> streams = { stream };
- defconf_ = camera_->streamConfiguration(streams);
+ defconf_ = camera_->streamConfiguration({ Stream::VideoRecording() });
if (testAvailable() != TestPass) {
cout << "State machine in Available state failed" << endl;