Exemplo n.º 1
0
 def test_integral_with_func(self):
     data = EquationData(r"""\[\int_{a}^{b}{x^2}{\delta x}\]""")
     mathNode = data.findMathNode()
     nextNode = data.getNextNode(mathNode, -1)
     res, _ = data.buildNode(nextNode)
     self.assertIsNotNone(res, "Build node should return a node")
     self.assertEqual(res.getTokenType(), TokenType.T_INTEGRAL)
Exemplo n.º 2
0
 def test_tan(self):
     data = EquationData(r"""\[\tan\]""")
     mathNode = data.findMathNode()
     nextNode = data.getNextNode(mathNode, -1)
     res, _ = data.buildNode(nextNode)
     self.assertIsNotNone(res, "Build node should return a node")
Exemplo n.º 3
0
 def test_consumeMathNode(self):
     data = EquationData(r"""\[3\times4\]""")
     mathNode = data.findMathNode()
     nextNode = data.getNextNode(mathNode, -1)
     self.assertEqual(True, isinstance(nextNode, LatexCharsNode))