From patchwork Thu Jan 2 23:53:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2483 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 51AEF60467 for ; Fri, 3 Jan 2020 00:53:25 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C1B3B516 for ; Fri, 3 Jan 2020 00:53:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1578009204; bh=uNqQmLSHAXsMLPj8HA5Fa4lkEHdR6JU16IO6QksnNaM=; h=From:To:Subject:Date:From; b=lANtWYa+HgJ3q/38gbRU2ffk8wyb3D6LWoiYy6e9j58oEh21KXFsIB6Y8oRKgmOub EQKOwd/ZD7xM5bYKKCd1/292evT+jefU4lWo++0O2LMnys3WYUzzpjXvFeYEznkW1e OO+0nTHbwBSErukDvWC42gxqQnfFMgto1BOF4iDo= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 3 Jan 2020 01:53:10 +0200 Message-Id: <20200102235311.12009-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] test: object-invoke: Test invocation of method taking a reference argument X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jan 2020 23:53:25 -0000 Object::invokeMethod() fails with a compilation error when the invoked method takes a reference argument. Add a test case for this issue. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder --- test/object-invoke.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp index 560adee14e3a..f9a8bea9dce2 100644 --- a/test/object-invoke.cpp +++ b/test/object-invoke.cpp @@ -49,6 +49,10 @@ public: value_ = value; } + void methodWithReference(const int &value) + { + } + private: Status status_; int value_; @@ -119,6 +123,14 @@ protected: return TestFail; } + /* + * Test invoking a method that takes reference arguments. This + * targets compilation, there's no need to check runtime + * results. + */ + object_.invokeMethod(&InvokedObject::methodWithReference, + ConnectionTypeBlocking, 42); + return TestPass; }