diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-03-24 15:55:09 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-04-27 17:50:25 +0300 |
commit | 11fd9f171e88464ad1e9121a2f1271906bf31518 (patch) | |
tree | db9cd26b9290ea2f52149275676506f9c196f1b7 | |
parent | df587aa10005475a1a9300001e7045b1ba357b9e (diff) |
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>
-rw-r--r-- | test/signal.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/signal.cpp b/test/signal.cpp index 19a52c60..79668b42 100644 --- a/test/signal.cpp +++ b/test/signal.cpp @@ -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; } |