Turned test into JUnit test.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@697 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-11-29 21:55:40 +00:00
parent e3d39f9a49
commit 089dc87b38
2 changed files with 48 additions and 7 deletions
@@ -1,5 +1,5 @@
//
// $Id: BundledComponentRepositoryTest.java,v 1.1 2001/11/27 08:06:57 mdb Exp $
// $Id: BundledComponentRepositoryTest.java,v 1.2 2001/11/29 21:55:25 mdb Exp $
package com.threerings.cast.bundle;
@@ -8,9 +8,17 @@ import com.samskivert.util.StringUtil;
import com.threerings.resource.ResourceManager;
import com.threerings.cast.ComponentClass;
public class BundledComponentRepositoryTest
import junit.framework.Test;
import junit.framework.TestCase;
public class BundledComponentRepositoryTest extends TestCase
{
public static void main (String[] args)
public BundledComponentRepositoryTest ()
{
super(BundledComponentRepositoryTest.class.getName());
}
public void runTest ()
{
try {
ResourceManager rmgr = new ResourceManager(null, "rsrc");
@@ -36,6 +44,19 @@ public class BundledComponentRepositoryTest
} catch (Exception e) {
e.printStackTrace();
fail();
}
}
public static void main (String[] args)
{
BundledComponentRepositoryTest test =
new BundledComponentRepositoryTest();
test.runTest();
}
public static Test suite ()
{
return new BundledComponentRepositoryTest();
}
}
@@ -1,19 +1,27 @@
//
// $Id: BundledTileSetRepositoryTest.java,v 1.1 2001/11/21 02:42:16 mdb Exp $
// $Id: BundledTileSetRepositoryTest.java,v 1.2 2001/11/29 21:55:40 mdb Exp $
package com.threerings.media.tile.bundle;
import java.util.Iterator;
import com.threerings.resource.ResourceManager;
public class BundledTileSetRepositoryTest
import junit.framework.Test;
import junit.framework.TestCase;
public class BundledTileSetRepositoryTest extends TestCase
{
public static void main (String[] args)
public BundledTileSetRepositoryTest ()
{
super(BundledTileSetRepositoryTest.class.getName());
}
public void runTest ()
{
try {
ResourceManager rmgr = new ResourceManager(null, "rsrc");
BundledTileSetRepository repo =
new BundledTileSetRepository(rmgr, "bundle_test");
new BundledTileSetRepository(rmgr, "tilesets");
Iterator sets = repo.enumerateTileSets();
while (sets.hasNext()) {
System.out.println(sets.next());
@@ -23,4 +31,16 @@ public class BundledTileSetRepositoryTest
e.printStackTrace();
}
}
public static Test suite ()
{
return new BundledTileSetRepositoryTest();
}
public static void main (String[] args)
{
BundledTileSetRepositoryTest test =
new BundledTileSetRepositoryTest();
test.runTest();
}
}