def testSubstring(self):
    'StringStream.substring()'
    stream = antlr3.StringStream('foobar')
    self.failUnlessEqual(stream.substring(0, 0), 'f')
    self.failUnlessEqual(stream.substring(0, 1), 'fo')
    self.failUnlessEqual(stream.substring(0, 5), 'foobar')
    self.failUnlessEqual(stream.substring(3, 5), 'bar')
StringStream.substring()
def testSubstring(self):
    
    stream = antlr3.StringStream('foobar')
    self.failUnlessEqual(stream.substring(0, 0), 'f')
    self.failUnlessEqual(stream.substring(0, 1), 'fo')
    self.failUnlessEqual(stream.substring(0, 5), 'foobar')
    self.failUnlessEqual(stream.substring(3, 5), 'bar')