Closed ninewise closed 5 years ago
Did you verify that the ExpectedSystemExit
-rule still works after applying these modifications? Some teachers might be using this.
Now I did, and I added tests for it. The system-rules Rule just overrides my security manager, so this change wouldn't interfere with it.
When using System.exit(...), an ExitException will be thrown. This has the same effect from the user's point of view (the code exits) as it winds up call hierarchy to crash, with the exception it can be caught and checked by the test code. If the ExitException is not caught, the submission is evaluated as incorrect: students shouldn't use System.exit in their code unless asked.
Fixes #17