public void ParseError(IErrorCase @case) { var pos = @case.Start; Assert.Throws <FormatException>(() => SymbolAndPowerReader.Read(@case.Text, ref pos)); Assert.AreEqual(@case.ExpectedEnd, pos); }
public void ParseError(IErrorData data) { var pos = data.Start; Assert.Throws <FormatException>(() => SymbolAndPowerReader.Read(data.Text, ref pos)); Assert.AreEqual(data.ExpectedEnd, pos); }
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); }