Home | History | Annotate | Download | only in tests
      1 import antlr3
      2 import testbase
      3 import unittest
      4 
      5 
      6 class t024finally(testbase.ANTLRTest):
      7     def setUp(self):
      8         self.compileGrammar()
      9         
     10 
     11     def testValid1(self):
     12         cStream = antlr3.StringStream('foobar')
     13         lexer = self.getLexer(cStream)
     14         tStream = antlr3.CommonTokenStream(lexer)
     15         parser = self.getParser(tStream)
     16         events = parser.prog()
     17 
     18         assert events == ['catch', 'finally'], events
     19 
     20 
     21 if __name__ == '__main__':
     22     unittest.main()
     23 
     24