diff options
Diffstat (limited to 'src/apps/lc-compliance/tests')
-rw-r--r-- | src/apps/lc-compliance/tests/capture_test.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/apps/lc-compliance/tests/capture_test.cpp b/src/apps/lc-compliance/tests/capture_test.cpp index 284d3630..3d3cc977 100644 --- a/src/apps/lc-compliance/tests/capture_test.cpp +++ b/src/apps/lc-compliance/tests/capture_test.cpp @@ -17,14 +17,14 @@ using namespace libcamera; const std::vector<int> NUMREQUESTS = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; -const std::vector<StreamRole> ROLES = { - StreamRole::Raw, - StreamRole::StillCapture, - StreamRole::VideoRecording, - StreamRole::Viewfinder +const std::vector<std::vector<StreamRole>> ROLES = { + { StreamRole::Raw }, + { StreamRole::StillCapture }, + { StreamRole::VideoRecording }, + { StreamRole::Viewfinder }, }; -class SingleStream : public testing::TestWithParam<std::tuple<StreamRole, int>> +class SingleStream : public testing::TestWithParam<std::tuple<std::vector<StreamRole>, int>> { public: static std::string nameParameters(const testing::TestParamInfo<SingleStream::ParamType> &info); @@ -67,7 +67,7 @@ std::string SingleStream::nameParameters(const testing::TestParamInfo<SingleStre { StreamRole::Viewfinder, "Viewfinder" } }; - std::string roleName = rolesMap[std::get<0>(info.param)]; + std::string roleName = rolesMap[std::get<0>(info.param)[0]]; std::string numRequestsName = std::to_string(std::get<1>(info.param)); return roleName + "_" + numRequestsName; @@ -82,11 +82,11 @@ std::string SingleStream::nameParameters(const testing::TestParamInfo<SingleStre */ TEST_P(SingleStream, Capture) { - auto [role, numRequests] = GetParam(); + const auto [role, numRequests] = GetParam(); CaptureBalanced capture(camera_); - capture.configure(role); + capture.configure(Span<const StreamRole>{ role }); capture.capture(numRequests); } @@ -100,12 +100,12 @@ TEST_P(SingleStream, Capture) */ TEST_P(SingleStream, CaptureStartStop) { - auto [role, numRequests] = GetParam(); + const auto [role, numRequests] = GetParam(); unsigned int numRepeats = 3; CaptureBalanced capture(camera_); - capture.configure(role); + capture.configure(Span<const StreamRole>{ role }); for (unsigned int starts = 0; starts < numRepeats; starts++) capture.capture(numRequests); @@ -120,11 +120,11 @@ TEST_P(SingleStream, CaptureStartStop) */ TEST_P(SingleStream, UnbalancedStop) { - auto [role, numRequests] = GetParam(); + const auto [role, numRequests] = GetParam(); CaptureUnbalanced capture(camera_); - capture.configure(role); + capture.configure(Span<const StreamRole>{ role }); capture.capture(numRequests); } |