< prev index next >

test/hotspot/gtest/oops/test_typeArrayOop.cpp

Print this page
*** 34,11 ***
    memset(mem, 0, ARRAY_SIZE(mem));
  
    char* addr = align_up(mem, 16);
  
    typeArrayOop o = (typeArrayOop) cast_to_oop(addr);
!   o->set_klass(Universe::boolArrayKlassObj());
    o->set_length(10);
  
  
    ASSERT_EQ((jboolean)0, o->bool_at(0));
    ASSERT_EQ((jboolean)0, o->bool_at(1));
--- 34,15 ---
    memset(mem, 0, ARRAY_SIZE(mem));
  
    char* addr = align_up(mem, 16);
  
    typeArrayOop o = (typeArrayOop) cast_to_oop(addr);
!   if (UseCompactObjectHeaders) {
+     o->set_mark(Universe::boolArrayKlassObj()->prototype_header());
+   } else {
+     o->set_klass(Universe::boolArrayKlassObj());
+   }
    o->set_length(10);
  
  
    ASSERT_EQ((jboolean)0, o->bool_at(0));
    ASSERT_EQ((jboolean)0, o->bool_at(1));
< prev index next >