equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 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. |
25 * @test |
25 * @test |
26 * @bug 6257087 |
26 * @bug 6257087 |
27 * @summary javah doesn't produce proper signatures for inner class native methods |
27 * @summary javah doesn't produce proper signatures for inner class native methods |
28 * @library /tools/lib |
28 * @library /tools/lib |
29 * @modules jdk.compiler/com.sun.tools.javac.api |
29 * @modules jdk.compiler/com.sun.tools.javac.api |
30 * jdk.compiler/com.sun.tools.javac.file |
|
31 * jdk.compiler/com.sun.tools.javac.main |
30 * jdk.compiler/com.sun.tools.javac.main |
32 * jdk.jdeps/com.sun.tools.javap |
31 * @build toolbox.ToolBox toolbox.JavahTask |
33 * @build ToolBox |
|
34 * @run main T6257087 |
32 * @run main T6257087 |
35 */ |
33 */ |
36 |
34 |
37 import java.util.List; |
35 import java.util.List; |
|
36 |
|
37 import toolbox.JavahTask; |
|
38 import toolbox.ToolBox; |
38 |
39 |
39 public class T6257087 { |
40 public class T6257087 { |
40 |
41 |
41 private static final String fooBarGoldenFile = |
42 private static final String fooBarGoldenFile = |
42 "/* DO NOT EDIT THIS FILE - it is machine generated */\n" + |
43 "/* DO NOT EDIT THIS FILE - it is machine generated */\n" + |
61 "#endif\n" + |
62 "#endif\n" + |
62 "#endif"; |
63 "#endif"; |
63 |
64 |
64 public static void main(String[] args) throws Exception { |
65 public static void main(String[] args) throws Exception { |
65 ToolBox tb = new ToolBox(); |
66 ToolBox tb = new ToolBox(); |
66 tb.new JavahTask() |
67 new JavahTask(tb) |
67 .classpath(ToolBox.testClasses) |
68 .classpath(ToolBox.testClasses) |
68 .classes("foo") |
69 .classes("foo") |
69 .run(); |
70 .run(); |
70 |
71 |
71 List<String> fooBarFile = tb.readAllLines("foo_bar.h"); |
72 List<String> fooBarFile = tb.readAllLines("foo_bar.h"); |