comparison jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java @ 23373:802821d82a92

Rename isAllocationCloneable to isCloneableWithAllocation
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 03 May 2016 08:45:04 -0700
parents 45168ac6d3bc
children acae988d96ad
comparison
equal deleted inserted replaced
23372:1c7bac3f1f20 23373:802821d82a92
848 return new TrivialCloneable(); 848 return new TrivialCloneable();
849 } 849 }
850 } 850 }
851 851
852 @Test 852 @Test
853 public void isAllocationCloneableTest() { 853 public void isCloneableWithAllocationTest() {
854 ResolvedJavaType cloneable = metaAccess.lookupJavaType(Cloneable.class); 854 ResolvedJavaType cloneable = metaAccess.lookupJavaType(Cloneable.class);
855 for (Class<?> c : classes) { 855 for (Class<?> c : classes) {
856 ResolvedJavaType type = metaAccess.lookupJavaType(c); 856 ResolvedJavaType type = metaAccess.lookupJavaType(c);
857 if (type.isAllocationCloneable()) { 857 if (type.isCloneableWithAllocation()) {
858 // Only Cloneable types should be allocation cloneable 858 // Only Cloneable types should be allocation cloneable
859 assertTrue(c.toString(), cloneable.isAssignableFrom(type)); 859 assertTrue(c.toString(), cloneable.isAssignableFrom(type));
860 } 860 }
861 } 861 }
862 /* 862 /*
863 * We can't know for sure which types should be allocation cloneable on a particular 863 * We can't know for sure which types should be allocation cloneable on a particular
864 * platform but assume that at least totally trivial objects should be. 864 * platform but assume that at least totally trivial objects should be.
865 */ 865 */
866 ResolvedJavaType trivialCloneable = metaAccess.lookupJavaType(TrivialCloneable.class); 866 ResolvedJavaType trivialCloneable = metaAccess.lookupJavaType(TrivialCloneable.class);
867 assertTrue(trivialCloneable.toString(), trivialCloneable.isAllocationCloneable()); 867 assertTrue(trivialCloneable.toString(), trivialCloneable.isCloneableWithAllocation());
868 } 868 }
869 869
870 @Test 870 @Test
871 public void findMethodTest() { 871 public void findMethodTest() {
872 try { 872 try {