Mon, 23 Jan 2017 17:03:12 -0800
Merge
ksrini@1052 | 1 | /* |
jjg@1558 | 2 | * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
ksrini@1052 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ksrini@1052 | 4 | * |
ksrini@1052 | 5 | * This code is free software; you can redistribute it and/or modify it |
ksrini@1052 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ksrini@1052 | 7 | * published by the Free Software Foundation. |
ksrini@1052 | 8 | * |
ksrini@1052 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
ksrini@1052 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ksrini@1052 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ksrini@1052 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
ksrini@1052 | 13 | * accompanied this code). |
ksrini@1052 | 14 | * |
ksrini@1052 | 15 | * You should have received a copy of the GNU General Public License version |
ksrini@1052 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
ksrini@1052 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ksrini@1052 | 18 | * |
ksrini@1052 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ksrini@1052 | 20 | * or visit www.oracle.com if you need additional information or have any |
ksrini@1052 | 21 | * questions. |
ksrini@1052 | 22 | */ |
ksrini@1052 | 23 | |
ksrini@1052 | 24 | /* |
ksrini@1052 | 25 | * @test |
ksrini@1052 | 26 | * @bug 6735320 |
ksrini@1052 | 27 | * @summary javadoc throws exception if serialField value is missing |
ksrini@1052 | 28 | * @library ../lib/ |
ksrini@1052 | 29 | * @build JavadocTester T6735320 |
ksrini@1052 | 30 | * @run main T6735320 |
ksrini@1052 | 31 | */ |
ksrini@1052 | 32 | public class T6735320 extends JavadocTester { |
ksrini@1052 | 33 | |
ksrini@1052 | 34 | private static final String BUG_ID = "6735320"; |
ksrini@1052 | 35 | private static final String[] ARGS = new String[]{ |
ksrini@1052 | 36 | "-d", BUG_ID + ".out", |
ksrini@1052 | 37 | SRC_DIR + FS + "SerialFieldTest.java" |
ksrini@1052 | 38 | }; |
ksrini@1052 | 39 | |
ksrini@1052 | 40 | public String getBugId() { |
ksrini@1052 | 41 | return BUG_ID; |
ksrini@1052 | 42 | } |
ksrini@1052 | 43 | |
ksrini@1052 | 44 | public String getBugName() { |
ksrini@1052 | 45 | return getClass().getName(); |
ksrini@1052 | 46 | } |
ksrini@1052 | 47 | |
ksrini@1052 | 48 | public static void main(String... args) { |
ksrini@1052 | 49 | T6735320 tester = new T6735320(); |
jjg@1558 | 50 | if (tester.runJavadoc(ARGS) == 0) { |
jjg@1558 | 51 | throw new AssertionError("zero return code from javadoc"); |
ksrini@1052 | 52 | } |
ksrini@1052 | 53 | if (tester.getErrorOutput().contains("StringIndexOutOfBoundsException")) { |
ksrini@1052 | 54 | throw new AssertionError("javadoc threw StringIndexOutOfBoundsException"); |
ksrini@1052 | 55 | } |
ksrini@1052 | 56 | } |
ksrini@1052 | 57 | } |