From 27fb47f70b55000fbd793c40377c20d915216f70 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 24 May 2022 12:23:38 +0300 Subject: libcamera: yaml_parser: Extend YamlObject::size() to dictionaries Dictionaries have a size too, extend the size() function to support them. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder --- test/yaml-parser.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp index 5315d99f..c5b4ddbb 100644 --- a/test/yaml-parser.cpp +++ b/test/yaml-parser.cpp @@ -421,6 +421,11 @@ protected: return TestFail; } + if (dictObj.size() != 3) { + cerr << "Dictionary object parse with wrong size" << std::endl; + return TestFail; + } + auto memeberNames = dictObj.memberNames(); sort(memeberNames.begin(), memeberNames.end()); -- cgit v1.2.1