You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at the moment it is possible to catch System.exit and assert on that. My code (some kind of script) only calls System.exit(1) if anything weird happened but does not call System.exit(0) if everything worked fine.
At the moment i can't test abnormal executions since i always get an AssertionError if no System.exit was called at all. It would be nice to have a method like SystemLambda.catchSystemExitOrDefault(Statement statement, int defaultValue) which returns the defaultValue if no System.exit was called at all. Then i could just assert for exit code 0 which happens normally and still fail if anything else happened.
does this make senses ?
The text was updated successfully, but these errors were encountered:
at the moment it is possible to catch System.exit and assert on that. My code (some kind of script) only calls System.exit(1) if anything weird happened but does not call System.exit(0) if everything worked fine.
At the moment i can't test abnormal executions since i always get an AssertionError if no System.exit was called at all. It would be nice to have a method like SystemLambda.catchSystemExitOrDefault(Statement statement, int defaultValue) which returns the defaultValue if no System.exit was called at all. Then i could just assert for exit code 0 which happens normally and still fail if anything else happened.
does this make senses ?
The text was updated successfully, but these errors were encountered: