예제 #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)