01: /* Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com
02:
03: This file is part of the db4o open source object database.
04:
05: db4o is free software; you can redistribute it and/or modify it under
06: the terms of version 2 of the GNU General Public License as published
07: by the Free Software Foundation and as clarified by db4objects' GPL
08: interpretation policy, available at
09: http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
10: Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
11: Suite 350, San Mateo, CA 94403, USA.
12:
13: db4o is distributed in the hope that it will be useful, but WITHOUT ANY
14: WARRANTY; without even the implied warranty of MERCHANTABILITY or
15: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16: for more details.
17:
18: You should have received a copy of the GNU General Public License along
19: with this program; if not, write to the Free Software Foundation, Inc.,
20: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21: package com.db4o.test.legacy;
22:
23: import com.db4o.test.*;
24:
25: public class ArrayNOrder {
26:
27: public String[][][] s1;
28: public Object[][] o1;
29:
30: public void store() {
31: Test.deleteAllInstances(this );
32: s1 = new String[2][2][3];
33: s1[0][0][0] = "000";
34: s1[0][0][1] = "001";
35: s1[0][0][2] = "002";
36: s1[0][1][0] = "010";
37: s1[0][1][1] = "011";
38: s1[0][1][2] = "012";
39: s1[1][0][0] = "100";
40: s1[1][0][1] = "101";
41: s1[1][0][2] = "102";
42: s1[1][1][0] = "110";
43: s1[1][1][1] = "111";
44: s1[1][1][2] = "112";
45:
46: o1 = new Object[2][2];
47: o1[0][0] = new Integer(0);
48: o1[0][1] = "01";
49: o1[1][0] = new Float(10);
50: o1[1][1] = new Double(1.1);
51: Test.store(this );
52: }
53:
54: public void test() {
55: ArrayNOrder ano = (ArrayNOrder) Test.getOne(this );
56: ano.check();
57: }
58:
59: public void check() {
60: Test.ensure(s1[0][0][0].equals("000"));
61: Test.ensure(s1[0][0][1].equals("001"));
62: Test.ensure(s1[0][0][2].equals("002"));
63: Test.ensure(s1[0][1][0].equals("010"));
64: Test.ensure(s1[0][1][1].equals("011"));
65: Test.ensure(s1[0][1][2].equals("012"));
66: Test.ensure(s1[1][0][0].equals("100"));
67: Test.ensure(s1[1][0][1].equals("101"));
68: Test.ensure(s1[1][0][2].equals("102"));
69: Test.ensure(s1[1][1][0].equals("110"));
70: Test.ensure(s1[1][1][1].equals("111"));
71: Test.ensure(s1[1][1][2].equals("112"));
72: Test.ensure(o1[0][0].equals(new Integer(0)));
73: Test.ensure(o1[0][1].equals("01"));
74: Test.ensure(o1[1][0].equals(new Float(10)));
75: Test.ensure(o1[1][1].equals(new Double(1.1)));
76: }
77:
78: }
|