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

TestFalseCondWithFormalArgs() private method

private TestFalseCondWithFormalArgs ( ) : void
return void
        public void TestFalseCondWithFormalArgs()
        {
            // insert of indent instr was not working; ok now
            string dir = tmpdir;
            string groupFile =
                "a(scope) ::= <<\n" +
                "foo\n" +
                "    <if(scope)>oops<endif>\n" +
                "bar\n" +
                ">>\n";
            writeFile(dir, "group.stg", groupFile);
            TemplateGroupFile group = new TemplateGroupFile(dir + "/group.stg");
            Template st = group.GetInstanceOf("a");
            st.impl.Dump();
            string expected = "foo" + newline +
                              "bar";
            string result = st.Render();
            Assert.AreEqual(expected, result);
        }
TestCoreBasics