Permalink
Browse files

Refatorando

  • Loading branch information...
1 parent 2660f70 commit 4260a11009fe10c51ae1a99a372e79307cae8b05 @thiagopradi committed Dec 12, 2010
Showing with 1 addition and 5 deletions.
  1. +1 −5 test/test_semantic.py
View
6 test/test_semantic.py
@@ -25,11 +25,7 @@ def test_semantic_action_5(self):
self.assertTrue(SemanticTools.symbol_table["outro"])
def test_semantic_error_with_input(self):
- try:
- parser.parse(u"def teste : \n [ input(lado); ]", lexer())
- raise Exception("Error")
- except Exception, e:
- self.assertEqual(u"Erro na linha 2 - identificador lado não declarado", e.message)
+ self.assertParserError(u"def teste : \n [ input(lado); ]", u"Erro na linha 2 - identificador lado não declarado")
def test_semantic_success_with_input(self):
parser.parse(u"def teste : \n [ lado := 0; input(lado); ]", lexer())

0 comments on commit 4260a11

Please sign in to comment.