Fix sorting tests in test groups 44/39744/2
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Thu, 21 May 2015 16:08:57 +0000 (18:08 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 22 May 2015 09:05:48 +0000 (02:05 -0700)
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

src/framework/src/test_runner.cpp

index fd2d8a2..33a4ef7 100644 (file)
@@ -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();