public void TestChoiseFail(string text, string remaining) { var hex = new Choices( new Ranges('0', '9'), new Ranges('a', 'f'), new Ranges('A', 'F') ); var match = hex.Match(text); Assert.False(match.Success()); Assert.Equal(remaining, match.RemainingText()); }
public void TestChoiseCharacterAndRangeSuccess(string text, string remaining) { var hex = new Choices( new Charact('N'), new Ranges('0', '9'), new Ranges('a', 'f'), new Ranges('A', 'F') ); var match = hex.Match(text); Assert.True(match.Success()); Assert.Equal(remaining, match.RemainingText()); }