test: signal: Exercise the signal delivery code paths for Object

Member slots for objects deriving from the Object class receive special
handling. Add one test to make sure we exercise the related code paths.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2019-03-24 15:55:09 +02:00
parent df587aa100
commit 11fd9f171e

View file

@ -176,6 +176,18 @@ protected:
delete signal;
delete slotObject;
/* Exercise the Object slot code paths. */
slotObject = new SlotObject();
signalVoid_.connect(slotObject, &SlotObject::slot);
valueStatic_ = 0;
signalVoid_.emit();
if (valueStatic_ == 0) {
cout << "Signal delivery for Object test failed" << endl;
return TestFail;
}
delete slotObject;
return TestPass;
}