summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice/v4l2_videodevice_test.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-23 16:10:26 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-23 17:12:34 +0300
commitbb5f8cf4951fc5813d60ab806c57c5b5d713f38c (patch)
tree6aec757b18fd5d15b8e060564c338bfc73772a37 /test/v4l2_videodevice/v4l2_videodevice_test.cpp
parent73a11cbf78342ecc875709e92abacee165530823 (diff)
utils: checkstyle.py: Add include checker
Add an include checker to verify usage of the C compatibility headers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'test/v4l2_videodevice/v4l2_videodevice_test.cpp')
0 files changed, 0 insertions, 0 deletions
uot;test.h" using namespace std; using namespace libcamera; class GeometryTest : public Test { protected: bool compare(const Size &lhs, const Size &rhs, bool (*op)(const Size &lhs, const Size &rhs), const char *opName, bool expect) { bool result = op(lhs, rhs); if (result != expect) { cout << "Size(" << lhs.width << ", " << lhs.height << ") " << opName << " " << "Size(" << rhs.width << ", " << rhs.height << ") " << "test failed" << std::endl; return false; } return true; } int run() { /* Test Size equality and inequality. */ if (!compare(Size(100, 100), Size(100, 100), &operator==, "==", true)) return TestFail; if (!compare(Size(100, 100), Size(100, 100), &operator!=, "!=", false)) return TestFail; if (!compare(Size(100, 100), Size(200, 100), &operator==, "==", false)) return TestFail; if (!compare(Size(100, 100), Size(200, 100), &operator!=, "!=", true)) return TestFail; if (!compare(Size(100, 100), Size(100, 200), &operator==, "==", false))