Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / core / test / net / sf / openrocket / simulation / customexpression / TestExpressions.java
diff --git a/core/test/net/sf/openrocket/simulation/customexpression/TestExpressions.java b/core/test/net/sf/openrocket/simulation/customexpression/TestExpressions.java
new file mode 100644 (file)
index 0000000..d67bca0
--- /dev/null
@@ -0,0 +1,23 @@
+package net.sf.openrocket.simulation.customexpression;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import net.sf.openrocket.document.OpenRocketDocument;
+import net.sf.openrocket.rocketcomponent.Rocket;
+
+public class TestExpressions {
+
+       @Test
+       public void testExpressions() {
+               // TODO Auto-generated constructor stub
+               
+               OpenRocketDocument doc = new OpenRocketDocument(new Rocket());
+               
+               //CustomExpression exp = new CustomExpression(doc, "Kinetic energy", "Ek", "J", ".5*m*Vt^2");
+               
+               CustomExpression exp = new CustomExpression(doc, "Average mass", "Mavg", "kg", "mean(m[0:t])");
+               System.out.println( exp.getExpressionString() );
+               
+       }
+}