Exemplo n.º 1
0
 def testSymbolErrors(self):
     for form, expected_errors in self.forms:
         ast = parse_string(form)
         symboltable = {}
         errors = []
         SymbolChecker(symboltable, errors).check(ast)
         self.assertEqual(len(errors), expected_errors)
Exemplo n.º 2
0
 def testSymbolTables(self):
     for form, table in self.symboltables:
         ast = parse_string(form)
         symboltable = {}
         SymbolChecker(symboltable).check(ast)
         self.assertEqual(symboltable, table)
Exemplo n.º 3
0
 def testDependencyErrors(self):
     for form, expected_errors in self.forms:
         ast = parse_string(form)
         errors = []
         DependencyChecker(errors).check(ast)
         self.assertEqual(len(errors), expected_errors)