From 6d27155e864e9b267a46e35c23b43bb0c9970669 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Sat, 2 Apr 2011 08:45:55 +0000 Subject: [PATCH] Fixed tests that use wildHouse.zip so that the loading append in the simple init and not in the main, because it fails since the testChooser change On a side note the wildhouse.zip in the download section is not the same as the one in the test package, and fails to load due to bad file naming (meshxml instead of mesh.xml) git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7159 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/test/jme3test/scene/TestSceneLoading.java | 9 +++++---- engine/src/test/jme3test/water/TestPostWaterLake.java | 10 ++++++---- engine/src/test/jme3test/water/TestSceneWater.java | 10 ++++++---- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/engine/src/test/jme3test/scene/TestSceneLoading.java b/engine/src/test/jme3test/scene/TestSceneLoading.java index 66a16645d..0dc0bf027 100644 --- a/engine/src/test/jme3test/scene/TestSceneLoading.java +++ b/engine/src/test/jme3test/scene/TestSceneLoading.java @@ -56,10 +56,7 @@ public class TestSceneLoading extends SimpleApplication { private static boolean useHttp = false; public static void main(String[] args) { - File file = new File("wildhouse.zip"); - if (!file.exists()) { - useHttp = true; - } + TestSceneLoading app = new TestSceneLoading(); app.start(); } @@ -75,6 +72,10 @@ public class TestSceneLoading extends SimpleApplication { // load sky rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + File file = new File("wildhouse.zip"); + if (!file.exists()) { + useHttp = true; + } // create the geometry and attach it // load the level from zip or http zip if (useHttp) { diff --git a/engine/src/test/jme3test/water/TestPostWaterLake.java b/engine/src/test/jme3test/water/TestPostWaterLake.java index 96cf1987c..4eb21a66c 100644 --- a/engine/src/test/jme3test/water/TestPostWaterLake.java +++ b/engine/src/test/jme3test/water/TestPostWaterLake.java @@ -52,10 +52,7 @@ public class TestPostWaterLake extends SimpleApplication { private static boolean useHttp = true; public static void main(String[] args) { - File file = new File("wildhouse.zip"); - if (file.exists()) { - useHttp = false; - } + TestPostWaterLake app = new TestPostWaterLake(); app.start(); } @@ -68,6 +65,11 @@ public class TestPostWaterLake extends SimpleApplication { // load sky rootNode.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + File file = new File("wildhouse.zip"); + + if (file.exists()) { + useHttp = false; + } // create the geometry and attach it // load the level from zip or http zip if (useHttp) { diff --git a/engine/src/test/jme3test/water/TestSceneWater.java b/engine/src/test/jme3test/water/TestSceneWater.java index 5837a4b71..0b5fa11f1 100644 --- a/engine/src/test/jme3test/water/TestSceneWater.java +++ b/engine/src/test/jme3test/water/TestSceneWater.java @@ -59,10 +59,7 @@ public class TestSceneWater extends SimpleApplication { private static boolean useHttp = true; public static void main(String[] args) { - File file = new File("wildhouse.zip"); - if (file.exists()) { - useHttp = false; - } + TestSceneWater app = new TestSceneWater(); app.start(); } @@ -76,6 +73,11 @@ public class TestSceneWater extends SimpleApplication { // load sky mainScene.attachChild(SkyFactory.createSky(assetManager, "Textures/Sky/Bright/BrightSky.dds", false)); + + File file = new File("wildhouse.zip"); + if (file.exists()) { + useHttp = false; + } // create the geometry and attach it // load the level from zip or http zip if (useHttp) {