summaryrefslogtreecommitdiff
path: root/test/camera/configuration_set.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-29 20:41:46 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-30 22:19:07 +0300
commit21e501f81005f0ea21bdd8d3d4c8771f1352fc19 (patch)
treeca6ff2a5ce75265028e96100ed54bcada9dc15e7 /test/camera/configuration_set.cpp
parent3fc0189e209738f3119fbce62221aa2cc6afc8f2 (diff)
test: Unify naming of configurations in tests
Name all instances of CameraConfiguration "config", and all instances of StreamConfiguration "cfg" accross all tests. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'test/camera/configuration_set.cpp')
-rw-r--r--test/camera/configuration_set.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/camera/configuration_set.cpp b/test/camera/configuration_set.cpp
index 0c932bc1..ca41ed68 100644
--- a/test/camera/configuration_set.cpp
+++ b/test/camera/configuration_set.cpp
@@ -18,11 +18,11 @@ class ConfigurationSet : public CameraTest
protected:
int run()
{
- CameraConfiguration conf =
+ CameraConfiguration config =
camera_->streamConfiguration({ Stream::VideoRecording() });
- StreamConfiguration *sconf = &conf[conf.front()];
+ StreamConfiguration *cfg = &config[config.front()];
- if (!conf.isValid()) {
+ if (!config.isValid()) {
cout << "Failed to read default configuration" << endl;
return TestFail;
}
@@ -33,7 +33,7 @@ protected:
}
/* Test that setting the default configuration works. */
- if (camera_->configureStreams(conf)) {
+ if (camera_->configureStreams(config)) {
cout << "Failed to set default configuration" << endl;
return TestFail;
}
@@ -48,7 +48,7 @@ protected:
return TestFail;
}
- if (!camera_->configureStreams(conf)) {
+ if (!camera_->configureStreams(config)) {
cout << "Setting configuration on a camera not acquired succeeded when it should have failed"
<< endl;
return TestFail;
@@ -64,9 +64,9 @@ protected:
* the default configuration of the VIMC camera is known to
* work.
*/
- sconf->size.width *= 2;
- sconf->size.height *= 2;
- if (camera_->configureStreams(conf)) {
+ cfg->size.width *= 2;
+ cfg->size.height *= 2;
+ if (camera_->configureStreams(config)) {
cout << "Failed to set modified configuration" << endl;
return TestFail;
}
@@ -74,8 +74,8 @@ protected:
/*
* Test that setting an invalid configuration fails.
*/
- sconf->size = { 0, 0 };
- if (!camera_->configureStreams(conf)) {
+ cfg->size = { 0, 0 };
+ if (!camera_->configureStreams(config)) {
cout << "Invalid configuration incorrectly accepted" << endl;
return TestFail;
}