summaryrefslogtreecommitdiff
path: root/test/bayer-format.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-29 03:59:45 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-04 14:11:33 +0300
commit8a845ab078c3fe12ac4edd16c8cbac5b7ec03b98 (patch)
tree945c6a147ed76a1f09b36ddc06fbdb44b221f970 /test/bayer-format.cpp
parentd5d6dbe85cf270aee7c956429a5a692feca3900f (diff)
libcamera: Replace toString with operator<<() for format classes
Now that format classes implement the stream formatting operator<<(), use it instead of the toString() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/bayer-format.cpp')
-rw-r--r--test/bayer-format.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/bayer-format.cpp b/test/bayer-format.cpp
index 135bcb52..54f03487 100644
--- a/test/bayer-format.cpp
+++ b/test/bayer-format.cpp
@@ -72,8 +72,8 @@ protected:
bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2FmtExpect);
V4L2PixelFormat v4l2Fmt = bayerFmt.toV4L2PixelFormat();
if (v4l2Fmt != v4l2FmtExpect) {
- cerr << "Expected: '" << v4l2FmtExpect.toString()
- << "' got: '" << v4l2Fmt.toString() << "'" << endl;
+ cerr << "Expected: '" << v4l2FmtExpect
+ << "' got: '" << v4l2Fmt << "'" << endl;
return TestFail;
}
@@ -86,7 +86,7 @@ protected:
v4l2Fmt = bayerFmt.toV4L2PixelFormat();
if (v4l2Fmt != v4l2FmtExpect) {
cerr << "Expected: empty V4L2PixelFormat got: '"
- << v4l2Fmt.toString() << "'" << endl;
+ << v4l2Fmt << "'" << endl;
return TestFail;
}
@@ -101,8 +101,8 @@ protected:
bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2Fmt);
if (bayerFmt != bayerFmtExpect) {
cerr << "Expected BayerFormat '"
- << bayerFmtExpect.toString() << "', got: '"
- << bayerFmt.toString() << "'" << endl;
+ << bayerFmtExpect << "', got: '"
+ << bayerFmt << "'" << endl;
return TestFail;
}
@@ -115,7 +115,7 @@ protected:
bayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2FmtUnknown);
if (bayerFmt.isValid()) {
cerr << "Expected empty BayerFormat got: '"
- << bayerFmt.toString() << "'" << endl;
+ << bayerFmt << "'" << endl;
return TestFail;
}
@@ -151,8 +151,8 @@ protected:
BayerFormat hFlipFmt = bayerFmt.transform(Transform::HFlip);
if (hFlipFmt != bayerFmtExpect) {
cerr << "Horizontal flip of 'BGGR-8' should result in '"
- << bayerFmtExpect.toString() << "', got: '"
- << hFlipFmt.toString() << "'" << endl;
+ << bayerFmtExpect << "', got: '"
+ << hFlipFmt << "'" << endl;
return TestFail;
}
@@ -166,8 +166,8 @@ protected:
BayerFormat vFlipFmt = bayerFmt.transform(Transform::VFlip);
if (vFlipFmt != bayerFmtExpect) {
cerr << "Vertical flip of 'BGGR-8' should result in '"
- << bayerFmtExpect.toString() << "', got: '"
- << vFlipFmt.toString() << "'" << endl;
+ << bayerFmtExpect << "', got: '"
+ << vFlipFmt << "'" << endl;
return TestFail;
}
@@ -182,7 +182,7 @@ protected:
if (transposeFmt != bayerFmt) {
cerr << "Transpose with both green pixels on the "
<< "antidiagonal should not change the order "
- << "(got '" << transposeFmt.toString() << "')"
+ << "(got '" << transposeFmt << "')"
<< endl;
return TestFail;
}
@@ -199,7 +199,7 @@ protected:
if (transposeFmt != bayerFmtExpect) {
cerr << "Transpose with the red & blue pixels on the "
<< "antidiagonal should switch their position "
- << "(got '" << transposeFmt.toString() << "')"
+ << "(got '" << transposeFmt << "')"
<< endl;
return TestFail;
}