test: camera_sensor: Test the model() function
Verify that the sensor model matches the expected value. The whole model extraction heuristic isn't fully tested as that would require being able to inject different entity names. It is still useful as an initial step. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
6886365753
commit
5c8570cf37
1 changed files with 6 additions and 0 deletions
|
@ -61,6 +61,12 @@ protected:
|
|||
|
||||
int run()
|
||||
{
|
||||
if (sensor_->model() != "Sensor A") {
|
||||
cerr << "Incorrect sensor model '" << sensor_->model()
|
||||
<< "'" << endl;
|
||||
return TestFail;
|
||||
}
|
||||
|
||||
const std::vector<unsigned int> &codes = sensor_->mbusCodes();
|
||||
auto iter = std::find(codes.begin(), codes.end(),
|
||||
MEDIA_BUS_FMT_ARGB8888_1X32);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue