Antlr4.Test.StringTemplate.TestCompiler.TestEmbeddedRegion C# (CSharp) Method

TestEmbeddedRegion() private method

private TestEmbeddedRegion ( ) : void
return void
        public void TestEmbeddedRegion()
        {
            string template = "<@r>foo<@end>";
            // compile as if in root dir and in template 'a'
            CompiledTemplate code = new TemplateCompiler(new TemplateGroup('<', '>')).Compile("a", template);
            string asmExpected =
                "new 0 0, write";
            string asmResult = code.GetInstructions();
            Assert.AreEqual(asmExpected, asmResult);
            string stringsExpected = "[/region__/a__r]";
            string stringsResult = code.strings.ToListString();
            Assert.AreEqual(stringsExpected, stringsResult);
        }