diff options
| author | J08nY | 2018-01-13 01:15:44 +0100 |
|---|---|---|
| committer | J08nY | 2018-01-13 01:15:44 +0100 |
| commit | eca4e6a299c5765b1bb2fa17113bc12c84d8a406 (patch) | |
| tree | 2c71746f53696df05edee2ada11586b6991f63d7 /src/cz/crcs/ectester/common/test/CompoundTest.java | |
| parent | 94e441b522069d3fed4b88a4823b91c1593bac68 (diff) | |
| download | ECTester-eca4e6a299c5765b1bb2fa17113bc12c84d8a406.tar.gz ECTester-eca4e6a299c5765b1bb2fa17113bc12c84d8a406.tar.zst ECTester-eca4e6a299c5765b1bb2fa17113bc12c84d8a406.zip | |
Diffstat (limited to 'src/cz/crcs/ectester/common/test/CompoundTest.java')
| -rw-r--r-- | src/cz/crcs/ectester/common/test/CompoundTest.java | 7 |
1 files changed, 4 insertions, 3 deletions
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; } |
