1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
12 import cc
.squirreljme
.jvm
.mle
.brackets
.UIDisplayBracket
;
13 import cc
.squirreljme
.jvm
.mle
.brackets
.UIFormBracket
;
14 import cc
.squirreljme
.jvm
.mle
.brackets
.UIItemBracket
;
15 import cc
.squirreljme
.jvm
.mle
.constants
.UIItemType
;
16 import cc
.squirreljme
.runtime
.lcdui
.mle
.UIBackend
;
19 * Tests that the item on the form is the item of the given form.
23 public class TestItemFormOwner
31 protected void test(UIBackend __backend
, UIDisplayBracket __display
,
35 UIItemBracket item
= __backend
.itemNew(UIItemType
.BUTTON
);
37 // Should not be on the form
38 this.secondary("first-null",
39 null == __backend
.itemForm(item
));
41 // Placing it on the form, it should point to that form
42 __backend
.formItemPosition(__form
, item
, 0);
43 this.secondary("set-matches",
44 __backend
.equals(__form
, __backend
.itemForm(item
)));
46 // Replacing the item should make it go away
47 UIItemBracket rep
= __backend
.itemNew(UIItemType
.LABEL
);
48 __backend
.formItemPosition(__form
, rep
, 0);
49 this.secondary("replace-null",
50 null == __backend
.itemForm(item
));