Show a patch.

GET /api/1.1/patches/223/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 223,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/223/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/223/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20190114095417.16473-3-kieran.bingham@ideasonboard.com>",
    "date": "2019-01-14T09:54:17",
    "name": "[libcamera-devel,RFC,2/2] test: Provide TestStatus validation tests",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "47fb1d80856061ebbb6ab15e2da88ce39d01f026",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/223/mbox/",
    "series": [
        {
            "id": 76,
            "url": "https://patchwork.libcamera.org/api/1.1/series/76/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=76",
            "date": "2019-01-14T09:54:15",
            "name": "Test Status Refactoring",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/76/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/223/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/223/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@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 21D3E60C76\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Jan 2019 10:54:22 +0100 (CET)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B04FD573;\n\tMon, 14 Jan 2019 10:54:21 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1547459661;\n\tbh=9fT3IChQjj2P7BbXLBZfOh6Tmd8voRWI2qNFdfoB2p0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=oMMUh8osGdSo9x942b3ovM0qg9O0OTL36py09aR0Qh4nBlpFyc6qGMpMyk1uAA3tb\n\t0wUlN8+gdA9h1Xkj4Dqw2u305/jEHhpr1brTk4yPyk+OcsLSw8Fbmr3oHtE7j9PhBP\n\t8/LXDDWyHQjNde3WjkSdHe+DvXr62w47jwM3+pyQ=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Mon, 14 Jan 2019 09:54:17 +0000",
        "Message-Id": "<20190114095417.16473-3-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190114095417.16473-1-kieran.bingham@ideasonboard.com>",
        "References": "<20190114095417.16473-1-kieran.bingham@ideasonboard.com>",
        "Subject": "[libcamera-devel] [PATCH RFC 2/2] test: Provide TestStatus\n\tvalidation tests",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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": "Mon, 14 Jan 2019 09:54:22 -0000"
    },
    "content": "Validate the return values of the objects, and the ability to use \"is\"\nand \"isnt()\" correctly.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n test/meson.build     |  1 +\n test/test_status.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 53 insertions(+)\n create mode 100644 test/test_status.cpp",
    "diff": "diff --git a/test/meson.build b/test/meson.build\nindex 32152888a55e..ae5bd7b47b3b 100644\n--- a/test/meson.build\n+++ b/test/meson.build\n@@ -6,6 +6,7 @@ public_tests = [\n     ['event',           'event.cpp'],\n     ['list-cameras',    'list-cameras.cpp'],\n     ['signal',          'signal.cpp'],\n+    ['test_status',     'test_status.cpp'],\n     ['timer',           'timer.cpp'],\n ]\n \ndiff --git a/test/test_status.cpp b/test/test_status.cpp\nnew file mode 100644\nindex 000000000000..297cc5189f49\n--- /dev/null\n+++ b/test/test_status.cpp\n@@ -0,0 +1,52 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2018, Google Inc.\n+ *\n+ * list.cpp - camera list tests\n+ */\n+\n+#include <iostream>\n+#include <string>\n+\n+#include \"test.h\"\n+\n+class TestStatusTest : public Test\n+{\n+protected:\n+\tint run()\n+\t{\n+\t\t// plan(8);\n+\t\t// note(\"Correct output here is 1 skip, and three failures\");\n+\n+\t\t/*\n+\t\t * TestStatusPass should return 0.\n+\t\t * Test without operator=\n+\t\t */\n+\t\tif (TestStatusPass(\"[Verify TestStatusPass]\"))\n+\t\t\treturn TestStatusFail(\"TestStatusPass test\");\n+\n+\t\t/* Test an integer on the rhs. */\n+\t\tif (TestStatusFail(\"[Verify TestStatusFail]\") != -1)\n+\t\t\treturn TestStatusFail(\"TestStatusFail test\");\n+\n+\t\t/* Test an integer on the lhs. */\n+\t\tif (77 != TestStatusSkip(\"[Verify TestStatusSkip]\"))\n+\t\t\treturn TestStatusFail(\"TestStatusSkip test\");\n+\n+\t\tif (is(1, 1, \"[Good is return check]\") != TestStatusBase::ValuePass)\n+\t\t\treturn TestStatusFail(\"Good is check failed\");\n+\n+\t\tif (isnt(1, 0, \"[Good isn't return check]\") != TestStatusBase::ValuePass)\n+\t\t\treturn TestStatusFail(\"Good isn't check failed\");\n+\n+\t\tif (is(1, 0, \"[Bad Is Check]\") == TestStatusBase::ValuePass)\n+\t\t\treturn TestStatusFail(\"Bad is check failed\");\n+\n+\t\tif (isnt(1, 1, \"[Bad Isn't check]\") == TestStatusBase::ValuePass)\n+\t\t\treturn TestStatusFail(\"Bad isn't check failed\");\n+\n+\t\treturn TestStatusPass(\"TestStatus validations\");\n+\t}\n+};\n+\n+TEST_REGISTER(TestStatusTest)\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "2/2"
    ]
}