1 /*
2 * Copyright (c) 2015, 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 */
24 import java.io.File;
25 import java.io.InputStream;
26 import java.io.Writer;
27 import java.lang.annotation.Retention;
28 import java.lang.annotation.RetentionPolicy;
29 import java.lang.reflect.Method;
30 import java.util.Arrays;
31 import java.util.List;
32 import com.sun.tools.javac.file.ZipFileIndexCache;
33 import java.io.IOException;
34 import java.nio.file.FileVisitResult;
35 import java.nio.file.FileVisitor;
36 import java.nio.file.Files;
37 import java.nio.file.Path;
38 import java.nio.file.Paths;
39 import java.nio.file.attribute.BasicFileAttributes;
40 import java.util.HashSet;
41 import java.util.Set;
42 import java.util.stream.Collectors;
43 import java.util.stream.Stream;
44 import build.tools.symbolgenerator.CreateSymbols;
45 import build.tools.symbolgenerator.CreateSymbols.ClassDescription;
46 import build.tools.symbolgenerator.CreateSymbols.ClassList;
47 import build.tools.symbolgenerator.CreateSymbols.CtSymKind;
48 import build.tools.symbolgenerator.CreateSymbols.ExcludeIncludeList;
49 import build.tools.symbolgenerator.CreateSymbols.VersionDescription;
50
51 public class CreateSymbolsTestImpl {
52
53 static final String CREATE_SYMBOLS_NAME = "symbolgenerator.CreateSymbols";
54
55 public static void main(String... args) throws Exception {
56 new CreateSymbolsTestImpl().doTest();
57 }
58
59 void doTest() throws Exception {
60 boolean testRun = false;
61 for (Method m : CreateSymbolsTestImpl.class.getDeclaredMethods()) {
62 if (!"testIncluded".equals(m.getName()))
63 continue;
64 if (m.isAnnotationPresent(Test.class)) {
65 m.invoke(this);
66 testRun = true;
67 }
68 }
69 if (!testRun) {
|
1 /*
2 * Copyright (c) 2015, 2020, 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 */
24 import java.io.File;
25 import java.io.InputStream;
26 import java.io.Writer;
27 import java.lang.annotation.Retention;
28 import java.lang.annotation.RetentionPolicy;
29 import java.lang.reflect.Method;
30 import java.util.Arrays;
31 import java.util.List;
32 import com.sun.tools.javac.file.ZipFileIndexCache;
33 import java.io.IOException;
34 import java.nio.file.FileVisitResult;
35 import java.nio.file.FileVisitor;
36 import java.nio.file.Files;
37 import java.nio.file.Path;
38 import java.nio.file.Paths;
39 import java.nio.file.attribute.BasicFileAttributes;
40 import java.util.HashSet;
41 import java.util.Set;
42 import java.util.stream.Collectors;
43 import java.util.stream.Stream;
44 import org.openjdk.buildtools.symbolgenerator.CreateSymbols;
45 import org.openjdk.buildtools.symbolgenerator.CreateSymbols.ClassDescription;
46 import org.openjdk.buildtools.symbolgenerator.CreateSymbols.ClassList;
47 import org.openjdk.buildtools.symbolgenerator.CreateSymbols.CtSymKind;
48 import org.openjdk.buildtools.symbolgenerator.CreateSymbols.ExcludeIncludeList;
49 import org.openjdk.buildtools.symbolgenerator.CreateSymbols.VersionDescription;
50
51 public class CreateSymbolsTestImpl {
52
53 static final String CREATE_SYMBOLS_NAME = "symbolgenerator.CreateSymbols";
54
55 public static void main(String... args) throws Exception {
56 new CreateSymbolsTestImpl().doTest();
57 }
58
59 void doTest() throws Exception {
60 boolean testRun = false;
61 for (Method m : CreateSymbolsTestImpl.class.getDeclaredMethods()) {
62 if (!"testIncluded".equals(m.getName()))
63 continue;
64 if (m.isAnnotationPresent(Test.class)) {
65 m.invoke(this);
66 testRun = true;
67 }
68 }
69 if (!testRun) {
|