public void TestMatchingRange(int codePoint)
        {
            var sample = char.ConvertFromUtf32(codePoint);

            var grammar = new Grammar();
            var parser  = new SurrogatePairRangeTerminal(0x12345, 0x8F4FE);

            grammar.Inner = parser.Named("char");

            var match = grammar.Match(sample);

            Assert.True(match.Success, match.ErrorMessage);
        }
        public void TestMatchOutsideRange(int codePoint)
        {
            var sample = char.ConvertFromUtf32(codePoint);

            var grammar = new Grammar();
            var parser  = new SurrogatePairRangeTerminal(0x12346, 0x8F4FD);

            grammar.Inner = parser.Named("char");

            var match = grammar.Match(sample);

            Assert.False(match.Success, string.Format("Value {0} should be outside given range", codePoint));
        }
 private SurrogatePairRangeTerminal(SurrogatePairRangeTerminal other, ParserCloneArgs args)
     : base(other, args)
 {
 }
 private SurrogatePairRangeTerminal(SurrogatePairRangeTerminal other, ParserCloneArgs args)
     : base(other, args)
 {
 }