Ejemplo n.º 1
0
        void LookAheadSymbolInputFile()
        {
            var inputString = new InputFile(@"C:\Users\Kenystev\Documents\Compiladores\CStoJS_Compiler\lookAheadTry.txt");

            Assert.True('a' == inputString.GetNextSymbol().character);
            Assert.True('b' == inputString.LookAheadSymbol().character);
            Assert.True('b' == inputString.LookAheadSymbol(0).character);
            Assert.True('c' == inputString.LookAheadSymbol(1).character);
            Assert.True('b' == inputString.GetNextSymbol().character);
            Assert.True('c' == inputString.LookAheadSymbol().character);
            Assert.True('c' == inputString.LookAheadSymbol(0).character);
            Assert.True('c' == inputString.GetNextSymbol().character);
            Assert.True('\0' == inputString.LookAheadSymbol().character);
        }