langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerBasicTest.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 |
55 "ExpectedBase", |
55 "ExpectedBase", |
56 "ExpectedContainer" |
56 "ExpectedContainer" |
57 }) |
57 }) |
58 @ExpectedContainer( |
58 @ExpectedContainer( |
59 value = BarContainer.class, |
59 value = BarContainer.class, |
60 getAnnotation = "@BarContainer(value=[@Bar(value=1), @Bar(value=2)])", |
60 getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})", |
61 getAnnotationsByType = {"@BarContainer(value=[@Bar(value=1), @Bar(value=2)])"}) |
61 getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"}) |
62 @Bar(value = 0) |
62 @Bar(value = 0) |
63 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
63 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
64 class MixRepeatableAndOfficialContainerBasicTest { |
64 class MixRepeatableAndOfficialContainerBasicTest { |
65 |
65 |
66 @ExpectedBase( |
66 @ExpectedBase( |
83 "ExpectedBase", |
83 "ExpectedBase", |
84 "ExpectedContainer" |
84 "ExpectedContainer" |
85 }) |
85 }) |
86 @ExpectedContainer( |
86 @ExpectedContainer( |
87 value = BarContainer.class, |
87 value = BarContainer.class, |
88 getAnnotation = "@BarContainer(value=[@Bar(value=1), @Bar(value=2)])", |
88 getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})", |
89 getAnnotationsByType = {"@BarContainer(value=[@Bar(value=1), @Bar(value=2)])"}) |
89 getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"}) |
90 @Bar(value = 0) |
90 @Bar(value = 0) |
91 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
91 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
92 int testField = 0; |
92 int testField = 0; |
93 |
93 |
94 @ExpectedBase( |
94 @ExpectedBase( |
111 "ExpectedBase", |
111 "ExpectedBase", |
112 "ExpectedContainer" |
112 "ExpectedContainer" |
113 }) |
113 }) |
114 @ExpectedContainer( |
114 @ExpectedContainer( |
115 value = BarContainer.class, |
115 value = BarContainer.class, |
116 getAnnotation = "@BarContainer(value=[@Bar(value=1), @Bar(value=2)])", |
116 getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})", |
117 getAnnotationsByType = {"@BarContainer(value=[@Bar(value=1), @Bar(value=2)])"}) |
117 getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"}) |
118 @Bar(value = 0) |
118 @Bar(value = 0) |
119 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
119 @BarContainer(value = {@Bar(value = 1), @Bar(value = 2)}) |
120 void testMethod() {} |
120 void testMethod() {} |
121 } |
121 } |