test: control serialization: Test lookup by ControlId
Test that lookup by ControlId reference works in the control serialization test making sure that the control limits are not changed by de-serialization. The test currently fails and demonstates that lookup by ControlId is currently not supported until the introduction of the next patch. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
b48db3c489
commit
0d7db1b511
1 changed files with 9 additions and 0 deletions
|
@ -140,6 +140,15 @@ protected:
|
|||
return TestFail;
|
||||
}
|
||||
|
||||
/* Make sure control limits looked up by id are not changed. */
|
||||
const ControlInfo &newLimits = newInfoMap.at(&controls::Brightness);
|
||||
const ControlInfo &initialLimits = infoMap.at(&controls::Brightness);
|
||||
if (newLimits.min() != initialLimits.min() ||
|
||||
newLimits.max() != initialLimits.max()) {
|
||||
cerr << "The brightness control limits have changed" << endl;
|
||||
return TestFail;
|
||||
}
|
||||
|
||||
/* Deserialize the control list and verify the contents. */
|
||||
buffer = ByteStreamBuffer(const_cast<const uint8_t *>(listData.data()),
|
||||
listData.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue