diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-04-11 16:41:13 +0200 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:24:14 +0200 |
commit | fbcb2ae0b17a6b3319fdedf9e971c7f60781e224 (patch) | |
tree | 55b8636a9dae52fc8daa9dfab25c8de1b40a208b /test | |
parent | e21096cd064a5a2660800b9db36a7e40fc1bfe4b (diff) |
Sort integration tests
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/Main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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<Test> gatherTests(fs::path root) } // Return the unit test list + std::sort(res.begin(), res.end()); return res; } } |