1/*
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24// These tests exercise the various compile policies available via
25// JavaCompiler.CompilePolicy. Like any golden file tests, they are
26// somewhat fragile and susceptible to breakage, but like the canary
27// in the mine, it is useful to know when something is not as it used
28// to be. The golden files should not be taken as a guarantee of
29// future behavior, and should be updated, with due care, if the
30// behavior of the compile policy is deliberately changed.
31
32/*
33 * @test
34 * @bug 6260188 6290772
35 * @summary provide variable policies for javac operation
36 *              Default compile policy is now "by file" (reverted to "todo" for 6382700)
37 *              Because of attr errors in B, no code should be generated
38 * @compile/fail/ref=bytodo.ABD.out -XDrawDiagnostics -XDverboseCompilePolicy A.java B.java D.java
39 */
40
41/*
42 * @test
43 * @bug 6260188
44 * @summary provide variable policies for javac operation
45 *              Generate code for A, A1, A2, B
46 * @compile/fail/ref=bytodo.ABD.out -XDrawDiagnostics -XDverboseCompilePolicy -XDcompilePolicy=bytodo A.java B.java D.java
47 */
48
49/*
50 * @test
51 * @bug 6260188
52 * @summary provide variable policies for javac operation
53 *              Because of attr errors in B, no code should be generated
54 * @compile/fail/ref=simple.ABD.out -XDrawDiagnostics -XDverboseCompilePolicy -XDcompilePolicy=simple A.java B.java D.java
55 */
56
57/*
58 * @test
59 * @bug 6260188
60 * @summary provide variable policies for javac operation
61 *              Because of attr errors in B, no code should be generated
62 * @compile/fail/ref=byfile.ABD.out -XDrawDiagnostics -XDverboseCompilePolicy -XDcompilePolicy=byfile A.java B.java D.java
63 */
64
65
66
67
68/*
69 * @test
70 * @bug 6260188 6290772
71 * @summary provide variable policies for javac operation
72 *              Default compile policy is now "by file" (reverted to "todo" for 6382700)
73 *              Generate code for A, A1, A2, but because of flow errors in C, no more code should be generated
74 * @compile/fail/ref=bytodo.ACD.out -XDrawDiagnostics -XDverboseCompilePolicy A.java C.java D.java
75 */
76
77/*
78 * @test
79 * @bug 6260188
80 * @summary provide variable policies for javac operation
81 *              Generate code for A, A1, A2, C
82 * @compile/fail/ref=bytodo.ACD.out -XDrawDiagnostics -XDverboseCompilePolicy -XDcompilePolicy=bytodo A.java C.java D.java
83 */
84
85/*
86 * @test
87 * @bug 6260188
88 * @summary provide variable policies for javac operation
89 *              Because of flow errors in C, no code should be generated
90 * @compile/fail/ref=simple.ACD.out -XDrawDiagnostics -XDverboseCompilePolicy -XDcompilePolicy=simple A.java C.java D.java
91 */
92
93/*
94 * @test
95 * @bug 6260188
96 * @summary provide variable policies for javac operation
97 *              Generate code for A, A1, A2, but because of flow errors in C, no more code should be generated
98 * @compile/fail/ref=byfile.ACD.out -XDrawDiagnostics -XDverboseCompilePolicy -XDcompilePolicy=byfile A.java C.java D.java
99 */
100