Antlr4.Test.StringTemplate.TestCoreBasics.TestPassThruWithDefaultValue C# (CSharp) Method

TestPassThruWithDefaultValue() private method

private TestPassThruWithDefaultValue ( ) : void
return void
        public void TestPassThruWithDefaultValue()
        {
            string templates =
                "a(x,y) ::= \"<b(...)>\"\n" + // should not set y when it sees "no value" from above
                "b(x,y={99}) ::= \"<x><y>\"\n";
            TemplateGroup group = new TemplateGroupString(templates);
            Template a = group.GetInstanceOf("a");
            a.Add("x", "x");
            string expected = "x99";
            string result = a.Render();
            Assert.AreEqual(expected, result);
        }
TestCoreBasics