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

TestDictEmptyDefaultValue() private method

private TestDictEmptyDefaultValue ( ) : void
return void
        public void TestDictEmptyDefaultValue()
        {
            string templates =
                    "typeInit ::= [\"int\":\"0\", default:] " + newline +
                    "var(type,name) ::= \"<type> <name> = <typeInit.(type)>;\"" + newline
                    ;
            writeFile(tmpdir, "test.stg", templates);
            ErrorBuffer errors = new ErrorBuffer();
            TemplateGroupFile group = new TemplateGroupFile(Path.Combine(tmpdir, "test.stg"));
            group.Listener = errors;
            group.Load();
            string expected = "[test.stg 1:33: missing value for key at ']']";
            string result = errors.Errors.ToListString();
            Assert.AreEqual(expected, result);
        }