new tests in type-annotations repo

Steve Sides steve.sides at oracle.com
Fri Aug 30 11:33:48 PDT 2013


I may be wrong but I think these were meant to test type annotations. At 
the time these were written I think what we now know as TYPE_USE was 
assumed to be part of the default set of elements which could be 
annotated, and tests were to ensure that type annotations implementation 
did not cause annotations to be accepted where they shouldn't.  That 
obviously has since changed and now type annotations must be explicitly 
targeted to TYPE_USE.  So.... (I assumed) that these tests should check 
that type annotations are not accepted where they shouldn't be.
I think in keeping with what these were meant to test and testing type 
annotations, they should be okay.

Some tests could additionally use regular annotations, but some of the 
test cases are such that it may not be so clear that the type annotation 
alone is causing the errors and we'd need a second test.  I checked the 
neg test for annotations (annotations/neg) and there are just a few the 
check misplacement of annotations, so that argument can be made to 
increase that type of testing.

Also, the changeset was made against jdk8-tl and the tests pass there, 
so it could go there also.

-steve

On 8/30/2013 10:51 AM, Werner Dietl wrote:
> Steve,
>
> did you see my reply to that message:
>
> http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-August/001183.html
>
> What do you think? If you're happy with your changes I can push them
> to type-annotations.
>
> cu, WMD.
>
>
> On Fri, Aug 30, 2013 at 10:15 AM, Steve Sides<steve.sides at oracle.com>  wrote:
>> On 8/30/2013 9:36 AM, Steve Sides wrote:
>>> If there are to be no changes,
>>> http://bugs.sun.com/view_bug.do?bug_id=8006733 should be either marked as
>>> "fixed" (settled) or not an issue.
>>>
>>> And, I have changes for the test for this (and others) as noted in this
>>> mail,
>>>
>>> http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-August/001182.html
>>> The changes update the tests to use TYPE_USE in negative tests. This case
>>> was one of those.
>> FWIW, I just ran these changes with the latest build of jdk8 and they all
>> still pass.
>> So, if things are settled and the changes are okay,  I suppose they could go
>> into jdk8-tl.
>>
>> -steve
>>
>>> -steve
>>>
>>> On 8/21/2013 6:24 PM, Alex Buckley wrote:
>>>> To cut to the chase, the EG isn't going to change anything. Mike is due
>>>> to send a mail about this next week.
>>>>
>>>> Alex
>>>>
>>>> On 8/21/2013 5:57 PM, Werner Dietl wrote:
>>>>> Jon, all,
>>>>>
>>>>>> I'm trying to merge type-annotations up into tl.
>>>>>
>>>>> Great! Do let me know if there is anything I can do.
>>>>>
>>>>>
>>>>>> I see two new tests, which are failing:
>>>>>>
>>>>>> A
>>>>>>
>>>>>> langtools/test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java
>>>>>
>>>>> Quoting from my June 19, 2013 message
>>>>>
>>>>> (http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-June/001085.html):
>>>>>
>>>>> ===
>>>>> I will not push my updates until the EG decided the desired behavior.
>>>>>
>>>>> Failing tests T8008762.java and TestAnonInnerClasses.java are waiting
>>>>> on this discussion:
>>>>>
>>>>> http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-April/000782.html
>>>>>
>>>>> There are some refactorings of the Annotations code in the pipeline
>>>>> and I suggest we look at these issues again after those refactorings.
>>>>> ===
>>>>>
>>>>> I don't know what the schedule of the EG and the larger annotation
>>>>> refactorings are.
>>>>>
>>>>>
>>>>>> A
>>>>>>
>>>>>> langtools/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableMissingTA.java
>>>>>
>>>>> I added this test for:
>>>>>
>>>>> http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-July/001130.html
>>>>> I didn't get to implement the larger refactoring suggested by Joel.
>>>>> Should I add a simple fix to make the test pass?
>>>>>
>>>>> cu, WMD.
>>>>>
>
>



More information about the type-annotations-dev mailing list