예제 #1
0
        public void ParseError(IErrorCase @case)
        {
            var pos = @case.Start;

            Assert.Throws <FormatException>(() => SymbolAndPowerReader.Read(@case.Text, ref pos));
            Assert.AreEqual(@case.ExpectedEnd, pos);
        }
예제 #2
0
        public void ParseError(IErrorData data)
        {
            var pos = data.Start;

            Assert.Throws <FormatException>(() => SymbolAndPowerReader.Read(data.Text, ref pos));
            Assert.AreEqual(data.ExpectedEnd, pos);
        }
예제 #3
0
        public void ParseSuccess(ISuccessData data)
        {
            var pos    = data.Start;
            var actual = SymbolAndPowerReader.Read(data.Text, ref pos);

            Assert.AreEqual(data.Expected, actual);
            Assert.AreEqual(data.ExpectedEnd, pos);
        }