Disable TestHasApps.
[SquirrelJME.git] / modules / midp-lcdui / src / test / java / lcdui / canvas / TestCanvasStandardKeyCodes.java
blobe8fb102abaa1bd1dd1ba58d34c4eaeda8b42c505
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.canvas;
12 import javax.microedition.lcdui.Canvas;
13 import javax.microedition.lcdui.Display;
15 /**
16 * Tests that the standard key codes do in fact map to game keys.
18 * @since 2020/08/02
20 public class TestCanvasStandardKeyCodes
21 extends BaseCanvas
23 /**
24 * {@inheritDoc}
25 * @since 2020/08/02
27 @Override
28 public void test(Display __display, CanvasPlatform __platform)
30 // Set bits within the mask
31 long gameKeyMask = 0;
32 for (int i = Canvas.KEY_SELECT; i <= Canvas.KEY_DELETE; i++)
33 try
35 int gameKey = __platform.getGameAction(i);
37 if (gameKey <= 0)
38 continue;
40 gameKeyMask |= (1 << gameKey);
42 catch (IllegalArgumentException ignored)
46 // There should have been all the game keys in this
47 this.secondary("mask", gameKeyMask);