langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableBasicTest.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 @Bar(value = 1) |
58 @Bar(value = 1) |
59 @Bar(value = 2) |
59 @Bar(value = 2) |
60 class RepeatableBasicTest { |
60 class RepeatableBasicTest { |
61 |
61 |
62 @ExpectedBase( |
62 @ExpectedBase( |
76 "ExpectedBase", |
76 "ExpectedBase", |
77 "ExpectedContainer" |
77 "ExpectedContainer" |
78 }) |
78 }) |
79 @ExpectedContainer( |
79 @ExpectedContainer( |
80 value = BarContainer.class, |
80 value = BarContainer.class, |
81 getAnnotation = "@BarContainer(value=[@Bar(value=1), @Bar(value=2)])", |
81 getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})", |
82 getAnnotationsByType = {"@BarContainer(value=[@Bar(value=1), @Bar(value=2)])"}) |
82 getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"}) |
83 @Bar(value = 1) |
83 @Bar(value = 1) |
84 @Bar(value = 2) |
84 @Bar(value = 2) |
85 int testField = 0; |
85 int testField = 0; |
86 |
86 |
87 @ExpectedBase( |
87 @ExpectedBase( |
101 "ExpectedBase", |
101 "ExpectedBase", |
102 "ExpectedContainer" |
102 "ExpectedContainer" |
103 }) |
103 }) |
104 @ExpectedContainer( |
104 @ExpectedContainer( |
105 value = BarContainer.class, |
105 value = BarContainer.class, |
106 getAnnotation = "@BarContainer(value=[@Bar(value=1), @Bar(value=2)])", |
106 getAnnotation = "@BarContainer(value={@Bar(value=1), @Bar(value=2)})", |
107 getAnnotationsByType = {"@BarContainer(value=[@Bar(value=1), @Bar(value=2)])"}) |
107 getAnnotationsByType = {"@BarContainer(value={@Bar(value=1), @Bar(value=2)})"}) |
108 @Bar(value = 1) |
108 @Bar(value = 1) |
109 @Bar(value = 2) |
109 @Bar(value = 2) |
110 void testMethod() {} |
110 void testMethod() {} |
111 } |
111 } |