Fix tests
authorplaa <plaa@180e2498-e6e9-4542-8430-84ac67f01cd8>
Sat, 10 Mar 2012 21:12:33 +0000 (21:12 +0000)
committerplaa <plaa@180e2498-e6e9-4542-8430-84ac67f01cd8>
Sat, 10 Mar 2012 21:12:33 +0000 (21:12 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@454 180e2498-e6e9-4542-8430-84ac67f01cd8

core/build.xml
core/fileformat.txt
core/run.sh
core/test/net/sf/openrocket/file/motor/TestMotorLoader.java

index cba9884540b22527d35829137a65ec1736d71213..205fb246bcfee2b454e7190dacc92f01925f5e31 100644 (file)
@@ -32,7 +32,7 @@
        
        <path id="test-classpath">
                <path refid="classpath"/>
-               <pathelement location="${basedir}"/>
+               <pathelement location="${basedir}/resources"/>
                <pathelement location="${build-test.dir}"/>
                <pathelement location="${classes.dir}"/>
                <pathelement location="${src-test.dir}"/>
index 9d64ec88fa70a9e760989ec337b0ca1e3977eb86..0a3dbf03b88f1bf724fd9d826850cb6492e729a0 100644 (file)
@@ -34,7 +34,7 @@ The following file format versions exist:
 1.3:  Introduced with OpenRocket 1.1.9.  Adds the <launchlongitude> and
       <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
       digesting algorithm was changed.  Adds <separationevent> and
       <separationdelay> elements to stage components (except sustainer).
index 54ceeed1316a4f251ec794a642b8484e189ab9db..1ec8ea6f5967f5b83056a30be8a37b0304df0136 100755 (executable)
@@ -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 "$@"
 
index 74391bdc56fea0f6bd453e8fae9c2a022de0442c..dbc23e7451696571dfefa80d308c1a1b39c8ab4d 100644 (file)
@@ -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);
        }