OSDN Git Service

Add missing import
[mikumikustudio/libgdx-mikumikustudio.git] / tests / gdx-tests / src / com / badlogic / gdx / tests / utils / GdxTests.java
1 /*******************************************************************************\r
2  * Copyright 2011 See AUTHORS file.\r
3  * \r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  * \r
8  *   http://www.apache.org/licenses/LICENSE-2.0\r
9  * \r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  ******************************************************************************/\r
16 /*\r
17  * Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)\r
18  * \r
19  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the\r
20  * License. You may obtain a copy of the License at\r
21  * \r
22  * http://www.apache.org/licenses/LICENSE-2.0\r
23  * \r
24  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"\r
25  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language\r
26  * governing permissions and limitations under the License.\r
27  */\r
28 \r
29 package com.badlogic.gdx.tests.utils;\r
30 \r
31 import java.util.ArrayList;\r
32 import java.util.Arrays;\r
33 import java.util.Collections;\r
34 import java.util.List;\r
35 \r
36 import com.badlogic.gdx.tests.*;\r
37 import com.badlogic.gdx.tests.bench.TiledMapBench;\r
38 import com.badlogic.gdx.tests.examples.MoveSpriteExample;\r
39 import com.badlogic.gdx.tests.g3d.Animation3DTest;\r
40 import com.badlogic.gdx.tests.g3d.Basic3DSceneTest;\r
41 import com.badlogic.gdx.tests.g3d.Basic3DTest;\r
42 import com.badlogic.gdx.tests.g3d.FogTest;\r
43 import com.badlogic.gdx.tests.g3d.MaterialTest;\r
44 import com.badlogic.gdx.tests.g3d.ModelTest;\r
45 import com.badlogic.gdx.tests.g3d.ShaderTest;\r
46 import com.badlogic.gdx.tests.g3d.SkeletonTest;\r
47 import com.badlogic.gdx.tests.gles2.HelloTriangle;\r
48 import com.badlogic.gdx.tests.gles2.SimpleVertexShader;\r
49 import com.badlogic.gdx.tests.net.NetAPITest;\r
50 import com.badlogic.gdx.tests.superkoalio.SuperKoalio;\r
51 \r
52 /** List of GdxTest classes. To be used by the test launchers. If you write your own test, add it in here!\r
53  * \r
54  * @author badlogicgames@gmail.com */\r
55 public class GdxTests {\r
56         public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(\r
57                 AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, LetterBoxTest3.class,\r
58                 GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class,\r
59                 AudioDeviceTest.class, AudioRecorderTest.class, BitmapFontAlignmentTest.class, BitmapFontDistanceFieldTest.class, BitmapFontFlipTest.class,\r
60                 GroupCullingTest.class, GestureDetectorTest.class, LabelTest.class, BitmapFontMetricsTest.class, BlitTest.class, TableTest.class,\r
61                 BobTest.class, ImageScaleTest.class, TableLayoutTest.class, Box2DTest.class, BulletTestCollection.class, InterpolationTest.class, TouchpadTest.class,\r
62                 Box2DTestCollection.class, BufferUtilsTest.class, ImageTest.class, CompassTest.class, ComplexActionTest.class,\r
63                 CullTest.class, DeltaTimeTest.class, EdgeDetectionTest.class, ETC1Test.class, ExitTest.class, FilesTest.class,\r
64                 ScrollPaneTest.class, FloatTest.class, FloatTextureTest.class, FrameBufferTest.class, FramebufferToTextureTest.class, FrustumTest.class,\r
65                 FullscreenTest.class, Gdx2DTest.class, GroupFadeTest.class, ImmediateModeRendererTest.class, Scene2dTest.class,\r
66                 ImmediateModeRendererAlphaTest.class, IndexBufferObjectClassTest.class, TreeTest.class, IndexBufferObjectShaderTest.class,\r
67                 InputTest.class, IntegerBitmapFontTest.class, InverseKinematicsTest.class, IsoCamTest.class, IsometricTileTest.class,\r
68                 KinematicBodyTest.class, LifeCycleTest.class, LineDrawingTest.class, ScrollPane2Test.class, ManagedTest.class,\r
69                 ManualBindTest.class, MaterialTest.class, MatrixJNITest.class, MeshMultitextureTest.class, MeshShaderTest.class, MeshTest.class,\r
70                 MipMapTest.class, MultitouchTest.class, MusicTest.class, MyFirstTriangle.class, ObjTest.class, OnscreenKeyboardTest.class,\r
71                 OrthoCamBorderTest.class, ParallaxTest.class, ParticleEmitterTest.class, PickingTest.class, PixelsPerInchTest.class,\r
72                 PixmapBlendingTest.class, PixmapTest.class, PixmapPackerTest.class, PolygonRegionTest.class, PolygonSpriteTest.class, PreferencesTest.class,\r
73                 ProjectiveTextureTest.class, Pong.class, ProjectTest.class, RemoteTest.class, RotationTest.class, DragAndDropTest.class,\r
74                 ShaderMultitextureTest.class, ShadowMappingTest.class, PathTest.class, SimpleAnimationTest.class, SimpleDecalTest.class,\r
75                 SimpleStageCullingTest.class, SoundTest.class, SpriteCacheTest.class, SpriteCacheOffsetTest.class, LetterBoxTest1.class,\r
76                 SpriteBatchRotationTest.class, SpriteBatchShaderTest.class, SpriteBatchTest.class, SpritePerformanceTest.class,\r
77                 SpritePerformanceTest2.class, StagePerformanceTest.class, StageTest.class, TerrainTest.class, TextureDataTest.class,\r
78                 TextureDownloadTest.class, TextureFormatTest.class, TextureAtlasTest.class, TextInputDialogTest.class,\r
79                 TextureRenderTest.class, TileTest.class, UITest.class, VBOVATest.class, VertexArrayTest.class,\r
80                 VertexBufferObjectTest.class, VertexArrayClassTest.class, VertexBufferObjectClassTest.class, LetterBoxTest2.class,\r
81                 VertexBufferObjectShaderTest.class, VibratorTest.class, WaterRipples.class, HelloTriangle.class,\r
82                 SimpleVertexShader.class, ShapeRendererTest.class, MoveSpriteExample.class, UISimpleTest.class,\r
83                 // SoundTouchTest.class, Mpg123Test.class, WavTest.class, FreeTypeTest.class,\r
84                 // InternationalFontsTest.class, VorbisTest.class\r
85                 TextButtonTest.class, TextButtonTestGL2.class, TextureBindTest.class, SortedSpriteTest.class,\r
86                 ExternalMusicTest.class, SoftKeyboardTest.class, DirtyRenderingTest.class, YDownTest.class,\r
87                 ScreenCaptureTest.class, BitmapFontTest.class, LabelScaleTest.class, GamepadTest.class, NetAPITest.class, TideMapAssetManagerTest.class, TideMapDirectLoaderTest.class, TiledMapAssetManagerTest.class, TiledMapBench.class,\r
88                 RunnablePostTest.class, Vector2dTest.class, SuperKoalio.class, NinePatchTest.class, Basic3DSceneTest.class, Animation3DTest.class,\r
89                 ModelTest.class, Basic3DTest.class, ShaderTest.class, SkeletonTest.class, HexagonalTiledMapTest.class, FogTest.class));\r
90         \r
91         public static List<String> getNames () {\r
92                 List<String> names = new ArrayList<String>(tests.size());\r
93                 for (Class clazz : tests)\r
94                         names.add(clazz.getSimpleName());\r
95                 Collections.sort(names);\r
96                 return names;\r
97         }\r
98 \r
99         private static Class<? extends GdxTest> forName (String name)\r
100         {\r
101                 for (Class clazz : tests)\r
102                         if (clazz.getSimpleName().equals(name))\r
103                                 return clazz;\r
104                 return null;\r
105         }\r
106 \r
107         public static GdxTest newTest (String testName) {\r
108                 try {\r
109                         return forName(testName).newInstance();\r
110                 } catch (InstantiationException e) {\r
111                         e.printStackTrace();\r
112                 } catch (IllegalAccessException e) {\r
113                         e.printStackTrace();\r
114                 }\r
115                 return null;\r
116         }\r
117 }\r