\r
@Override\r
public void create () {\r
- font = new BitmapFont();\r
+ font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false);\r
batch = new SpriteBatch();\r
\r
if (Gdx.files.isExternalStorageAvailable()) {\r
}\r
\r
private void testClasspath () throws IOException {\r
+ // no classpath support on ios\r
+ if(Gdx.app.getType() == ApplicationType.iOS) return;\r
FileHandle handle = Gdx.files.classpath("com/badlogic/gdx/utils/arial-15.png");\r
if (!handle.exists()) fail();\r
if (handle.isDirectory()) fail();\r
\r
private void testInternal () throws IOException {\r
FileHandle handle = Gdx.files.internal("data/badlogic.jpg");\r
- if (!handle.exists()) fail();\r
- if (handle.isDirectory()) fail();\r
+ if (!handle.exists()) fail("Couldn't find internal file");\r
+ if (handle.isDirectory()) fail("Internal file shouldn't be a directory");\r
try {\r
handle.delete();\r
- fail();\r
+ fail("Shouldn't be able to delete internal file");\r
} catch (Exception expected) {\r
}\r
- if (handle.list().length != 0) fail();\r
+ if (handle.list().length != 0) fail("File length shouldn't be 0");\r
if (Gdx.app.getType() != ApplicationType.Android) {\r
- if (!handle.parent().exists()) fail();\r
+ if (!handle.parent().exists()) fail("Parent doesn't exist");\r
}\r
try {\r
handle.read().close();\r
} catch (Exception ignored) {\r
}\r
FileHandle dir;\r
- if (Gdx.app.getType() == ApplicationType.Android)\r
+ if (Gdx.app.getType() == ApplicationType.Android || Gdx.app.getType() == ApplicationType.iOS)\r
dir = Gdx.files.internal("data");\r
else\r
dir = Gdx.files.internal("../gdx-tests-android/assets/data");\r
private void fail () {\r
throw new RuntimeException();\r
}\r
+ \r
+ private void fail(String msg) {\r
+ throw new RuntimeException(msg);\r
+ }\r
\r
@Override\r
public void render () {\r