1 /* |
1 /* |
2 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2006, 2014, 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. |
52 fm = new JavacFileManager(new Context(), false, null); |
52 fm = new JavacFileManager(new Context(), false, null); |
53 JavaFileObject f = fm.getFileForInput(testSrc + File.separatorChar + self + ".java"); |
53 JavaFileObject f = fm.getFileForInput(testSrc + File.separatorChar + self + ".java"); |
54 |
54 |
55 test(fm, f, |
55 test(fm, f, |
56 new Option[] { new Option("-d", ".")}, |
56 new Option[] { new Option("-d", ".")}, |
57 7); |
57 8); |
58 |
58 |
59 test(fm, f, |
59 test(fm, f, |
60 new Option[] { new XOption("-XprintRounds"), |
60 new Option[] { new XOption("-XprintRounds"), |
61 new Option("-processorpath", "."), |
61 new Option("-processorpath", "."), |
62 new Option("-processor", self) }, |
62 new Option("-processor", self) }, |
63 12); |
63 13); |
64 } |
64 } |
65 |
65 |
66 static void test(JavacFileManager fm, JavaFileObject f, Option[] opts, int expect) throws Throwable { |
66 static void test(JavacFileManager fm, JavaFileObject f, Option[] opts, int expect) throws Throwable { |
67 PrintWriter out = new PrintWriter(System.err, true); |
67 PrintWriter out = new PrintWriter(System.err, true); |
68 |
68 |