Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Special
- try { // IO Exception, expects test.in to be present
- BufferedReader reader = new BufferedReader(new FileReader("./test.in"));
- test = new Calc( new Scanner(reader));
- reader.close(); // whoops?
- } catch (Exception e) {
- System.out.println(e.getMessage());
- }
- try {
- test.call();
- assert false;
- } catch (RuntimeException e) {
- assert "java.io.IOException: Stream closed".equals(e.getMessage()) : "msg: "+ e.getMessage();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement