From c2b077721cb8bc44e26707355389db06c68d9a9a Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 5 Dec 2017 14:12:48 +0900 Subject: [PATCH] Fix plugin smoketest failure Now category plugin parser runs when name matched exactly. Change-Id: I65a9bf003cf5972df17da37a6b0085815f9a66b2 Signed-off-by: Sangyoon Jang --- src/unit_tests/libs/test_category_plugin.cc | 28 +++++----------------- .../test_samples/plugins/tizen-manifest.xml | 2 +- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/unit_tests/libs/test_category_plugin.cc b/src/unit_tests/libs/test_category_plugin.cc index ffb1305..e0c2797 100644 --- a/src/unit_tests/libs/test_category_plugin.cc +++ b/src/unit_tests/libs/test_category_plugin.cc @@ -35,29 +35,13 @@ boost::optional CheckArgs( auto range = GListRange<__category_t*>(categories); if (range.Size() != 3) return std::string("Metadata Glist is wrong size for category plugin"); - bool found_a = false; - bool found_b = false; - bool found_c = false; - for (__category_t* meta : range) { - if (strcmp(meta->name, "http://tizen.org/category/test_category/value_a") - == 0) { - found_a = true; - } - if (strcmp(meta->name, "http://tizen.org/category/test_category/value_b") - == 0) { - found_b = true; - } - if (strcmp(meta->name, "http://tizen.org/category/test_category/value_c") - == 0) { - found_c = true; - } + bool found = false; + for (__category_t* category : range) { + if (strcmp(category->name, "http://tizen.org/category/test_category") == 0) + found = true; } - if (!found_a) - return std::string("Category value_a not found"); - if (!found_b) - return std::string("Category value_b not found"); - if (!found_c) - return std::string("Category value_c not found"); + if (!found) + return std::string("Category value not found"); return {}; } diff --git a/src/unit_tests/test_samples/plugins/tizen-manifest.xml b/src/unit_tests/test_samples/plugins/tizen-manifest.xml index 7b4781c..dbb2f5d 100644 --- a/src/unit_tests/test_samples/plugins/tizen-manifest.xml +++ b/src/unit_tests/test_samples/plugins/tizen-manifest.xml @@ -24,9 +24,9 @@ + - -- 2.7.4