[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-type-annotations-dev
Subject:    Re: "failures" tests don't necessarily test type annotations
From:       Werner Dietl <wdietl () gmail ! com>
Date:       2013-02-06 20:11:31
Message-ID: CAJYRO=6HjrfKatejzS9Okst+cvSCVq0UFYheWFSNSTvhgEDaBw () mail ! gmail ! com
[Download RAW message or body]

Hi Steve,

thanks for noticing this issue! Yes, the default changed at some point
and maybe not all tests were adapted to this. I probably only
investigated failing tests and updated them.

I just pushed the fix for VoidGenericMethod. Notice how a declaration
annotation wasn't allowed in that particular location, so the test
failed as expected. I moved the annotation to where a declaration
annotation would be legal, to make the distinction clearer. But you
might want to refactor the test to use an expected output file.

Please feel free to update this in other tests or point me to them.

cu, WMD.


On Wed, Feb 6, 2013 at 12:15 PM, Steve Sides <steve.sides@oracle.com> wrote:
> I (just now) noticed that many of the tests in typeAnnotations/failures use
> jdk7 target set and not TYPE_USE.
>
> /*
>  * @test
>  * @bug 6843077 8006775
>  * @summary test type annotation on void generic methods
>  * @author Mahmood Ali
>  * @compile/fail VoidGenericMethod.java
>  */
> class VoidGenericMethod {
>   public <T> @A void method() { }
> }
>
> @interface A { }
>
>
> For instance, the above from VoidGenericMethod.java says it tests "type
> annotation on void generic methods" but tests a regular annotation.
> I'm guessing these tests were written for a build in which TYPE_USE (and
> TYPE_PARAMETER) were included in the default set(???).
>
> @Target(TYPE_USE)
> @interface A { }
>
> So these don't really test negative uses of  type annotations but regular
> uses.
> Shouldn't these be corrected to use type annotations?
>
> -steve



-- 
http://www.google.com/profiles/wdietl
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic