Disable TestHasApps.
[SquirrelJME.git] / modules / midp-lcdui / src / test / java / mleui / forms / TestUseItemAfterDelete.java
blobc84b93959571fa15aeaf5e1ff34dc699ba9dd042
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
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 // ---------------------------------------------------------------------------
10 package mleui.forms;
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;
19 /**
20 * Tests that items cannot be used after deletion.
22 * @since 2020/07/19
24 public class TestUseItemAfterDelete
25 extends BaseUIForm
27 /**
28 * {@inheritDoc}
29 * @since 2020/07/19
31 @Override
32 protected void test(UIBackend __backend, UIDisplayBracket __display,
33 UIFormBracket __form)
35 // Create the item
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
42 try
44 __backend.formItemPosition(__form, item, 0);
46 catch (MLECallError e)
48 throw new FormTestException(e);