equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2018, 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. |
28 */ |
28 */ |
29 |
29 |
30 import java.io.*; |
30 import java.io.*; |
31 import java.util.*; |
31 import java.util.*; |
32 |
32 |
33 // Simple test of --should-stop:at. |
33 // Simple test of --should-stop=at. |
34 // For each of the permissable values, we compile a file with an error in it, |
34 // For each of the permissable values, we compile a file with an error in it, |
35 // then using -XDverboseCompilePolicy we check that the compilation gets as |
35 // then using -XDverboseCompilePolicy we check that the compilation gets as |
36 // far as expected, but no further. |
36 // far as expected, but no further. |
37 |
37 |
38 public class Test { |
38 public class Test { |
81 args.add("-XDverboseCompilePolicy"); |
81 args.add("-XDverboseCompilePolicy"); |
82 args.add("-XDcompilePolicy=" + cp.toString().toLowerCase()); |
82 args.add("-XDcompilePolicy=" + cp.toString().toLowerCase()); |
83 args.add("-d"); |
83 args.add("-d"); |
84 args.add("."); |
84 args.add("."); |
85 if (ssp.needOption) |
85 if (ssp.needOption) |
86 args.add("--should-stop:at=" + ssp); |
86 args.add("--should-stop=at=" + ssp); |
87 args.add(new File(System.getProperty("test.src", "."), "A.java").getPath()); |
87 args.add(new File(System.getProperty("test.src", "."), "A.java").getPath()); |
88 |
88 |
89 StringWriter sw = new StringWriter(); |
89 StringWriter sw = new StringWriter(); |
90 PrintWriter pw = new PrintWriter(sw); |
90 PrintWriter pw = new PrintWriter(sw); |
91 System.err.println("compile " + args); |
91 System.err.println("compile " + args); |