langtools/test/tools/javac/depDocComment/DeprecatedDocComment.java
author sogoel
Thu, 05 Jun 2014 10:57:10 -0700
changeset 24797 850ebd4d80a7
parent 6150 d055fa8ced62
permissions -rw-r--r--
8044072: Group 2: create .out files for OverrideChecks tests in tools/javac dir Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
 * @test  /nodynamiccopyright/
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug 4241231 4785453
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 * @summary Make sure the compiler scans for deprecated tag in legal
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * docComment only
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * @author Jing Qian
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 *
863
3113c955a388 6724327: eliminate use of shell tests for simple golden file tests
jjg
parents: 10
diff changeset
     8
 * @compile DeprecatedDocComment2.java
6150
d055fa8ced62 6971882: Remove -XDstdout from javac test
jjg
parents: 863
diff changeset
     9
 * @compile/fail/ref=DeprecatedDocComment.out -XDrawDiagnostics -Werror -deprecation DeprecatedDocComment.java
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
// WARNING: This file needs to be compiled with the -deprecation flag on.
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
// DeprecatedDocCommentTest2.java in test/tools/javac/depDocComment/
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
// should be compiled first before this file can be compiled. This is because
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
// the compiler *does not* issue deprecation warnings for a file currently
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
// being compiled.
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
// The test passes iff the compile issues deprecation warnings for
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
// deprecatedTest 1, 5, and 6; and fails with an unclosed comment error
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
// The test does not need to be run.
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
//import depDocComment.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
public class DeprecatedDocComment {
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
    public static void main(String argv[]) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
      DeprecatedDocComment2.deprecatedTest1();
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
      DeprecatedDocComment2.deprecatedTest2();
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
      DeprecatedDocComment2.deprecatedTest3();
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
      DeprecatedDocComment2.deprecatedTest4();
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
      DeprecatedDocComment2.deprecatedTest5();
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
      DeprecatedDocComment2.deprecatedTest6();
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
      DeprecatedDocComment2.deprecatedTest7();
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
      DeprecatedDocComment2.deprecatedTest8();
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
}