{"id":16160,"url":"https://patchwork.libcamera.org/api/patches/16160/?format=json","web_url":"https://patchwork.libcamera.org/patch/16160/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220604185939.29163-6-laurent.pinchart@ideasonboard.com>","date":"2022-06-04T18:59:30","name":"[libcamera-devel,RFC,v2,05/14] test: yaml-parser: Test dictionary items ordering","commit_ref":null,"pull_url":null,"state":"rfc","archived":false,"hash":"2a2f8424769305df2c7546db32cc5f689b3ae96d","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16160/mbox/","series":[{"id":3161,"url":"https://patchwork.libcamera.org/api/series/3161/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3161","date":"2022-06-04T18:59:25","name":"Replace boost JSON parser with libyaml in Raspberry Pi IPA","version":2,"mbox":"https://patchwork.libcamera.org/series/3161/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16160/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16160/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 23E61C3276\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  4 Jun 2022 19:00:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 42E516563A;\n\tSat,  4 Jun 2022 21:00:06 +0200 (CEST)","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 BF5636563F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jun 2022 21:00:04 +0200 (CEST)","from pendragon.ideasonboard.com (85-76-79-203-nat.elisa-mobile.fi\n\t[85.76.79.203])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4BA586D4;\n\tSat,  4 Jun 2022 21:00:03 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1654369206;\n\tbh=0ujFVweJ22FiMvPjHZ/GcIyK24KVDI3beDTIVi0P+Lc=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=f5bLRCbK+SUKd8YZ2KNj3QPVb6sQBnCNTqPRWpoKIm0jHOyF4RJ2qeZCbWQfV/n/W\n\tEB0xhu0Ejaqh6hfiPeNxQwBSwVH0iUZoCtKJ9x8ZtG+tgBaOnpb+rMm4fd33eYYXzz\n\tvcrq/03H6fIwusmfbxVF5u6VkP0/QYTFwDwrW9Uu5ZrrmQmNilf0qAkit1T7/wf/Sc\n\thHMhhvS4Yw0TypJUi0L4YSmozmRKNX9ddsSZoYg1TlGqir+kVtl5hcNdV+I1A6A68X\n\trQ/tvZy63nitIS54v6yeJjPoFnnLSYYkSWWcX22H+gQVUqAk0xB2SePm3QZztRGQ1e\n\t1HxlUVEErLsZw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1654369204;\n\tbh=0ujFVweJ22FiMvPjHZ/GcIyK24KVDI3beDTIVi0P+Lc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=o36Z+NYvYRDFe+8bNluaGPWnCUQw77Ec7NhPZVETPXcXbh0ScT4v4EbL6DRNdU7NH\n\tHVzltu7WTxsUfJlaGAaltr11ArV6ZNpvGueGlzb9VQI9WbQTCFoYwOrb9TQT7hMjKM\n\tiqWUXRZ3PVgFzV8NxAi711KstFpMJbSxdIRuQKeE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"o36Z+NYv\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Sat,  4 Jun 2022 21:59:30 +0300","Message-Id":"<20220604185939.29163-6-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20220604185939.29163-1-laurent.pinchart@ideasonboard.com>","References":"<20220604185939.29163-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH v2 05/14] test: yaml-parser: Test\n\tdictionary items ordering","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The order of items in a YAML dictionary may matter. Update the test to\nensure that it is preserved. The test currently fails at the YamlParser\ndoesn't correctly preserve the order, this will be fixed by the next\ncommit.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/yaml-parser.cpp | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)","diff":"diff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp\nindex 5ff4c3236dbf..582c9caed836 100644\n--- a/test/yaml-parser.cpp\n+++ b/test/yaml-parser.cpp\n@@ -29,8 +29,8 @@ static const string testYaml =\n \t\"  - Mary\\n\"\n \t\"dictionary:\\n\"\n \t\"  a: 1\\n\"\n-\t\"  b: 2\\n\"\n \t\"  c: 3\\n\"\n+\t\"  b: 2\\n\"\n \t\"level1:\\n\"\n \t\"  level2:\\n\"\n \t\"    - [1, 2]\\n\"\n@@ -428,7 +428,6 @@ protected:\n \t\t}\n \n \t\tauto memeberNames = dictObj.memberNames();\n-\t\tsort(memeberNames.begin(), memeberNames.end());\n \n \t\tif (memeberNames.size() != 3) {\n \t\t\tcerr << \"Dictionary object fail to extra member names\" << std::endl;\n@@ -436,8 +435,8 @@ protected:\n \t\t}\n \n \t\tif (memeberNames[0] != \"a\" ||\n-\t\t    memeberNames[1] != \"b\" ||\n-\t\t    memeberNames[2] != \"c\") {\n+\t\t    memeberNames[1] != \"c\" ||\n+\t\t    memeberNames[2] != \"b\") {\n \t\t\tcerr << \"Dictionary object fail to parse member names\" << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n","prefixes":["libcamera-devel","RFC","v2","05/14"]}