Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/test/com/sun/javadoc/constantValues/TestConstantValuesDriver.java
48527 views
/*1* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/*24* @test25* @bug 4504730 4526070 507731726* @summary Test the generation of constant-values.html.27* @author jamieh28* @library ../lib/29* @build JavadocTester30* @build TestConstantValuesDriver31* @run main TestConstantValuesDriver32*/33public class TestConstantValuesDriver extends JavadocTester {3435private static final String BUG_ID = "4504730-4526070-5077317";36private static final String[] ARGS = new String[] {37"-d", BUG_ID, SRC_DIR + FS + "TestConstantValues.java",38SRC_DIR + FS + "TestConstantValues2.java",39SRC_DIR + FS + "A.java"40};4142/**43* The entry point of the test.44* @param args the array of command line arguments.45*/46public static void main(String[] args) {47String[][] tests = new String[5][2];48for (int i = 0; i < tests.length-1; i++) {49tests[i][0] = BUG_ID + FS + "constant-values.html";50tests[i][1] = "TEST"+(i+1)+"PASSES";51}52tests[tests.length-1][0] = BUG_ID + FS + "constant-values.html";53tests[tests.length-1][1] = "<code>\"<Hello World>\"</code>";54TestConstantValuesDriver tester = new TestConstantValuesDriver();55run(tester, ARGS, tests, NO_TEST);56tester.printSummary();57}5859/**60* {@inheritDoc}61*/62public String getBugId() {63return BUG_ID;64}6566/**67* {@inheritDoc}68*/69public String getBugName() {70return getClass().getName();71}7273/**74* @throws java.io.IOException Test 1 passes75* @throws java.io.IOException Test 2 passes76* @throws java.lang.NullPointerException comment three77* @throws java.io.IOException Test 3 passes78*/79public void method(){}8081}828384