Antlr4.Test.StringTemplate.TestDictionaries.TestDictionaryBehaviorEmptyList C# (CSharp) Method

TestDictionaryBehaviorEmptyList() private method

private TestDictionaryBehaviorEmptyList ( ) : void
return void
        public void TestDictionaryBehaviorEmptyList()
        {
            string templates =
                "d ::= [\n" +
                "	\"x\" : [],\n" +
                "	default : false,\n" +
                "]\n" +
                "\n" +
                "t() ::= <<\n" +
                "<d.(\"x\")><if(d.(\"x\"))>+<else>-<endif>\n" +
                ">>\n";

            writeFile(tmpdir, "t.stg", templates);
            TemplateGroup group = new TemplateGroupFile(tmpdir + Path.DirectorySeparatorChar + "t.stg");
            Template st = group.GetInstanceOf("t");
            string expected = "-";
            string result = st.Render();
            Assert.AreEqual(expected, result);
        }