diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-05-24 12:23:38 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-06-16 02:43:47 +0300 |
commit | 27fb47f70b55000fbd793c40377c20d915216f70 (patch) | |
tree | 902c9f46c8f02cac96707c12d1337d3ffec1d2c2 /test/yaml-parser.cpp | |
parent | 27483e971fb43c0874b8399e7431dd805efa3994 (diff) |
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'test/yaml-parser.cpp')
-rw-r--r-- | test/yaml-parser.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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()); |