From: Lukasz Wojciechowski Date: Thu, 21 May 2015 16:08:57 +0000 (+0200) Subject: Fix sorting tests in test groups X-Git-Tag: security-manager_5.5_testing~114^2~12 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Ftest%2Fsecurity-tests.git;a=commitdiff_plain;h=08271d90f9c0b2c26007bc10ba0c56f46529dedd Fix sorting tests in test groups Patch "cb0c3e5 Add init and finish functionality" changed way of keeping test cases. Previously they were kept as list of structures, now it's list of pointers. In such case proper sorting needs a compare function, otherwise it compares pointers. Proper sorting predicate has been added. Change-Id: I4ad755326456cdedce69ae71a0ab050df15899d9 --- diff --git a/src/framework/src/test_runner.cpp b/src/framework/src/test_runner.cpp index fd2d8a2..33a4ef7 100644 --- a/src/framework/src/test_runner.cpp +++ b/src/framework/src/test_runner.cpp @@ -298,7 +298,7 @@ void TestRunner::RunTests() for (auto &collector : m_collectors) { collector.second->CollectCurrentTestGroupName(group.first); } - list.sort(); + list.sort([](const TestCasePtr &a, const TestCasePtr &b) { return (*a < *b); }); for (TestCaseList::const_iterator iterator = list.begin(); iterator != list.end();