Revert StaticDisplayState; For hosted only allow debug to be used.
[SquirrelJME.git] / modules / midp-lcdui / src / test / java / mleui / forms / TestDeleteVisibleItem.java
blob46be7ef17be7464eeb5b548b02c3d5bc7864ccf4
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 GNU General Public License v3+, or later.
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 * Checks that deleting visible items fails.
22 * @since 2020/07/19
24 public class TestDeleteVisibleItem
25 extends BaseUIForm
27 /**
28 * {@inheritDoc}
29 * @since 2020/07/19
31 @Override
32 protected void test(UIBackend __backend, UIDisplayBracket __display,
33 UIFormBracket __form)
34 throws Throwable
36 // Create the item and make it visible on the form
37 UIItemBracket item = __backend.itemNew(UIItemType.BUTTON);
38 __backend.formItemPosition(__form, item, 0);
40 // Attempt to delete the item
41 try
43 __backend.itemDelete(item);
45 catch (MLECallError e)
47 throw new FormTestException(e);