This commit is contained in:
isXander committed 2023-03-26 19:56:23 +01:00
1 parent dc43657b95
commit c4fa5cbed3
9 files changed
+104 -15

No files matched your search

@@ -67,19 +67,25 @@ public class ControlifyAutoTestClient implements ClientModInitializer {
boolean success = true;
for (var test : preLoadTests) {
success &= wrapTest(test);
success &= wrapTestExecution(test);
}
waitForLoadingComplete();
for (var test : postLoadTests) {
success &= wrapTest(test);
success &= wrapTestExecution(test);
}
LOGGER.info("--------");
if (success)
LOGGER.info("\u001b[32mAll tests passed!");
else
LOGGER.error("\n\u001b[31mSome tests failed!");
System.exit(success ? 0 : 1);
}
private boolean wrapTest(Test test) {
private boolean wrapTestExecution(Test test) {
LOGGER.info("\u001b[36mRunning test " + test.name() + "...");
try {
test.method().run();