From patchwork Sat Apr 27 12:16:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1120 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3CBC060004 for ; Sat, 27 Apr 2019 14:16:28 +0200 (CEST) Received: from pendragon.station (net-37-182-44-227.cust.vodafonedsl.it [37.182.44.227]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A120C5F for ; Sat, 27 Apr 2019 14:16:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1556367387; bh=qMFALYn831tpfIGcnWFMrAg4wxfyvikkAOTC56H9eTI=; h=From:To:Subject:Date:From; b=g6GOI8NWIBUGsL2Aunr+54MZ5y/xbJnzCpif/66FG2m1WqJWq2s2H3dHCae8OdBI+ TuhDsjN0WzhgpmxDaqSDMqHtNuzSHcJSuSBLeLsOzIv7svstGs4xs6b5fV7O+If/iN jzq8yNZWpKxOtD1rJhwDltEcuM01WNgI/jmgOpX8= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 27 Apr 2019 15:16:08 +0300 Message-Id: <20190427121608.13331-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] test: signal: Exercise the signal delivery code paths for Object X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Apr 2019 12:16:28 -0000 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 Reviewed-by: Kieran Bingham --- test/signal.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/signal.cpp b/test/signal.cpp index 19a52c603a4a..bc579cca37e4 100644 --- a/test/signal.cpp +++ b/test/signal.cpp @@ -176,6 +176,18 @@ protected: delete signal; delete slotObject; + /* Exercise the 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; }