From eca4e6a299c5765b1bb2fa17113bc12c84d8a406 Mon Sep 17 00:00:00 2001 From: J08nY Date: Sat, 13 Jan 2018 01:15:44 +0100 Subject: Simplify default test suite. --- src/cz/crcs/ectester/common/test/CompoundTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/cz/crcs/ectester/common/test/CompoundTest.java') diff --git a/src/cz/crcs/ectester/common/test/CompoundTest.java b/src/cz/crcs/ectester/common/test/CompoundTest.java index bcf4a0e..3b0b542 100644 --- a/src/cz/crcs/ectester/common/test/CompoundTest.java +++ b/src/cz/crcs/ectester/common/test/CompoundTest.java @@ -34,7 +34,7 @@ public class CompoundTest extends Test { return new CompoundTest((tests) -> { for (Test test : tests) { if (!Result.Value.fromExpected(what, test.ok()).ok()) { - return new Result(Result.Value.FAILURE, "At least one of the sub-tests did not have the expected result."); + return new Result(Result.Value.FAILURE, "Some sub-tests did not have the expected result."); } } return new Result(Result.Value.SUCCESS, "All sub-tests had the expected result."); @@ -51,7 +51,7 @@ public class CompoundTest extends Test { return new CompoundTest((tests) -> { for (Test test : tests) { if (Result.Value.fromExpected(what, test.ok()).ok()) { - return new Result(Result.Value.SUCCESS, "At least one of the sub-tests did have the expected result."); + return new Result(Result.Value.SUCCESS, "Some sub-tests did have the expected result."); } } return new Result(Result.Value.FAILURE, "None of the sub-tests had the expected result."); @@ -68,7 +68,7 @@ public class CompoundTest extends Test { return new CompoundTest((tests) -> { for (int i = 0; i < results.length; ++i) { if (!Result.Value.fromExpected(results[i], tests[i].ok()).ok()) { - return new Result(Result.Value.FAILURE, "At least one of the sub-tests did not match the result mask."); + return new Result(Result.Value.FAILURE, "Some sub-tests did not match the result mask."); } } return new Result(Result.Value.SUCCESS, "All sub-tests matched the expected mask."); @@ -93,6 +93,7 @@ public class CompoundTest extends Test { for (Test test : tests) { test.run(); } + result = callback.apply(tests); this.hasRun = true; } -- cgit v1.2.3-70-g09d2