use of com.github.javaparser.resolution.types.ResolvedPrimitiveType in project javaparser by javaparser.
the class PrimitiveTypeTest method testIsAssignableByAnythingElse.
@Test
public void testIsAssignableByAnythingElse() {
for (ResolvedPrimitiveType ptu : ResolvedPrimitiveType.values()) {
assertEquals(false, ptu.isAssignableBy(OBJECT));
assertEquals(false, ptu.isAssignableBy(STRING));
assertEquals(false, ptu.isAssignableBy(NullType.INSTANCE));
assertEquals(false, ptu.isAssignableBy(ResolvedVoidType.INSTANCE));
assertEquals(false, ptu.isAssignableBy(arrayOfBooleans));
assertEquals(false, ptu.isAssignableBy(arrayOfListOfA));
}
}
use of com.github.javaparser.resolution.types.ResolvedPrimitiveType in project javaparser by javaparser.
the class PrimitiveTypeTest method testAsReferenceTypeUsage.
@Test
public void testAsReferenceTypeUsage() {
for (ResolvedPrimitiveType ptu : ResolvedPrimitiveType.values()) {
try {
ptu.asReferenceType();
fail();
} catch (UnsupportedOperationException e) {
}
}
}
use of com.github.javaparser.resolution.types.ResolvedPrimitiveType in project javaparser by javaparser.
the class PrimitiveTypeTest method testAsTypeParameter.
@Test
public void testAsTypeParameter() {
for (ResolvedPrimitiveType ptu : ResolvedPrimitiveType.values()) {
try {
ptu.asTypeParameter();
fail();
} catch (UnsupportedOperationException e) {
}
}
}
use of com.github.javaparser.resolution.types.ResolvedPrimitiveType in project javaparser by javaparser.
the class PrimitiveTypeTest method testAsArrayTypeUsage.
@Test
public void testAsArrayTypeUsage() {
for (ResolvedPrimitiveType ptu : ResolvedPrimitiveType.values()) {
try {
ptu.asArrayType();
fail();
} catch (UnsupportedOperationException e) {
}
}
}
Aggregations