equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
38 public class ExceptionsTest { |
38 public class ExceptionsTest { |
39 static void analyzeOutputOn(ProcessBuilder pb) throws Exception { |
39 static void analyzeOutputOn(ProcessBuilder pb) throws Exception { |
40 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
40 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
41 output.shouldContain("<a 'java/lang/RuntimeException': Test exception 1 for logging>"); |
41 output.shouldContain("<a 'java/lang/RuntimeException': Test exception 1 for logging>"); |
42 output.shouldContain(" thrown in interpreter method "); |
42 output.shouldContain(" thrown in interpreter method "); |
43 output.shouldContain(") thrown in compiled method "); |
43 output.shouldContain(" thrown in compiled method "); |
44 output.shouldContain("Exception 2 caught."); |
44 output.shouldContain("Exception 2 caught."); |
45 output.shouldHaveExitValue(0); |
45 output.shouldHaveExitValue(0); |
46 } |
46 } |
47 |
47 |
48 static void analyzeOutputOff(ProcessBuilder pb) throws Exception { |
48 static void analyzeOutputOff(ProcessBuilder pb) throws Exception { |