public class TestMathML
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
PRINT_ALL
Prints detail information about tests carried out
|
static boolean |
RUN_KNOWN_FAILURES
Some tests depend on existence of a local style-sheet, set to null to disable tests
|
static boolean |
RUN_NETWORK_TESTS
Whether to run slow tests which need network access
|
| Constructor and Description |
|---|
TestMathML() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertEqNodes(java.lang.String s,
Node expected,
Node actual) |
void |
biDirectionalTest(java.lang.String eqn,
Node node,
java.lang.String xml) |
void |
biDirectionalTest(java.lang.String eqn,
java.lang.String xml) |
boolean |
compareRecursive(Node node1,
Node node2) |
java.lang.String |
docToString(org.w3c.dom.Document doc,
javax.xml.transform.Transformer t) |
java.lang.String |
fixLineEndings(java.lang.String s) |
void |
jepToXmlTest(java.lang.String eqn,
Node node,
java.lang.String xml) |
void |
jepToXmlTest(java.lang.String eqn,
java.lang.String xml) |
java.lang.String |
removeEmptySpace(java.lang.String s) |
void |
setUp() |
static void |
setUpBeforeClass() |
void |
simpleBuilderTest(java.lang.String eqn,
Node node,
java.lang.String xml,
javax.xml.transform.Transformer t) |
void |
testCN()
Test <cn> numbers elements.
|
void |
testCNbase8XJ() |
void |
testCNbaseXJ() |
void |
testCNcomplex() |
void |
testCNcomplexPolarXJ() |
void |
testCNconstantPi()
Support for Entities is currently broken.
|
void |
testCNe_notation() |
void |
testCNinteger() |
void |
testCNrationalXJ() |
void |
testCNrealXJ() |
void |
testDeclare()
Tests a declare element
|
void |
testDeclareVector()
Tests parsing of <vector> element.
|
void |
testExponent() |
void |
testFunctionsExists()
Tests that every jep function will be converted to mathml.
|
void |
testInfinity() |
void |
testList()
Converts "[1,[2,3]]" to/from nested <list> elements.
|
void |
testLog() |
void |
testLog2() |
void |
testMath() |
void |
testMathDTD()
Tests using the MathML 2.0 DTD.
|
void |
testMathNS()
Convert to/from mathml with a namespace (xmlns) attribute specified.
|
void |
testMathNSP()
Convert to/from mathml with a namespace (xmlns) attribute specified and a '"m" prefix for MathML elements.
|
void |
testMatrix()
Tests >matrix< element.
|
void |
testMinus() |
void |
testMultipleDeclerations()
Tests conversion of multiple <declare> elements.
|
void |
testNaN() |
void |
testNegInfinityJX() |
void |
testNegInfinityXJ() |
void |
testOperatorsExists()
Tests that every jep operator will be converted to mathml.
|
void |
testPi() |
void |
testQuadratic()
Conversions of "x^2+4*x+4==0"
|
void |
testQuadraticRoot()
Converts "x==(-b-sqrt(b^2.0-4.0*a*c))/(2.0*a)" to-from mathml.
|
void |
testQuadraticToPresentation()
This test is only run if LOCAL_STYLESHEETS_DIR is not null and
the mmlctop2_0.xsl style sheet from http://www.orcca.on.ca/MathML/software/mmlctop2_0.zip stylesheet is installed there.
|
void |
testRelnXJ()
Tests parsing of deprecated <reln> element.
|
void |
testRoot()
"sqrt(x)" is converted to from <apply><root/><ci>x</ci></apply>
|
void |
testSelector()
Tests a selector element for array indexing
|
void |
testSemantics()
Tests parsing of mathml inside a <semantics> element.
|
void |
testSetXJ()
Tests parsing of >set< element.
|
void |
testSin() |
void |
testSqrt() |
void |
testUminus() |
void |
testVector()
Tests >vector< element.
|
void |
testXHTML()
Parses mathml embedded in an xhtml document.
|
void |
testXHTML2()
Parses mathml embedded in an xhtml document.
|
void |
xmlToJepTest(java.lang.String eqn,
Node expected,
java.lang.String xml) |
void |
xmlToJepTest(java.lang.String eqn,
java.lang.String xml) |
public static final boolean PRINT_ALL
public static final boolean RUN_NETWORK_TESTS
public static final boolean RUN_KNOWN_FAILURES
public static void setUpBeforeClass()
throws java.lang.Exception
java.lang.Exceptionpublic void setUp()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String fixLineEndings(java.lang.String s)
public java.lang.String removeEmptySpace(java.lang.String s)
public java.lang.String docToString(org.w3c.dom.Document doc,
javax.xml.transform.Transformer t)
throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionpublic void simpleBuilderTest(java.lang.String eqn,
Node node,
java.lang.String xml,
javax.xml.transform.Transformer t)
throws javax.xml.transform.TransformerException,
JepException
javax.xml.transform.TransformerExceptionJepExceptionpublic void jepToXmlTest(java.lang.String eqn,
Node node,
java.lang.String xml)
throws javax.xml.transform.TransformerException,
JepException
javax.xml.transform.TransformerExceptionJepExceptionpublic void jepToXmlTest(java.lang.String eqn,
java.lang.String xml)
throws javax.xml.transform.TransformerException,
JepException
javax.xml.transform.TransformerExceptionJepExceptionpublic void xmlToJepTest(java.lang.String eqn,
java.lang.String xml)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
ParseException
javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOExceptionParseExceptionpublic void xmlToJepTest(java.lang.String eqn,
Node expected,
java.lang.String xml)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
eqn - javax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic void biDirectionalTest(java.lang.String eqn,
java.lang.String xml)
throws javax.xml.transform.TransformerException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
JepException
javax.xml.transform.TransformerExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOExceptionJepExceptionpublic void biDirectionalTest(java.lang.String eqn,
Node node,
java.lang.String xml)
throws javax.xml.transform.TransformerException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
JepException
javax.xml.transform.TransformerExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOExceptionJepExceptionpublic final void testCN()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNbaseXJ()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNbase8XJ()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNrealXJ()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNe_notation()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNinteger()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNrationalXJ()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNcomplex()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNcomplexPolarXJ()
throws java.lang.Exception
java.lang.Exceptionpublic final void testCNconstantPi()
throws java.lang.Exception
java.lang.Exceptionpublic final void testNaN()
throws java.lang.Exception
java.lang.Exceptionpublic final void testInfinity()
throws java.lang.Exception
java.lang.Exceptionpublic final void testNegInfinityJX()
throws java.lang.Exception
java.lang.Exceptionpublic final void testNegInfinityXJ()
throws java.lang.Exception
java.lang.Exceptionpublic final void testPi()
throws java.lang.Exception
java.lang.Exceptionpublic final void testUminus()
throws java.lang.Exception
java.lang.Exceptionpublic final void testMinus()
throws java.lang.Exception
java.lang.Exceptionpublic final void testLog()
throws java.lang.Exception
java.lang.Exceptionpublic final void testLog2()
throws java.lang.Exception
java.lang.Exceptionpublic final void testSin()
throws java.lang.Exception
java.lang.Exceptionpublic final void testSqrt()
throws java.lang.Exception
java.lang.Exceptionpublic final void testQuadratic()
throws java.lang.Exception
java.lang.Exceptionpublic final void testQuadraticToPresentation()
throws java.lang.Exception
java.lang.Exceptionpublic final void testQuadraticRoot()
throws java.lang.Exception
java.lang.Exceptionpublic final void testRoot()
throws java.lang.Exception
java.lang.Exceptionpublic final void testMatrix()
throws java.lang.Exception
java.lang.Exceptionpublic final void testVector()
throws java.lang.Exception
java.lang.Exceptionpublic final void testList()
throws java.lang.Exception
java.lang.Exceptionpublic final void testSetXJ()
throws java.lang.Exception
java.lang.Exceptionpublic final void testSelector()
throws java.lang.Exception
java.lang.Exceptionpublic final void testDeclare()
throws java.lang.Exception
java.lang.Exceptionpublic final void testDeclareVector()
throws java.lang.Exception
java.lang.Exceptionpublic final void testRelnXJ()
throws java.lang.Exception
java.lang.Exceptionpublic final void testXHTML()
throws java.lang.Exception
java.lang.Exceptionpublic final void testXHTML2()
throws java.lang.Exception
java.lang.Exceptionpublic final void testMath()
throws java.lang.Exception
java.lang.Exceptionpublic final void testMathNS()
throws java.lang.Exception
java.lang.Exceptionpublic final void testMathNSP()
throws java.lang.Exception
java.lang.Exceptionpublic final void testSemantics()
throws java.lang.Exception
java.lang.Exceptionpublic final void testExponent()
throws java.lang.Exception
java.lang.Exceptionpublic final void testMultipleDeclerations()
throws java.lang.Exception
java.lang.Exceptionpublic final void testMathDTD()
throws java.lang.Exception
java.lang.Exceptionpublic final void testFunctionsExists()
throws java.lang.Exception
java.lang.Exceptionpublic final void testOperatorsExists()
throws java.lang.Exception
java.lang.ExceptionCopyright © 2018 Singular Systems http://www.singularsys.com/jep