summaryrefslogtreecommitdiff
path: root/src/apps
diff options
context:
space:
mode:
authorBarnabás Pőcze <pobrn@protonmail.com>2025-01-13 11:35:54 +0100
committerBarnabás Pőcze <pobrn@protonmail.com>2025-02-27 17:31:04 +0100
commit995bb7e507a20b1294ea0434ad6a8b3671b12fd8 (patch)
tree4e364970f1abc04b43b75f534109e3dd68e1124a /src/apps
parent6fd3ac82b5e8c524d9fdbfff6c275f3069785e85 (diff)
apps: lc-compliance: Add message to `GTEST_SKIP()`
Just like other gtest macros, `GTEST_SKIP()` returns an object to which a formatted message can be added using the usual `<<` stream operator. So use it instead of printing to `std::cout`. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/apps')
-rw-r--r--src/apps/lc-compliance/helpers/capture.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/apps/lc-compliance/helpers/capture.cpp b/src/apps/lc-compliance/helpers/capture.cpp
index 91c4d440..43db15d2 100644
--- a/src/apps/lc-compliance/helpers/capture.cpp
+++ b/src/apps/lc-compliance/helpers/capture.cpp
@@ -26,10 +26,8 @@ void Capture::configure(StreamRole role)
{
config_ = camera_->generateConfiguration({ role });
- if (!config_) {
- std::cout << "Role not supported by camera" << std::endl;
- GTEST_SKIP();
- }
+ if (!config_)
+ GTEST_SKIP() << "Role not supported by camera";
if (config_->validate() != CameraConfiguration::Valid) {
config_.reset();
@@ -85,10 +83,8 @@ void CaptureBalanced::capture(unsigned int numRequests)
/* No point in testing less requests then the camera depth. */
if (buffers.size() > numRequests) {
- std::cout << "Camera needs " + std::to_string(buffers.size())
- + " requests, can't test only "
- + std::to_string(numRequests) << std::endl;
- GTEST_SKIP();
+ GTEST_SKIP() << "Camera needs " << buffers.size()
+ << " requests, can't test only " << numRequests;
}
queueCount_ = 0;