[{"id":3368,"web_url":"https://patchwork.libcamera.org/comment/3368/","msgid":"<20200107192135.GM533370@oden.dyn.berto.se>","date":"2020-01-07T19:21:35","subject":"Re: [libcamera-devel] [PATCH 12/14] test: object-invoke: Test\n\tinvoking a non-void method","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your test.\n\nOn 2020-01-04 07:09:45 +0200, Laurent Pinchart wrote:\n> Test that Object::invokeMethod() can be used to invoke a non-void\n> method. Verify that the return value is correctly propagated to the\n> caller.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> \n\n> ---\n>  test/object-invoke.cpp | 14 ++++++++++++++\n>  1 file changed, 14 insertions(+)\n> \n> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> index ed16de99ef5e..8e2055ca620f 100644\n> --- a/test/object-invoke.cpp\n> +++ b/test/object-invoke.cpp\n> @@ -53,6 +53,11 @@ public:\n>  \t{\n>  \t}\n>  \n> +\tint methodWithReturn()\n> +\t{\n> +\t\treturn 42;\n> +\t}\n> +\n>  private:\n>  \tStatus status_;\n>  \tint value_;\n> @@ -152,6 +157,15 @@ protected:\n>  \t\tobject_.invokeMethod(&InvokedObject::methodWithReference,\n>  \t\t\t\t     ConnectionTypeBlocking, 42);\n>  \n> +\t\t/* Test invoking a method that returns a value. */\n> +\t\tint ret = object_.invokeMethod(&InvokedObject::methodWithReturn,\n> +\t\t\t\t\t       ConnectionTypeBlocking);\n> +\t\tif (ret != 42) {\n> +\t\t\tcout << \"Method invoked return incorrect value (\" << ret\n> +\t\t\t     << \")\" << endl;\n> +\t\t\treturn TestFail;\n> +\t\t}\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":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1F4286063B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 Jan 2020 20:21:37 +0100 (CET)","by mail-lj1-x241.google.com with SMTP id m26so693784ljc.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 07 Jan 2020 11:21:37 -0800 (PST)","from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159])\n\tby smtp.gmail.com with ESMTPSA id\n\tb1sm250028ljp.72.2020.01.07.11.21.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 07 Jan 2020 11:21:35 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=78Y6QzAarXtTvcJzLnXbPQLWi/Op8gD42JPvvFoEFhk=;\n\tb=we4+PHEJ1+uqn6EqLsG/SG6tjXSQ8l1Ztoy8xNpxatd8Ktvawc0NV1tUfKRAZwZqLS\n\tz2/RPyohEunGELBrriRUFdBN7TGuWTkSHwPFzuqplCHp+hRWmhAuln1UxvqflpnwN70Y\n\tckAoqlzOy0EU7VQNbFGRl+2lA5/tM5Is67PejFJJaBFRmW7XFzyZ9wnEyXM3d5R73FO1\n\tvqP8g05s6ZjB1JhgJcCYFZCyqcmvB+3OH23nfqcaFHZSKnhrVnh4n446fYgcQ3QJqevD\n\tYJAm6lLbJWkuISO/+haCgotE7Ym3+usc4WSSPSVU0RJ7yjN3oBgsj5sWE3M1G9CuM3F3\n\tCyqw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=78Y6QzAarXtTvcJzLnXbPQLWi/Op8gD42JPvvFoEFhk=;\n\tb=kO6ybBOXZO1NMVALEEzEhXIMVR+/bbtKLufk6BDPTJUWLaX6DGTvxdmG19kRvvZCKZ\n\tQu61V+zxjKdIjnWZzc+YBeovqcUeWPS2jtzU7GjrzwwQ3yNSkrelLIb4SHJs9Tn2Rptn\n\tYO2LS5x27ILLUFs5zBfKiAUYfyV48J3SmMI1CZyujM22Of4DtmLq3cmE+H/pIqO1+DgZ\n\tK7ZwamV0f8DIHT5inPxzmdBlIYdHZJxxX1ev5w78UUNsuQT0g8LSFwbRT5jPUYiKtoBZ\n\tw3LgGDj6ZgKaCKaD0gS7I3ilywdkxnq9xhL8We1XO1DRmJJ/SlnfJA86I8by1H8+dPOi\n\tVa+A==","X-Gm-Message-State":"APjAAAUPrkpQAYxxtE/94/n9hmPbFLsMntR1ksu68AQu7cNy5Z2BGIqF\n\tIpXyNqYVOkQrOFfvrPlcertMNsccabhpGA==","X-Google-Smtp-Source":"APXvYqwG4uAKLg71Z0ECM0Ume/tIf0J2d6Jc7b3l7YHSXf7jlG0DCCI969u+zP9tyymIM1+CiLUbdw==","X-Received":"by 2002:a2e:3a0c:: with SMTP id h12mr622176lja.200.1578424896473;\n\tTue, 07 Jan 2020 11:21:36 -0800 (PST)","Date":"Tue, 7 Jan 2020 20:21:35 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200107192135.GM533370@oden.dyn.berto.se>","References":"<20200104050947.7673-1-laurent.pinchart@ideasonboard.com>\n\t<20200104050947.7673-13-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200104050947.7673-13-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 12/14] test: object-invoke: Test\n\tinvoking a non-void method","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":"Tue, 07 Jan 2020 19:21:37 -0000"}}]