diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/camera/configuration_set.cpp | 7 | ||||
-rw-r--r-- | test/v4l2_device/formats.cpp | 6 | ||||
-rw-r--r-- | test/v4l2_subdevice/test_formats.cpp | 11 |
3 files changed, 11 insertions, 13 deletions
diff --git a/test/camera/configuration_set.cpp b/test/camera/configuration_set.cpp index 5ac2a7a9..0c932bc1 100644 --- a/test/camera/configuration_set.cpp +++ b/test/camera/configuration_set.cpp @@ -64,8 +64,8 @@ protected: * the default configuration of the VIMC camera is known to * work. */ - sconf->width *= 2; - sconf->height *= 2; + sconf->size.width *= 2; + sconf->size.height *= 2; if (camera_->configureStreams(conf)) { cout << "Failed to set modified configuration" << endl; return TestFail; @@ -74,8 +74,7 @@ protected: /* * Test that setting an invalid configuration fails. */ - sconf->width = 0; - sconf->height = 0; + sconf->size = { 0, 0 }; if (!camera_->configureStreams(conf)) { cout << "Invalid configuration incorrectly accepted" << endl; return TestFail; diff --git a/test/v4l2_device/formats.cpp b/test/v4l2_device/formats.cpp index 30b8b5c3..007e7e94 100644 --- a/test/v4l2_device/formats.cpp +++ b/test/v4l2_device/formats.cpp @@ -31,8 +31,7 @@ int Format::run() return TestFail; } - format.width = UINT_MAX; - format.height = UINT_MAX; + format.size = { UINT_MAX, UINT_MAX }; ret = capture_->setFormat(&format); if (ret) { cerr << "Failed to set format: image resolution is invalid: " @@ -41,7 +40,8 @@ int Format::run() return TestFail; } - if (format.width == UINT_MAX || format.height == UINT_MAX) { + if (format.size.width == UINT_MAX || + format.size.height == UINT_MAX) { cerr << "Failed to update image format = (UINT_MAX x UINT_MAX)" << endl; return TestFail; diff --git a/test/v4l2_subdevice/test_formats.cpp b/test/v4l2_subdevice/test_formats.cpp index af954459..e90c2c24 100644 --- a/test/v4l2_subdevice/test_formats.cpp +++ b/test/v4l2_subdevice/test_formats.cpp @@ -44,8 +44,7 @@ int FormatHandlingTest::run() /* * Set unrealistic image resolutions and make sure it gets updated. */ - format.width = UINT_MAX; - format.height = UINT_MAX; + format.size = { UINT_MAX, UINT_MAX }; ret = scaler_->setFormat(0, &format); if (ret) { cerr << "Failed to set format: image resolution is wrong, but " @@ -53,13 +52,13 @@ int FormatHandlingTest::run() return TestFail; } - if (format.width == UINT_MAX || format.height == UINT_MAX) { + if (format.size.width == UINT_MAX || + format.size.height == UINT_MAX) { cerr << "Failed to update image format" << endl; return TestFail; } - format.width = 0; - format.height = 0; + format.size = { 0, 0 }; ret = scaler_->setFormat(0, &format); if (ret) { cerr << "Failed to set format: image resolution is wrong, but " @@ -67,7 +66,7 @@ int FormatHandlingTest::run() return TestFail; } - if (format.width == 0 || format.height == 0) { + if (format.size.width == 0 || format.size.height == 0) { cerr << "Failed to update image format" << endl; return TestFail; } |