Advertisement
Nattack

Untitled

Jul 20th, 2017
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1.         //Special
  2.         try {   // IO Exception, expects test.in to be present
  3.             BufferedReader reader = new BufferedReader(new FileReader("./test.in"));
  4.             test = new Calc( new Scanner(reader));
  5.             reader.close(); // whoops?
  6.         } catch (Exception e) {
  7.             System.out.println(e.getMessage());
  8.         }
  9.         try {
  10.             test.call();
  11.             assert false;
  12.         } catch (RuntimeException e) {
  13.             assert "java.io.IOException: Stream closed".equals(e.getMessage()) : "msg: "+ e.getMessage();
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement