Don't unpack resource bundles when running tests.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@556 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -171,6 +171,7 @@
|
|||||||
<classpath refid="classpath"/>
|
<classpath refid="classpath"/>
|
||||||
<sysproperty key="test_dir" value="${test.dir}"/>
|
<sysproperty key="test_dir" value="${test.dir}"/>
|
||||||
<sysproperty key="resource_dir" value="${test.dir}/rsrc"/>
|
<sysproperty key="resource_dir" value="${test.dir}/rsrc"/>
|
||||||
|
<sysproperty key="no_unpack_resources" value="true"/>
|
||||||
<formatter type="brief" usefile="false"/>
|
<formatter type="brief" usefile="false"/>
|
||||||
<batchtest>
|
<batchtest>
|
||||||
<fileset dir="${src.dir}">
|
<fileset dir="${src.dir}">
|
||||||
|
|||||||
+3
-3
@@ -16,11 +16,11 @@ import com.jme.scene.shape.Box;
|
|||||||
/**
|
/**
|
||||||
* Tests the JME/AWT integration bits.
|
* Tests the JME/AWT integration bits.
|
||||||
*/
|
*/
|
||||||
public class JmeCanvasTest extends JmeCanvasApp
|
public class JmeCanvasTestApp extends JmeCanvasApp
|
||||||
{
|
{
|
||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
{
|
{
|
||||||
final JmeCanvasTest app = new JmeCanvasTest();
|
final JmeCanvasTestApp app = new JmeCanvasTestApp();
|
||||||
JFrame frame = new JFrame("JmeCanvasTest");
|
JFrame frame = new JFrame("JmeCanvasTest");
|
||||||
frame.getContentPane().add(app.getCanvas(), BorderLayout.CENTER);
|
frame.getContentPane().add(app.getCanvas(), BorderLayout.CENTER);
|
||||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
@@ -50,7 +50,7 @@ public class JmeCanvasTest extends JmeCanvasApp
|
|||||||
_geom.updateRenderState();
|
_geom.updateRenderState();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected JmeCanvasTest ()
|
protected JmeCanvasTestApp ()
|
||||||
{
|
{
|
||||||
super(800, 600);
|
super(800, 600);
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ public class JabberServer extends CrowdServer
|
|||||||
super.init(injector);
|
super.init(injector);
|
||||||
|
|
||||||
// create a single location
|
// create a single location
|
||||||
_place = plreg.createPlace(new JabberConfig());
|
_place = _plreg.createPlace(new JabberConfig());
|
||||||
log.info("Created chat room " + _place.where() + ".");
|
log.info("Created chat room " + _place.where() + ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -24,7 +24,7 @@ import com.threerings.jme.sprite.LineSegmentPath;
|
|||||||
/**
|
/**
|
||||||
* Used for testing paths.
|
* Used for testing paths.
|
||||||
*/
|
*/
|
||||||
public class PathTest extends JmeApp
|
public class PathTestApp extends JmeApp
|
||||||
{
|
{
|
||||||
protected void initRoot ()
|
protected void initRoot ()
|
||||||
{
|
{
|
||||||
@@ -136,7 +136,7 @@ public class PathTest extends JmeApp
|
|||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
{
|
{
|
||||||
LoggingSystem.getLogger().setLevel(Level.OFF);
|
LoggingSystem.getLogger().setLevel(Level.OFF);
|
||||||
PathTest test = new PathTest();
|
PathTestApp test = new PathTestApp();
|
||||||
if (!test.init()) {
|
if (!test.init()) {
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
}
|
}
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
//
|
|
||||||
// $Id: MessageBundleTest.java 3099 2004-08-27 02:21:06Z mdb $
|
|
||||||
//
|
|
||||||
// Narya library - tools for developing networked games
|
|
||||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
|
||||||
// http://www.threerings.net/code/narya/
|
|
||||||
//
|
|
||||||
// This library is free software; you can redistribute it and/or modify it
|
|
||||||
// under the terms of the GNU Lesser General Public License as published
|
|
||||||
// by the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This library is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
// Lesser General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
|
||||||
// License along with this library; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
package com.threerings.util;
|
|
||||||
|
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests the {@link MessageBundle} class.
|
|
||||||
*/
|
|
||||||
public class MessageBundleTest extends TestCase
|
|
||||||
{
|
|
||||||
public MessageBundleTest ()
|
|
||||||
{
|
|
||||||
super(MessageBundleTest.class.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void runTest ()
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
String path = "rsrc.i18n.messages";
|
|
||||||
ResourceBundle rbundle = ResourceBundle.getBundle(path);
|
|
||||||
MessageBundle bundle = new MessageBundle();
|
|
||||||
bundle.init(null, "test", rbundle, null);
|
|
||||||
|
|
||||||
String key1 = MessageBundle.compose("m.foo",
|
|
||||||
MessageBundle.taint("bar"),
|
|
||||||
MessageBundle.taint("baz"));
|
|
||||||
String key2 = MessageBundle.compose("m.biff",
|
|
||||||
MessageBundle.taint("beep"),
|
|
||||||
MessageBundle.taint("boop"));
|
|
||||||
String key = MessageBundle.compose("m.meta", key1, key2);
|
|
||||||
|
|
||||||
String output = bundle.xlate(key);
|
|
||||||
if (!OUTPUT.equals(output)) {
|
|
||||||
fail("xlate failed: " + output);
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
fail("Test failed: " + e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Test suite ()
|
|
||||||
{
|
|
||||||
return new MessageBundleTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main (String[] args)
|
|
||||||
{
|
|
||||||
MessageBundleTest test = new MessageBundleTest();
|
|
||||||
test.runTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static final String OUTPUT =
|
|
||||||
"Meta arg one is 'Foo arg one is 'bar' and two is 'baz'.' and " +
|
|
||||||
"two is 'Biff arg one is 'beep' and two is 'boop'.'.";
|
|
||||||
}
|
|
||||||
+1
-1
@@ -8,7 +8,7 @@ import com.threerings.util.unsafe.Unsafe;
|
|||||||
/**
|
/**
|
||||||
* Does something extraordinary.
|
* Does something extraordinary.
|
||||||
*/
|
*/
|
||||||
public class UIDTest
|
public class UIDTestApp
|
||||||
{
|
{
|
||||||
public static void main (String[] args)
|
public static void main (String[] args)
|
||||||
{
|
{
|
||||||
Reference in New Issue
Block a user