Esempio n. 1
0
        public void TestDone()
        {
            //Arrange
            LineReader lr = new LineReader("../../../example/constant.mza");

            // Act
            while (!lr.Done())
            {
                lr.Read();
            }

            // Assert
            Assert.True(lr.Done());
        }
Esempio n. 2
0
        public void TestRead()
        {
            // Arrange
            string     expectedText = "(define main() -> int:" + System.Environment.NewLine + "    (1))";
            LineReader lr           = new LineReader("../../../example/constant.mza");

            // Act
            string outText = "";

            while (!lr.Done())
            {
                outText += lr.Read();
            }

            // Assert
            Assert.Equal(expectedText, outText);
        }