langtools/test/tools/javac/processing/model/element/repeatingAnnotations/OfficialContainerBasicTest.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2016, 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. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 8004822 |
26 * @bug 8004822 8163113 |
27 * @author mnunez |
27 * @author mnunez |
28 * @summary Language model api test basics for repeating annotations |
28 * @summary Language model api test basics for repeating annotations |
29 * @library /tools/javac/lib |
29 * @library /tools/javac/lib |
30 * @library supportingAnnotations |
30 * @library supportingAnnotations |
31 * @modules java.compiler |
31 * @modules java.compiler |
51 "ExpectedBase", |
51 "ExpectedBase", |
52 "ExpectedContainer" |
52 "ExpectedContainer" |
53 }) |
53 }) |
54 @ExpectedContainer( |
54 @ExpectedContainer( |
55 value = BarContainer.class, |
55 value = BarContainer.class, |
56 getAnnotation = "@BarContainer(value=[@Bar(value=1), @Bar(value=2)])", |
56 getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})", |
57 getAnnotationsByType = {"@BarContainer(value=[@Bar(value=1), @Bar(value=2)])"}) |
57 getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"}) |
58 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
58 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
59 class OfficialContainerBasicTest { |
59 class OfficialContainerBasicTest { |
60 |
60 |
61 @ExpectedBase( |
61 @ExpectedBase( |
62 value = Bar.class, |
62 value = Bar.class, |
75 "ExpectedBase", |
75 "ExpectedBase", |
76 "ExpectedContainer" |
76 "ExpectedContainer" |
77 }) |
77 }) |
78 @ExpectedContainer( |
78 @ExpectedContainer( |
79 value = BarContainer.class, |
79 value = BarContainer.class, |
80 getAnnotation = "@BarContainer(value=[@Bar(value=1), @Bar(value=2)])", |
80 getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})", |
81 getAnnotationsByType = {"@BarContainer(value=[@Bar(value=1), @Bar(value=2)])"}) |
81 getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"}) |
82 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
82 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
83 int testField = 0; |
83 int testField = 0; |
84 |
84 |
85 @ExpectedBase( |
85 @ExpectedBase( |
86 value = Bar.class, |
86 value = Bar.class, |
99 "ExpectedBase", |
99 "ExpectedBase", |
100 "ExpectedContainer" |
100 "ExpectedContainer" |
101 }) |
101 }) |
102 @ExpectedContainer( |
102 @ExpectedContainer( |
103 value = BarContainer.class, |
103 value = BarContainer.class, |
104 getAnnotation = "@BarContainer(value=[@Bar(value=1), @Bar(value=2)])", |
104 getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})", |
105 getAnnotationsByType = {"@BarContainer(value=[@Bar(value=1), @Bar(value=2)])"}) |
105 getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"}) |
106 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
106 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
107 void testMethod() {} |
107 void testMethod() {} |
108 } |
108 } |