From: Sangyoon Jang Date: Tue, 5 Dec 2017 05:12:48 +0000 (+0900) Subject: Fix plugin smoketest failure X-Git-Tag: accepted/tizen/unified/20171211.061325~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F162713%2F2;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Fix plugin smoketest failure Now category plugin parser runs when name matched exactly. Change-Id: I65a9bf003cf5972df17da37a6b0085815f9a66b2 Signed-off-by: Sangyoon Jang --- 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 @@ + -