[Mathlib-commitlog] SF.net SVN: mathlib:[656] JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib /ma
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2009-01-08 20:06:13
|
Revision: 656
http://mathlib.svn.sourceforge.net/mathlib/?rev=656&view=rev
Author: st_mueller
Date: 2009-01-08 20:06:03 +0000 (Thu, 08 Jan 2009)
Log Message:
-----------
added more tests
Added Paths:
-----------
JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib/matrix/testSum.java
JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib/matrix/testSumsq.java
Added: JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib/matrix/testSum.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib/matrix/testSum.java (rev 0)
+++ JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib/matrix/testSum.java 2009-01-08 20:06:03 UTC (rev 656)
@@ -0,0 +1,39 @@
+package jmathlibtests.toolbox.jmathlib.matrix;
+
+import jmathlib.core.interpreter.Interpreter;
+import jmathlib.tools.junit.framework.*;
+import jmathlibtests.Compare;
+
+public class testSum extends TestCase {
+ protected Interpreter ml;
+
+ public testSum(String name) {
+ super(name);
+ }
+ public static void main (String[] args) {
+ jmathlib.tools.junit.textui.TestRunner.run(suite());
+ }
+ protected void setUp() {
+ ml = new Interpreter(true);
+ }
+ protected void tearDown() {
+ ml = null;
+ }
+
+ public static Test suite() {
+ return new TestSuite(testSum.class);
+ }
+
+ public void testSum01() {
+ ml.executeExpression("a=sum([1,2,3])");
+ assertTrue(6.0 == ml.getScalarValueRe("a"));
+ }
+
+ public void testSum02() {
+ ml.executeExpression("a=sum([2,2,3])");
+ assertTrue(7.0 == ml.getScalarValueRe("a"));
+ }
+
+
+
+}
\ No newline at end of file
Added: JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib/matrix/testSumsq.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib/matrix/testSumsq.java (rev 0)
+++ JMathLib/trunk/src/jmathlibtests/toolbox/jmathlib/matrix/testSumsq.java 2009-01-08 20:06:03 UTC (rev 656)
@@ -0,0 +1,39 @@
+package jmathlibtests.toolbox.jmathlib.matrix;
+
+import jmathlib.core.interpreter.Interpreter;
+import jmathlib.tools.junit.framework.*;
+import jmathlibtests.Compare;
+
+public class testSumsq extends TestCase {
+ protected Interpreter ml;
+
+ public testSumsq(String name) {
+ super(name);
+ }
+ public static void main (String[] args) {
+ jmathlib.tools.junit.textui.TestRunner.run(suite());
+ }
+ protected void setUp() {
+ ml = new Interpreter(true);
+ }
+ protected void tearDown() {
+ ml = null;
+ }
+
+ public static Test suite() {
+ return new TestSuite(testSumsq.class);
+ }
+
+ public void testSumsq01() {
+ ml.executeExpression("a=sumsq([1,2,3])");
+ assertTrue(14.0 == ml.getScalarValueRe("a"));
+ }
+
+ public void testSumsq02() {
+ ml.executeExpression("a=sumsq([2,2,3])");
+ assertTrue(17.0 == ml.getScalarValueRe("a"));
+ }
+
+
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|