Fix tests

This commit is contained in:
Sampo Niskanen 2012-03-10 21:12:33 +00:00
parent a406956b06
commit dabfa28b9d
4 changed files with 14 additions and 12 deletions

View File

@ -32,7 +32,7 @@
<path id="test-classpath"> <path id="test-classpath">
<path refid="classpath"/> <path refid="classpath"/>
<pathelement location="${basedir}"/> <pathelement location="${basedir}/resources"/>
<pathelement location="${build-test.dir}"/> <pathelement location="${build-test.dir}"/>
<pathelement location="${classes.dir}"/> <pathelement location="${classes.dir}"/>
<pathelement location="${src-test.dir}"/> <pathelement location="${src-test.dir}"/>

View File

@ -34,7 +34,7 @@ The following file format versions exist:
1.3: Introduced with OpenRocket 1.1.9. Adds the <launchlongitude> and 1.3: Introduced with OpenRocket 1.1.9. Adds the <launchlongitude> and
<geodeticmethod> parameters to the simulation conditions element. <geodeticmethod> parameters to the simulation conditions element.
1.4: Introduced with OpenRocket 1.1.10. Adds the launchrodvelocity and 1.4: Introduced with OpenRocket 12.03. Adds the launchrodvelocity and
deploymentvelocity attributes to <flightdata> element. The motor deploymentvelocity attributes to <flightdata> element. The motor
digesting algorithm was changed. Adds <separationevent> and digesting algorithm was changed. Adds <separationevent> and
<separationdelay> elements to stage components (except sustainer). <separationdelay> elements to stage components (except sustainer).

View File

@ -14,5 +14,5 @@ while echo "$1" | grep -q "^-" ; do
done done
java -cp bin/:lib/miglayout15-swing.jar:lib/jcommon-1.0.16.jar:lib/jfreechart-1.0.13.jar:lib/iText-5.0.2.jar $JAVAOPTS net.sf.openrocket.startup.Startup "$@" java -cp bin/:resources/:lib/miglayout15-swing.jar:lib/jcommon-1.0.16.jar:lib/jfreechart-1.0.13.jar:lib/iText-5.0.2.jar $JAVAOPTS net.sf.openrocket.startup.Startup "$@"

View File

@ -1,8 +1,6 @@
package net.sf.openrocket.file.motor; package net.sf.openrocket.file.motor;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -16,29 +14,33 @@ import org.junit.Test;
public class TestMotorLoader { public class TestMotorLoader {
private static final String DIGEST1 = "e523030bc96d5e63313b5723aaea267d";
private static final String DIGEST2 = "6a41f0f10b7283793eb0e6b389753729";
@Test @Test
public void testGeneralMotorLoader() throws IOException { public void testGeneralMotorLoader() throws IOException {
MotorLoader loader = new GeneralMotorLoader(); MotorLoader loader = new GeneralMotorLoader();
test(loader, "test1.eng", "c056cf25df6751f7bb8a94bc4f64750f"); test(loader, "test1.eng", DIGEST1);
test(loader, "test2.rse", "b2fe203ee319ae28b9ccdad26a8f21de"); test(loader, "test2.rse", DIGEST2);
test(loader, "test.zip", "b2fe203ee319ae28b9ccdad26a8f21de", "c056cf25df6751f7bb8a94bc4f64750f"); test(loader, "test.zip", DIGEST2, DIGEST1);
} }
@Test @Test
public void testRASPMotorLoader() throws IOException { public void testRASPMotorLoader() throws IOException {
test(new RASPMotorLoader(), "test1.eng", "c056cf25df6751f7bb8a94bc4f64750f"); test(new RASPMotorLoader(), "test1.eng", DIGEST1);
} }
@Test @Test
public void testRocksimMotorLoader() throws IOException { public void testRocksimMotorLoader() throws IOException {
test(new RockSimMotorLoader(), "test2.rse", "b2fe203ee319ae28b9ccdad26a8f21de"); test(new RockSimMotorLoader(), "test2.rse", DIGEST2);
} }
@Test @Test
public void testZipMotorLoader() throws IOException { public void testZipMotorLoader() throws IOException {
test(new ZipFileMotorLoader(), "test.zip", "b2fe203ee319ae28b9ccdad26a8f21de", "c056cf25df6751f7bb8a94bc4f64750f"); test(new ZipFileMotorLoader(), "test.zip", DIGEST2, DIGEST1);
} }