Revert StaticDisplayState; For hosted only allow debug to be used.
[SquirrelJME.git] / modules / midp-lcdui / src / test / java / font / TestFont.java
bloba22e79a66d5a7071695279ec4a8473d87cdeb5d1
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 font;
12 import cc.squirreljme.runtime.lcdui.font.SQFFont;
13 import java.io.InputStream;
14 import net.multiphasicapps.tac.TestRunnable;
16 /**
17 * Tests that the fonts load.
19 * @since 2018/11/25
21 public class TestFont
22 extends TestRunnable
24 /** The fonts to test reading. */
25 private static final String[] _FONTS =
27 "monospace-8.sqf",
28 "monospace-12.sqf",
29 "monospace-16.sqf",
30 "sansserif-8.sqf",
31 "sansserif-12.sqf",
32 "sansserif-16.sqf",
33 "serif-8.sqf",
34 "serif-12.sqf",
35 "serif-16.sqf",
38 /**
39 * {@inheritDoc}
40 * @since 2018/11/25
42 @Override
43 public void test()
45 for (String s : _FONTS)
46 try (InputStream in = SQFFont.class.getResourceAsStream(s))
48 // Try to read
49 SQFFont f = SQFFont.read(in);
51 // Did read
52 this.secondary(s, true);
54 catch (Throwable t)
56 this.secondary(s, t);
58 t.printStackTrace();