From e6f50945950584175a65f7ef5dfdff1c7ed24bc7 Mon Sep 17 00:00:00 2001 From: plaa Date: Sat, 10 Mar 2012 21:12:33 +0000 Subject: [PATCH] Fix tests git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@454 180e2498-e6e9-4542-8430-84ac67f01cd8 --- core/build.xml | 2 +- core/fileformat.txt | 2 +- core/run.sh | 2 +- .../file/motor/TestMotorLoader.java | 20 ++++++++++--------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/core/build.xml b/core/build.xml index cba98845..205fb246 100644 --- a/core/build.xml +++ b/core/build.xml @@ -32,7 +32,7 @@ - + diff --git a/core/fileformat.txt b/core/fileformat.txt index 9d64ec88..0a3dbf03 100644 --- a/core/fileformat.txt +++ b/core/fileformat.txt @@ -34,7 +34,7 @@ The following file format versions exist: 1.3: Introduced with OpenRocket 1.1.9. Adds the and 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 element. The motor digesting algorithm was changed. Adds and elements to stage components (except sustainer). diff --git a/core/run.sh b/core/run.sh index 54ceeed1..1ec8ea6f 100755 --- a/core/run.sh +++ b/core/run.sh @@ -14,5 +14,5 @@ while echo "$1" | grep -q "^-" ; do 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 "$@" diff --git a/core/test/net/sf/openrocket/file/motor/TestMotorLoader.java b/core/test/net/sf/openrocket/file/motor/TestMotorLoader.java index 74391bdc..dbc23e74 100644 --- a/core/test/net/sf/openrocket/file/motor/TestMotorLoader.java +++ b/core/test/net/sf/openrocket/file/motor/TestMotorLoader.java @@ -1,8 +1,6 @@ package net.sf.openrocket.file.motor; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import java.io.IOException; import java.io.InputStream; @@ -16,29 +14,33 @@ import org.junit.Test; public class TestMotorLoader { + private static final String DIGEST1 = "e523030bc96d5e63313b5723aaea267d"; + private static final String DIGEST2 = "6a41f0f10b7283793eb0e6b389753729"; + + @Test public void testGeneralMotorLoader() throws IOException { MotorLoader loader = new GeneralMotorLoader(); - test(loader, "test1.eng", "c056cf25df6751f7bb8a94bc4f64750f"); - test(loader, "test2.rse", "b2fe203ee319ae28b9ccdad26a8f21de"); - test(loader, "test.zip", "b2fe203ee319ae28b9ccdad26a8f21de", "c056cf25df6751f7bb8a94bc4f64750f"); + test(loader, "test1.eng", DIGEST1); + test(loader, "test2.rse", DIGEST2); + test(loader, "test.zip", DIGEST2, DIGEST1); } @Test public void testRASPMotorLoader() throws IOException { - test(new RASPMotorLoader(), "test1.eng", "c056cf25df6751f7bb8a94bc4f64750f"); + test(new RASPMotorLoader(), "test1.eng", DIGEST1); } @Test public void testRocksimMotorLoader() throws IOException { - test(new RockSimMotorLoader(), "test2.rse", "b2fe203ee319ae28b9ccdad26a8f21de"); + test(new RockSimMotorLoader(), "test2.rse", DIGEST2); } @Test public void testZipMotorLoader() throws IOException { - test(new ZipFileMotorLoader(), "test.zip", "b2fe203ee319ae28b9ccdad26a8f21de", "c056cf25df6751f7bb8a94bc4f64750f"); + test(new ZipFileMotorLoader(), "test.zip", DIGEST2, DIGEST1); } -- 2.30.2