Antlr4.Test.StringTemplate.TestSyntaxErrors.TestEmptyExpr C# (CSharp) Method

TestEmptyExpr() private method

private TestEmptyExpr ( ) : void
return void
        public void TestEmptyExpr()
        {
            string template = " <> ";
            TemplateGroup group = new TemplateGroup();
            ErrorBuffer errors = new ErrorBuffer();
            group.Listener = errors;
            try
            {
                group.DefineTemplate("test", template);
            }
            catch (TemplateException)
            {
            }
            string result = errors.ToString();
            string expected = "test 1:0: this doesn't look like a template: \" <> \"" + newline;
            Assert.AreEqual(expected, result);
        }