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 Mozilla Public License Version 2.0.
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
.jvm
.mle
.exceptions
.MLECallError
;
17 import cc
.squirreljme
.runtime
.lcdui
.mle
.UIBackend
;
20 * Tests that items cannot be used after deletion.
24 public class TestUseItemAfterDelete
32 protected void test(UIBackend __backend
, UIDisplayBracket __display
,
36 UIItemBracket item
= __backend
.itemNew(UIItemType
.BUTTON
);
38 // Quickly delete it so it is not valid
39 __backend
.itemDelete(item
);
41 // Attempt to place it on the form
44 __backend
.formItemPosition(__form
, item
, 0);
46 catch (MLECallError e
)
48 throw new FormTestException(e
);