public void WideUnicodeContainsTest()
        {
            var target = new CharacterClass('\xFF', '\xFFFE');

            Assert.AreEqual(false, target.Contains((char)254));
            Assert.AreEqual(true, target.Contains((char)255));

            Assert.AreEqual(true, target.Contains((char)65534));
            Assert.AreEqual(false, target.Contains((char)65535));
        }
Exemplo n.º 2
0
        internal override IEnumerable <NFAState> StatesForChar(char character)
        {
            if (charMap.Contains(character))
            {
                return new[] { this.exit }
            }
            ;

            return(Enumerable.Empty <NFAState>());
        }
    }
        public void SwappedRangeContainsTest(char c, bool expected)
        {
            var target = new CharacterClass('d', 'b');

            Assert.AreEqual(expected, target.Contains(c));
        }