예제 #1
0
 public void AtomicTest()
 {
     {
         var expr = new Atomic(char.IsLower);
         Assert.AreEqual(expr.Match("a"), true);
         Assert.AreEqual(expr.Match("A"), false);
         Assert.AreEqual(expr.Match(""), false);
     }
     {
         var expr = Chars.Create('1', '2', '3', '4', '5');
         Assert.AreEqual(expr.Match("1"), true);
         Assert.AreEqual(expr.Match("2"), true);
         Assert.AreEqual(expr.Match("3"), true);
         Assert.AreEqual(expr.Match("4"), true);
         Assert.AreEqual(expr.Match("5"), true);
         Assert.AreEqual(expr.Match("6"), false);
         Assert.AreEqual(expr.Match(""), false);
     }
 }