< prev index next >

test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java

Print this page




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
  27  * @compile TestResolvedJavaField.java FieldUniverse.java TypeUniverse.java TestMetaAccessProvider.java
  28  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaField
  29  */
  30 
  31 package jdk.vm.ci.runtime.test;
  32 
  33 import static org.junit.Assert.*;


















  34 
  35 import java.lang.annotation.*;
  36 import java.lang.reflect.*;
  37 import java.util.*;
  38 
  39 import jdk.vm.ci.meta.*;
  40 
  41 import org.junit.*;
  42 
  43 /**
  44  * Tests for {@link ResolvedJavaField}.
  45  */
  46 public class TestResolvedJavaField extends FieldUniverse {
  47 
  48     public TestResolvedJavaField() {
  49     }
  50 
  51     @Test
  52     public void getModifiersTest() {
  53         for (Map.Entry<Field, ResolvedJavaField> e : fields.entrySet()) {
  54             int expected = e.getKey().getModifiers();
  55             int actual = e.getValue().getModifiers();
  56             assertEquals(expected, actual);
  57         }
  58     }
  59 
  60     @Test
  61     public void isSyntheticTest() {




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
  27  * @compile TestResolvedJavaField.java FieldUniverse.java TypeUniverse.java TestMetaAccessProvider.java
  28  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaField
  29  */
  30 
  31 package jdk.vm.ci.runtime.test;
  32 
  33 import static org.junit.Assert.assertArrayEquals;
  34 import static org.junit.Assert.assertEquals;
  35 import static org.junit.Assert.assertFalse;
  36 import static org.junit.Assert.assertNull;
  37 import static org.junit.Assert.assertTrue;
  38 
  39 import java.lang.annotation.Annotation;
  40 import java.lang.reflect.Field;
  41 import java.lang.reflect.Method;
  42 import java.util.Arrays;
  43 import java.util.HashSet;
  44 import java.util.List;
  45 import java.util.Map;
  46 import java.util.Set;
  47 
  48 import jdk.vm.ci.meta.JavaConstant;
  49 import jdk.vm.ci.meta.LocationIdentity;
  50 import jdk.vm.ci.meta.ResolvedJavaField;
  51 import jdk.vm.ci.meta.ResolvedJavaMethod;
  52 
  53 import org.junit.Test;






  54 
  55 /**
  56  * Tests for {@link ResolvedJavaField}.
  57  */
  58 public class TestResolvedJavaField extends FieldUniverse {
  59 
  60     public TestResolvedJavaField() {
  61     }
  62 
  63     @Test
  64     public void getModifiersTest() {
  65         for (Map.Entry<Field, ResolvedJavaField> e : fields.entrySet()) {
  66             int expected = e.getKey().getModifiers();
  67             int actual = e.getValue().getModifiers();
  68             assertEquals(expected, actual);
  69         }
  70     }
  71 
  72     @Test
  73     public void isSyntheticTest() {


< prev index next >