From fbcb2ae0b17a6b3319fdedf9e971c7f60781e224 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sat, 11 Apr 2015 16:41:13 +0200 Subject: Sort integration tests --- test/integration/Main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/integration/Main.cpp b/test/integration/Main.cpp index 0565ab3..28df680 100644 --- a/test/integration/Main.cpp +++ b/test/integration/Main.cpp @@ -147,6 +147,16 @@ struct Test { : name(name), infile(infile), shouldFail(true), success(false) { } + + /** + * Operator used for sorting the tests. + * + * @param t1 is the first test that should be compared. + * @param t2 is the second test that should be compared. + */ + friend bool operator<(const Test &t1, const Test &t2) { + return t1.infile < t2.infile; + } }; static bool parseFile(const std::string &infile, std::ostream &os) @@ -328,6 +338,7 @@ static std::vector gatherTests(fs::path root) } // Return the unit test list + std::sort(res.begin(), res.end()); return res; } } -- cgit v1.2.3