Пример #1
0
 def testParseNumber(self):
     assert(minilisp.parse("3") == 3)
Пример #2
0
 def testParseNested(self):
     assert(minilisp.parse("(+ 3 (+ 4 5))") == ['+', 3, ['+', 4, 5]])
Пример #3
0
 def testParseEmpty(self):
     assert(minilisp.parse('') == [])
Пример #4
0
 def testParse(self):
     self.assertEqual(3, minilisp.parse("3"))
     self.assertEqual('x', minilisp.parse("x"))
     self.assertEqual(['+', 'x', 'y'], minilisp.parse("(+ x y)"))
Пример #5
0
 def testParseExpr(self):
     assert(minilisp.parse("(+ 3 4)") == ['+', 3, 4])
Пример #6
0
 def testParse(self):
     self.assertEqual(3, minilisp.parse("3"))
     self.assertEqual('x', minilisp.parse("x"))
     self.assertEqual(['+', 'x', 'y'], minilisp.parse("(+ x y)"))
Пример #7
0
 def testParseEmpty(self):
     assert (minilisp.parse('') == [])
Пример #8
0
 def testParseNested(self):
     assert (minilisp.parse("(+ 3 (+ 4 5))") == ['+', 3, ['+', 4, 5]])
Пример #9
0
 def testParseExpr(self):
     assert (minilisp.parse("(+ 3 4)") == ['+', 3, 4])
Пример #10
0
 def testParseNumber(self):
     assert (minilisp.parse("3") == 3)