From 08271d90f9c0b2c26007bc10ba0c56f46529dedd Mon Sep 17 00:00:00 2001 From: Lukasz Wojciechowski Date: Thu, 21 May 2015 18:08:57 +0200 Subject: [PATCH] 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 --- src/framework/src/test_runner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.7.4