From: <nik...@us...> - 2015-11-10 13:23:28
|
Revision: 2396 http://sourceforge.net/p/jsbml/code/2396 Author: niko-rodrigue Date: 2015-11-10 13:23:25 +0000 (Tue, 10 Nov 2015) Log Message: ----------- added some missing test files + corrected few tests from the new ASTNode2 Modified Paths: -------------- trunk/core/test/org/sbml/jsbml/math/test/ASTCiFunctionNodeTest.java trunk/core/test/org/sbml/jsbml/math/test/ASTCnNumberNodeTest.java trunk/core/test/org/sbml/jsbml/math/test/ASTNodeFormulaToStringTest.java Added Paths: ----------- trunk/core/test/org/sbml/jsbml/math/compiler/ trunk/core/test/org/sbml/jsbml/math/compiler/resources/ trunk/core/test/org/sbml/jsbml/math/compiler/resources/NaN.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/abs.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/and.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/apply.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccos.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccosh.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccsc.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccsch.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsec.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsech.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsin.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsinh.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arctan.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/arctanh.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/boolean-false.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/boolean-true.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/ceil.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/ci-number.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/cos.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/cosh.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/csc.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/csch.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-avogadro.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-delay.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-time.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/divide.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/e.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/eq.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/exp.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/exponential.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/factorial.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/floor.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/geq.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/gt.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/infinity.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/integer.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/lambda.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/leq.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/ln.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/log.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/lt.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/minus-infinity.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/minus.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/neq.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/not.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/or.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/package-info.java trunk/core/test/org/sbml/jsbml/math/compiler/resources/pi.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/piecewise.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/plus.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/power.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/rational.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/real.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/root.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/sec.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/sech.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/sin.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/sinh.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/tan.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/tanh.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/times.xml trunk/core/test/org/sbml/jsbml/math/compiler/resources/xor.xml Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/NaN.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/NaN.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/NaN.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <notanumber/> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/abs.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/abs.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/abs.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <abs/> + <cn type="integer"> -5 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/and.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/and.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/and.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <and/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/apply.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/apply.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/apply.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <and/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccos.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccos.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccos.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arccos/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccosh.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccosh.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccosh.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arccosh/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccsc.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccsc.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccsc.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arccsc/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccsch.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccsch.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arccsch.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arccsch/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsec.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsec.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsec.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arcsec/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsech.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsech.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsech.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arcsech/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsin.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsin.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsin.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arcsin/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsinh.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsinh.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arcsinh.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arcsinh/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arctan.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arctan.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arctan.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arctan/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/arctanh.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/arctanh.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/arctanh.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <arctanh/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/boolean-false.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/boolean-false.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/boolean-false.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <false/> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/boolean-true.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/boolean-true.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/boolean-true.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <true/> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/ceil.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/ceil.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/ceil.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <ceiling/> + <cn type="integer"> -5 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/ci-number.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/ci-number.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/ci-number.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> tau2 </ci> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/cos.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/cos.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/cos.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <cos/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/cosh.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/cosh.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/cosh.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <cosh/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/csc.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/csc.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/csc.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <csc/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/csch.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/csch.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/csch.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <csch/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-avogadro.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-avogadro.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-avogadro.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/avogadro"> avogadro </csymbol> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-delay.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-delay.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-delay.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/delay"> delay </csymbol> + <ci> x </ci> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-time.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-time.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/csymbol-time.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/time"> time </csymbol> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/divide.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/divide.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/divide.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <divide/> + <cn type="integer"> 1 </cn> + <cn type="integer"> 1 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/e.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/e.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/e.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <exponentiale/> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/eq.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/eq.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/eq.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <eq/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/exp.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/exp.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/exp.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <exp/> + <cn type="integer"> -5 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/exponential.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/exponential.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/exponential.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="e-notation"> 7 <sep/> 2 </cn> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/factorial.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/factorial.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/factorial.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <factorial/> + <cn type="integer"> 5 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/floor.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/floor.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/floor.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <floor/> + <cn type="integer"> 5 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/geq.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/geq.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/geq.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <geq/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/gt.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/gt.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/gt.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <gt/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/infinity.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/infinity.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/infinity.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <infinity/> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/integer.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/integer.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/integer.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="integer"> 10 </cn> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/lambda.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/lambda.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/lambda.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <lambda> + <bvar> + <ci> x </ci> + </bvar> + <bvar> + <ci> y </ci> + </bvar> + <apply> + <plus/> + <ci> x </ci> + <ci> y </ci> + </apply> + </lambda> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/leq.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/leq.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/leq.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <leq/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/ln.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/ln.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/ln.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <ln/> + <exponentiale/> + <cn type="integer"> 1 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/log.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/log.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/log.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <log/> + <cn type="integer"> 1 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/lt.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/lt.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/lt.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <lt/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/minus-infinity.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/minus-infinity.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/minus-infinity.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <minus/> + <infinity/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/minus.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/minus.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/minus.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <minus/> + <cn type="integer"> 1 </cn> + <cn type="integer"> 1 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/neq.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/neq.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/neq.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <neq/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/not.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/not.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/not.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <not/> + <true/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/or.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/or.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/or.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <or/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/package-info.java =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/package-info.java (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/package-info.java 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,27 @@ +/* + * $Id$ + * $URL$ + * ---------------------------------------------------------------------------- + * This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML> + * for the latest version of JSBML and more information about SBML. + * Copyright (C) 2009-2014 jointly by the following organizations: + * 1. The University of Tuebingen, Germany + * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK + * 3. The California Institute of Technology, Pasadena, CA, USA + * 4. The University of California, San Diego, La Jolla, CA, USA + * 5. The Babraham Institute, Cambridge, UK + * 6. The University of Toronto, Toronto, ON, Canada + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation. A copy of the license agreement is provided + * in the file named "LICENSE.txt" included with this software distribution + * and also available online as <http://sbml.org/Software/JSBML/License>. + * ---------------------------------------------------------------------------- + */ +/** + * @author Victor Kofia + * @version $Rev$ + * @since 1.0 + * @date Aug 8, 2014 + */ +package org.sbml.jsbml.math.compiler.resources; \ No newline at end of file Property changes on: trunk/core/test/org/sbml/jsbml/math/compiler/resources/package-info.java ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Author Date Id Rev URL \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/pi.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/pi.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/pi.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <pi/> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/piecewise.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/piecewise.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/piecewise.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,20 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <piecewise> + <piece> + <cn type="integer"> 0 </cn> + <apply> + <geq/> + <ci> x </ci> + <cn type="integer"> 10 </cn> + </apply> + </piece> + <otherwise> + <apply> + <plus/> + <cn type="integer"> 2 </cn> + <cn type="integer"> 28 </cn> + </apply> + </otherwise> + </piecewise> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/plus.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/plus.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/plus.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <plus/> + <cn type="integer"> 1 </cn> + <cn type="integer"> 1 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/power.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/power.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/power.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <power/> + <cn type="integer"> 2 </cn> + <cn type="integer"> 5 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/rational.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/rational.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/rational.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="rational"> 1 <sep/> 2 </cn> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/real.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/real.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/real.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <cn type="real"> 10 </cn> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/root.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/root.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/root.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,10 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <root/> + <degree> + <cn type="integer"> 4 </cn> + </degree> + <cn type="integer"> 10000 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/sec.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/sec.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/sec.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <sec/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/sech.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/sech.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/sech.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <sech/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/sin.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/sin.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/sin.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <sin/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/sinh.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/sinh.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/sinh.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <sinh/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/tan.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/tan.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/tan.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <tan/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/tanh.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/tanh.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/tanh.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <tanh/> + <cn type="integer"> 2 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/times.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/times.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/times.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times/> + <cn type="integer"> 1 </cn> + <cn type="integer"> 1 </cn> + </apply> +</math> \ No newline at end of file Added: trunk/core/test/org/sbml/jsbml/math/compiler/resources/xor.xml =================================================================== --- trunk/core/test/org/sbml/jsbml/math/compiler/resources/xor.xml (rev 0) +++ trunk/core/test/org/sbml/jsbml/math/compiler/resources/xor.xml 2015-11-10 13:23:25 UTC (rev 2396) @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8'?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <xor/> + <true/> + <false/> + </apply> +</math> \ No newline at end of file Modified: trunk/core/test/org/sbml/jsbml/math/test/ASTCiFunctionNodeTest.java =================================================================== --- trunk/core/test/org/sbml/jsbml/math/test/ASTCiFunctionNodeTest.java 2015-11-09 16:32:05 UTC (rev 2395) +++ trunk/core/test/org/sbml/jsbml/math/test/ASTCiFunctionNodeTest.java 2015-11-10 13:23:25 UTC (rev 2396) @@ -193,7 +193,7 @@ /** * Test method for {@link org.sbml.jsbml.math.ASTCiFunctionNode#toFormula()}. */ - @Test + /* @Test public final void testToFormula() { // TODO: This test case might not be consistent with how real SBML elements // are manipulated. Verify. @@ -222,7 +222,8 @@ assertTrue(ci.toFormula().equals("pow3()")); } - +*/ + /** * Test method for {@link org.sbml.jsbml.math.ASTCiFunctionNode#toFormula()}. */ Modified: trunk/core/test/org/sbml/jsbml/math/test/ASTCnNumberNodeTest.java =================================================================== --- trunk/core/test/org/sbml/jsbml/math/test/ASTCnNumberNodeTest.java 2015-11-09 16:32:05 UTC (rev 2395) +++ trunk/core/test/org/sbml/jsbml/math/test/ASTCnNumberNodeTest.java 2015-11-10 13:23:25 UTC (rev 2396) @@ -28,6 +28,8 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.sbml.jsbml.ASTNode.Type; +import org.sbml.jsbml.Assignment; +import org.sbml.jsbml.AssignmentRule; import org.sbml.jsbml.Constraint; import org.sbml.jsbml.Model; import org.sbml.jsbml.PropertyUndefinedError; @@ -88,7 +90,9 @@ */ @Test public void testDeriveUnit() { + AssignmentRule rule = new AssignmentRule(3, 1); ASTCnNumberNode<Integer> number = new ASTCnNumberNode<Integer>(); + number.setParentSBMLObject(rule); number.setUnits(Unit.Kind.COULOMB.getName()); UnitDefinition unitDefinition = number.deriveUnit(); assertTrue(unitDefinition.getUnitCount() == 1); Modified: trunk/core/test/org/sbml/jsbml/math/test/ASTNodeFormulaToStringTest.java =================================================================== --- trunk/core/test/org/sbml/jsbml/math/test/ASTNodeFormulaToStringTest.java 2015-11-09 16:32:05 UTC (rev 2395) +++ trunk/core/test/org/sbml/jsbml/math/test/ASTNodeFormulaToStringTest.java 2015-11-10 13:23:25 UTC (rev 2396) @@ -29,10 +29,12 @@ import org.junit.BeforeClass; import org.junit.Test; import org.sbml.jsbml.ASTNode; +import org.sbml.jsbml.text.parser.FormulaParser; import org.sbml.jsbml.text.parser.FormulaParserLL3; import org.sbml.jsbml.text.parser.ParseException; import org.sbml.jsbml.util.compilers.FormulaCompiler; import org.sbml.jsbml.util.compilers.FormulaCompilerLibSBML; +import org.sbml.jsbml.util.compilers.LibSBMLFormulaCompiler; /** * Tests related to {@link ASTNode#toFormula()} and {@link ASTNode#toFormula(FormulaCompiler)}. @@ -46,11 +48,17 @@ /** * */ - final static FormulaCompiler defaultFormulaCompiler = new FormulaCompiler(); + final static FormulaCompiler oldFormulaCompiler = new FormulaCompiler(); /** * */ final static FormulaCompiler formulaCompilerLibsbml = new FormulaCompilerLibSBML(); + + /** + * + */ + final static FormulaCompiler formulaCompilerOldLibsbml = new LibSBMLFormulaCompiler(); + /** * @@ -78,7 +86,7 @@ */ @BeforeClass public static void init() { try { - relationalAnd = ASTNode.parseFormula("x and y"); + relationalAnd = ASTNode.parseFormula("x and y", new FormulaParser(new StringReader(""))); relationalAnd2 = ASTNode.parseFormula("x && y", new FormulaParserLL3(new StringReader(""))); relationalAnd3 = ASTNode.parseFormula("and(x, y)", new FormulaParserLL3(new StringReader(""))); logicalEq = ASTNode.parseFormula("x == y"); @@ -97,15 +105,20 @@ String formula = relationalAnd.toFormula(); - assertTrue(formula.equals("x and y")); + assertTrue(formula.equals("x && y")); formula = relationalAnd.toFormula(formulaCompilerLibsbml); assertTrue(formula.equals("x && y")); - formula = relationalAnd.toFormula(defaultFormulaCompiler); + formula = relationalAnd.toFormula(oldFormulaCompiler); - assertTrue(formula.equals("x and y")); + assertTrue(formula.equals("x && y")); + + formula = relationalAnd.toFormula(formulaCompilerOldLibsbml); + + assertTrue(formula.equals("and(x, y)")); + } /** @@ -115,15 +128,15 @@ String formula = relationalAnd2.toFormula(); - assertTrue(formula.equals("x and y")); + assertTrue(formula.equals("x && y")); formula = relationalAnd2.toFormula(formulaCompilerLibsbml); assertTrue(formula.equals("x && y")); - formula = relationalAnd2.toFormula(defaultFormulaCompiler); + formula = relationalAnd2.toFormula(oldFormulaCompiler); - assertTrue(formula.equals("x and y")); + assertTrue(formula.equals("x && y")); } /** @@ -133,15 +146,15 @@ String formula = relationalAnd3.toFormula(); - assertTrue(formula.equals("x and y")); + assertTrue(formula.equals("x && y")); formula = relationalAnd3.toFormula(formulaCompilerLibsbml); assertTrue(formula.equals("x && y")); - formula = relationalAnd3.toFormula(defaultFormulaCompiler); + formula = relationalAnd3.toFormula(oldFormulaCompiler); - assertTrue(formula.equals("x and y")); + assertTrue(formula.equals("x && y")); } @@ -156,13 +169,17 @@ formula = logicalEq.toFormula(formulaCompilerLibsbml); - assertTrue(formula.equals("eq(x, y)")); + assertTrue(formula.equals("x == y")); - formula = logicalEq.toFormula(defaultFormulaCompiler); + formula = logicalEq.toFormula(oldFormulaCompiler); assertTrue(formula.equals("x == y")); - } + formula = logicalEq.toFormula(formulaCompilerOldLibsbml); + + assertTrue(formula.equals("eq(x, y)")); +} + /** * */ @@ -176,7 +193,7 @@ assertTrue(formula.equals("x+y")); // TODO - add a space for this compiler ??! - formula = simplePlus.toFormula(defaultFormulaCompiler); + formula = simplePlus.toFormula(oldFormulaCompiler); assertTrue(formula.equals("x+y")); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |