test/langtools/tools/javac/modules/AnnotationsOnModules.java
changeset 55387 761b86d5563d
parent 47216 71c04702a3d5
equal deleted inserted replaced
55386:2f4e214781a1 55387:761b86d5563d
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   607 
   607 
   608         TestCase[] testCases = new TestCase[] {
   608         TestCase[] testCases = new TestCase[] {
   609             new TestCase("package test; public enum E {A, B;}",
   609             new TestCase("package test; public enum E {A, B;}",
   610                          "public E value();",
   610                          "public E value();",
   611                          "test.E.A",
   611                          "test.E.A",
   612                          "@test.A(test.E.A)"),
   612                          "@test.A(A)"),
   613             new TestCase("package test; public enum E {A, B;}",
   613             new TestCase("package test; public enum E {A, B;}",
   614                          "public E[] value();",
   614                          "public E[] value();",
   615                          "{test.E.A, test.E.B}",
   615                          "{test.E.A, test.E.B}",
   616                          "@test.A({test.E.A, test.E.B})"),
   616                          "@test.A({A, B})"),
   617             new TestCase("package test; public class Extra {}",
   617             new TestCase("package test; public class Extra {}",
   618                          "public Class value();",
   618                          "public Class value();",
   619                          "test.Extra.class",
   619                          "test.Extra.class",
   620                          "@test.A(test.Extra.class)"),
   620                          "@test.A(test.Extra.class)"),
   621             new TestCase("package test; public class Extra {}",
   621             new TestCase("package test; public class Extra {}",
   639                          "{1, 2}",
   639                          "{1, 2}",
   640                          "@test.A({1, 2})"),
   640                          "@test.A({1, 2})"),
   641             new TestCase("package test; public enum E {A;}",
   641             new TestCase("package test; public enum E {A;}",
   642                         "int integer(); boolean flag(); double value(); String string(); E enumeration(); ",
   642                         "int integer(); boolean flag(); double value(); String string(); E enumeration(); ",
   643                         "enumeration = test.E.A, integer = 42, flag = true, value = 3.5, string = \"Text\"",
   643                         "enumeration = test.E.A, integer = 42, flag = true, value = 3.5, string = \"Text\"",
   644                         "@test.A(enumeration=test.E.A, integer=42, flag=true, value=3.5, string=\"Text\")"),
   644                         "@test.A(enumeration=A, integer=42, flag=true, value=3.5, string=\"Text\")"),
   645         };
   645         };
   646 
   646 
   647         Path extraSrc = base.resolve("extra-src");
   647         Path extraSrc = base.resolve("extra-src");
   648         tb.writeJavaFiles(extraSrc,
   648         tb.writeJavaFiles(extraSrc,
   649                           "class Any {}");
   649                           "class Any {}");