Disable TestHasApps.
[SquirrelJME.git] / modules / midp-lcdui / src / test / java / lcdui / display / TestCallSerially.java
blob6048f1002b2f0c19f0422cb2749ce40d3cc01821
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 lcdui.display;
12 import javax.microedition.lcdui.Display;
13 import lcdui.BaseDisplay;
14 import net.multiphasicapps.tac.OptionalFirstParameter;
16 /**
17 * Tests that serial calls happen properly.
19 * @since 2020/10/03
21 public class TestCallSerially
22 extends BaseDisplay
23 implements OptionalFirstParameter
25 /**
26 * {@inheritDoc}
27 * @since 2020/10/03
29 @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
30 @Override
31 public void test(Display __display, String __param)
33 __SerialRun__ run = new __SerialRun__();
35 // This call should run the code then wait for it to be completed
36 __display.callSerially(run);
38 // Then get the result of that, should be true
39 for (;;)
40 synchronized (run)
42 if (!run._flag)
43 try
45 run.wait(5000);
46 continue;
48 catch (InterruptedException ignored)
50 return;
53 this.secondary("flagged", run._flag);
54 break;