상속: IronMeta.UnitTests.Matcher.Combine1
예제 #1
0
        public void TestCombineOverride()
        {
            var matcher = new Combine2();

            var match = matcher.GetMatch("override", matcher.VirtualRule);
            Assert.IsTrue(match.Success);
            Assert.AreEqual(314, match.Result);
        }
예제 #2
0
        public void TestCombineOverride()
        {
            var matcher = new Combine2();

            var match = matcher.GetMatch("override", matcher.VirtualRule);

            Assert.IsTrue(match.Success);
            Assert.AreEqual(314, match.Result);
        }
예제 #3
0
        public void TestCombine()
        {
            var matcher = new Combine2();

            var match = matcher.GetMatch("ghi", matcher.Rule1);
            Assert.IsTrue(match.Success);
            Assert.AreEqual(3, match.Result);

            match = matcher.GetMatch("jkl", matcher.Rule2);
            Assert.IsTrue(match.Success);
            Assert.AreEqual(4, match.Result);

            match = matcher.GetMatch("abc", matcher.Rule5);
            Assert.IsTrue(match.Success);
            Assert.AreEqual(1, match.Result);

            match = matcher.GetMatch("def", matcher.Rule6);
            Assert.IsTrue(match.Success);
            Assert.AreEqual(2, match.Result);
        }
예제 #4
0
        public void TestCombine()
        {
            var matcher = new Combine2();

            var match = matcher.GetMatch("ghi", matcher.Rule1);

            Assert.IsTrue(match.Success);
            Assert.AreEqual(3, match.Result);

            match = matcher.GetMatch("jkl", matcher.Rule2);
            Assert.IsTrue(match.Success);
            Assert.AreEqual(4, match.Result);

            match = matcher.GetMatch("abc", matcher.Rule5);
            Assert.IsTrue(match.Success);
            Assert.AreEqual(1, match.Result);

            match = matcher.GetMatch("def", matcher.Rule6);
            Assert.IsTrue(match.Success);
            Assert.AreEqual(2, match.Result);
        }