test/tools/javac/depDocComment/DeprecatedDocComment.java

changeset 0
959103a6100f
child 2525
2eb010b6cb22
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/depDocComment/DeprecatedDocComment.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,37 @@
     1.4 +/**
     1.5 + * @test  /nodynamiccopyright/
     1.6 + * @bug 4241231 4785453
     1.7 + * @summary Make sure the compiler scans for deprecated tag in legal
     1.8 + * docComment only
     1.9 + * @author Jing Qian
    1.10 + *
    1.11 + * @compile DeprecatedDocComment2.java
    1.12 + * @compile/fail/ref=DeprecatedDocComment.out -XDrawDiagnostics -Werror -deprecation DeprecatedDocComment.java
    1.13 + */
    1.14 +
    1.15 +// WARNING: This file needs to be compiled with the -deprecation flag on.
    1.16 +// DeprecatedDocCommentTest2.java in test/tools/javac/depDocComment/
    1.17 +// should be compiled first before this file can be compiled. This is because
    1.18 +// the compiler *does not* issue deprecation warnings for a file currently
    1.19 +// being compiled.
    1.20 +
    1.21 +// The test passes iff the compile issues deprecation warnings for
    1.22 +// deprecatedTest 1, 5, and 6; and fails with an unclosed comment error
    1.23 +// The test does not need to be run.
    1.24 +
    1.25 +//import depDocComment.*;
    1.26 +
    1.27 +public class DeprecatedDocComment {
    1.28 +
    1.29 +    public static void main(String argv[]) {
    1.30 +      DeprecatedDocComment2.deprecatedTest1();
    1.31 +      DeprecatedDocComment2.deprecatedTest2();
    1.32 +      DeprecatedDocComment2.deprecatedTest3();
    1.33 +      DeprecatedDocComment2.deprecatedTest4();
    1.34 +      DeprecatedDocComment2.deprecatedTest5();
    1.35 +      DeprecatedDocComment2.deprecatedTest6();
    1.36 +      DeprecatedDocComment2.deprecatedTest7();
    1.37 +      DeprecatedDocComment2.deprecatedTest8();
    1.38 +    }
    1.39 +
    1.40 +}

mercurial