Antlr4.Test.StringTemplate.TestCoreBasics.TestIndirectMap C# (CSharp) Méthode

TestIndirectMap() private méthode

private TestIndirectMap ( ) : void
Résultat void
        public void TestIndirectMap()
        {
            TemplateGroup group = new TemplateGroup();
            group.DefineTemplate("inc", "[<x>]", new string[] { "x" });
            group.DefineTemplate("test", "<name:(t)()>!", new string[] { "t", "name" });
            Template st = group.GetInstanceOf("test");
            st.Add("t", "inc");
            st.Add("name", "Ter");
            st.Add("name", "Tom");
            st.Add("name", "Sumana");
            string expected =
                "[Ter][Tom][Sumana]!";
            string result = st.Render();
            Assert.AreEqual(expected, result);
        }
TestCoreBasics