More scene and spot scene refactoring. Got parsers working for those in

the new new style (or was that the new new new style).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@739 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-12-05 03:38:10 +00:00
parent ec9986a365
commit dd69489de4
19 changed files with 544 additions and 274 deletions
@@ -0,0 +1,47 @@
//
// $Id: SpotSceneParserTest.java,v 1.1 2001/12/05 03:38:09 mdb Exp $
package com.threerings.whirled.tools.spot.xml;
import com.samskivert.test.TestUtil;
import junit.framework.Test;
import junit.framework.TestCase;
import com.threerings.whirled.tools.spot.EditableSpotScene;
public class SpotSceneParserTest extends TestCase
{
public SpotSceneParserTest ()
{
super(SpotSceneParserTest.class.getName());
}
public void runTest ()
{
try {
SpotSceneParser parser = new SpotSceneParser("scene");
String tspath = TestUtil.getResourcePath(TEST_SCENE_PATH);
EditableSpotScene scene = parser.parseScene(tspath);
System.out.println("Parsed " + scene.getSpotSceneModel() + ".");
} catch (Exception e) {
e.printStackTrace();
fail("Test threw exception");
}
}
public static Test suite ()
{
return new SpotSceneParserTest();
}
public static void main (String[] args)
{
SpotSceneParserTest test = new SpotSceneParserTest();
test.runTest();
}
protected static final String TEST_SCENE_PATH =
"whirled/tools/spot/xml/scene.xml";
}
@@ -0,0 +1,47 @@
//
// $Id: SceneParserTest.java,v 1.1 2001/12/05 03:38:10 mdb Exp $
package com.threerings.whirled.tools.xml;
import com.samskivert.test.TestUtil;
import junit.framework.Test;
import junit.framework.TestCase;
import com.threerings.whirled.tools.EditableScene;
public class SceneParserTest extends TestCase
{
public SceneParserTest ()
{
super(SceneParserTest.class.getName());
}
public void runTest ()
{
try {
SceneParser parser = new SceneParser("scene");
String tspath = TestUtil.getResourcePath(TEST_SCENE_PATH);
EditableScene scene = parser.parseScene(tspath);
System.out.println("Parsed " + scene.getSceneModel() + ".");
} catch (Exception e) {
e.printStackTrace();
fail("Test threw exception");
}
}
public static Test suite ()
{
return new SceneParserTest();
}
public static void main (String[] args)
{
SceneParserTest test = new SceneParserTest();
test.runTest();
}
protected static final String TEST_SCENE_PATH =
"whirled/tools/xml/scene.xml";
}