1 21 package com.db4o.test.legacy; 22 23 import com.db4o.foundation.*; 24 import com.db4o.test.*; 25 26 public class TypedArrayInObject { 27 28 public Object obj; 29 public Object [] obj2; 30 31 public void store(){ 32 Test.deleteAllInstances(this); 33 TypedArrayInObject taio = new TypedArrayInObject(); 34 Atom[] mols = new Atom[1]; 35 mols[0] = new Atom("TypedArrayInObject"); 36 taio.obj = mols; 37 taio.obj2 = mols; 38 Test.store(taio); 39 } 40 41 public void test(){ 42 Test.forEach(new TypedArrayInObject(), new Visitor4() { 43 public void visit(Object a_obj) { 44 TypedArrayInObject taio = (TypedArrayInObject)a_obj; 45 Test.ensure(taio.obj instanceof Atom[]); 46 Test.ensure(taio.obj2 instanceof Atom[]); 47 48 } 49 }); 50 } 51 } 52 | Popular Tags |