[{"id":3302,"web_url":"https://patchwork.libcamera.org/comment/3302/","msgid":"<20200103051820.GB3820@localhost.localdomain>","date":"2020-01-03T05:18:20","subject":"Re: [libcamera-devel] [PATCH 1/2] test: object-invoke: Test\n\tinvocation of method taking a reference argument","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn Fri, Jan 03, 2020 at 01:53:10AM +0200, Laurent Pinchart wrote:\n> Object::invokeMethod() fails with a compilation error when the invoked\n> method takes a reference argument. Add a test case for this issue.\n\nI'm still not sure I agree with adding a test that introduces a compile\nerror... but it only fails compiling tests so maybe it's fine?\n\nIn any case the goal is achieved.\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  test/object-invoke.cpp | 12 ++++++++++++\n>  1 file changed, 12 insertions(+)\n> \n> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> index 560adee14e3a..f9a8bea9dce2 100644\n> --- a/test/object-invoke.cpp\n> +++ b/test/object-invoke.cpp\n> @@ -49,6 +49,10 @@ public:\n>  \t\tvalue_ = value;\n>  \t}\n>  \n> +\tvoid methodWithReference(const int &value)\n> +\t{\n> +\t}\n> +\n>  private:\n>  \tStatus status_;\n>  \tint value_;\n> @@ -119,6 +123,14 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> +\t\t/*\n> +\t\t * Test invoking a method that takes reference arguments. This\n> +\t\t * targets compilation, there's no need to check runtime\n> +\t\t * results.\n> +\t\t */\n> +\t\tobject_.invokeMethod(&InvokedObject::methodWithReference,\n> +\t\t\t\t     ConnectionTypeBlocking, 42);\n> +\n>  \t\treturn TestPass;\n>  \t}\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<paul.elder@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BA6A960462\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 Jan 2020 06:18:25 +0100 (CET)","from localhost.localdomain (unknown [96.44.9.94])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DC70D30F;\n\tFri,  3 Jan 2020 06:18:24 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578028705;\n\tbh=QPrwo7OXvcEtXKiHdTAyiThCUwDxjYsZ88Llbqkx0ME=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=bkfybSJVTHUElFLF7Qco+hvdnClkXxJlSGW62Cmj0VEF1vgCmMRzUijnfoejEUPgl\n\tN+UHrq3G5JFFYn11OUz94LZjZmdtRX4r/dMnbxqPsoUXQOIIv6V99KjrWyPYzwN+xd\n\tstez+SDKONQ2R8UqfdTziqH4UXp/brL+A1WAfniM=","Date":"Fri, 3 Jan 2020 00:18:20 -0500","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200103051820.GB3820@localhost.localdomain>","References":"<20200102235311.12009-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20200102235311.12009-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] test: object-invoke: Test\n\tinvocation of method taking a reference argument","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Fri, 03 Jan 2020 05:18:25 -0000"}},{"id":3312,"web_url":"https://patchwork.libcamera.org/comment/3312/","msgid":"<20200103113136.GD4847@pendragon.ideasonboard.com>","date":"2020-01-03T11:31:36","subject":"Re: [libcamera-devel] [PATCH 1/2] test: object-invoke: Test\n\tinvocation of method taking a reference argument","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nOn Fri, Jan 03, 2020 at 12:18:20AM -0500, Paul Elder wrote:\n> On Fri, Jan 03, 2020 at 01:53:10AM +0200, Laurent Pinchart wrote:\n> > Object::invokeMethod() fails with a compilation error when the invoked\n> > method takes a reference argument. Add a test case for this issue.\n> \n> I'm still not sure I agree with adding a test that introduces a compile\n> error... but it only fails compiling tests so maybe it's fine?\n\nIf the test came second, there would be no guarantee that the test\ncatches the right issue, and that the fix fixes the right problem.\nThat's why we add tests first and then fix issues on top.\n\n> In any case the goal is achieved.\n> \n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  test/object-invoke.cpp | 12 ++++++++++++\n> >  1 file changed, 12 insertions(+)\n> > \n> > diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> > index 560adee14e3a..f9a8bea9dce2 100644\n> > --- a/test/object-invoke.cpp\n> > +++ b/test/object-invoke.cpp\n> > @@ -49,6 +49,10 @@ public:\n> >  \t\tvalue_ = value;\n> >  \t}\n> >  \n> > +\tvoid methodWithReference(const int &value)\n> > +\t{\n> > +\t}\n> > +\n> >  private:\n> >  \tStatus status_;\n> >  \tint value_;\n> > @@ -119,6 +123,14 @@ protected:\n> >  \t\t\treturn TestFail;\n> >  \t\t}\n> >  \n> > +\t\t/*\n> > +\t\t * Test invoking a method that takes reference arguments. This\n> > +\t\t * targets compilation, there's no need to check runtime\n> > +\t\t * results.\n> > +\t\t */\n> > +\t\tobject_.invokeMethod(&InvokedObject::methodWithReference,\n> > +\t\t\t\t     ConnectionTypeBlocking, 42);\n> > +\n> >  \t\treturn TestPass;\n> >  \t}\n> >","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0F37560465\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 Jan 2020 12:31:47 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9987230F;\n\tFri,  3 Jan 2020 12:31:46 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578051106;\n\tbh=RhKu/Bvhk7u2Ef5kO93rGF/eGysNA0xwAbClOYh7XtQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HrW98d3DKtZs8SrSHzSrLLsLijzLtUuOvldgy0cl9tKwoBZZ5rfD8dF0w7ygk0GPX\n\tFuv6z6qLAg7hmJjjKC3XspeLmb6EIytiV54XsM1eszFAl4kR9NysS0UsSPcoYVEPZV\n\tsIm+7smueuoxBYgPaEyyBbPIZowgWZQmxFysm8HI=","Date":"Fri, 3 Jan 2020 13:31:36 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200103113136.GD4847@pendragon.ideasonboard.com>","References":"<20200102235311.12009-1-laurent.pinchart@ideasonboard.com>\n\t<20200103051820.GB3820@localhost.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200103051820.GB3820@localhost.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 1/2] test: object-invoke: Test\n\tinvocation of method taking a reference argument","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Fri, 03 Jan 2020 11:31:47 -0000"}}]