* Ensures that we properly handle primitive value attributes on annotations.
* (Special-cased, because of how JDT handles char/numeric literals)
*/
public void testPrimitiveValuesAnnotations() throws NotFoundException {
JClassType primitivesAnnotatedClass = typeOracle.getType(PrimitivesAnnotatedClass.class.getName());
PrimitiveValuesAnnotation annotation = primitivesAnnotatedClass.getAnnotation(PrimitiveValuesAnnotation.class);
boolean bool = annotation.bool();
assertTrue(bool);
byte b = annotation.b();
assertTrue(b > 0);
char c = annotation.c();
assertTrue(c > 0);
double d = annotation.d();
assertTrue(d > 0);
float f = annotation.f();
assertTrue(f > 0);
int i = annotation.i();
assertTrue(i > 0);
long l = annotation.l();
assertTrue(l > 0);
short s = annotation.s();
assertTrue(s > 0);
int[] ia = annotation.ia();
assertEquals(3, ia.length);
for (int it = 0; it < 3; ++it) {
assertEquals(it, ia[it]);
}
}