Beispiel #1
0
 def test_comments(self):
     pol = """
     # This is a full-line pound comment
     12 # A partial-line comment with (+ 23 43) keywords
     (+ 3 # An expression with embedded comments
     2)
     """
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, [ 12, 5 ])
Beispiel #2
0
 def test_comments(self):
     pol = """
     # This is a full-line pound comment
     12 # A partial-line comment with (+ 23 43) keywords
     (+ 3 # An expression with embedded comments
     2)
     """
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, [12, 5])
Beispiel #3
0
 def verify(self, pol, expected):
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, expected)
Beispiel #4
0
 def verify(self, pol, expected):
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, expected)
Beispiel #5
0
 def setUp(self):
     self.e = Parser.Evaluator()