" {/call}\n";
List<StandaloneNode> nodes = parseTemplateBody(templateBody);
assertEquals(5, nodes.size());
CallBasicNode cn0 = (CallBasicNode) nodes.get(0);
assertEquals(SyntaxVersion.V2, cn0.getSyntaxVersion());
assertEquals(null, cn0.getCalleeName());
assertEquals(".booTemplate_", cn0.getSrcCalleeName());
assertEquals(false, cn0.isPassingData());
assertEquals(false, cn0.isPassingAllData());
assertEquals(null, cn0.getDataExpr());
assertEquals("XXX", cn0.genBasePlaceholderName());
assertEquals(0, cn0.numChildren());
CallBasicNode cn1 = (CallBasicNode) nodes.get(1);
assertEquals(SyntaxVersion.V1, cn1.getSyntaxVersion());
assertEquals(null, cn1.getCalleeName());
assertEquals("foo.goo.mooTemplate", cn1.getSrcCalleeName());
assertEquals(true, cn1.isPassingData());
assertEquals(true, cn1.isPassingAllData());
assertEquals(null, cn1.getDataExpr());
assertFalse(cn1.genSamenessKey().equals(cn0.genSamenessKey()));
assertEquals(0, cn1.numChildren());
CallBasicNode cn2 = (CallBasicNode) nodes.get(2);
assertEquals(SyntaxVersion.V2, cn2.getSyntaxVersion());
assertEquals(null, cn2.getCalleeName());
assertEquals(".zooTemplate", cn2.getSrcCalleeName());
assertEquals(true, cn2.isPassingData());
assertEquals(false, cn2.isPassingAllData());
assertTrue(cn2.getDataExpr().getChild(0) != null);
assertEquals("$animals", cn2.getDataExpr().toSourceString());
assertEquals(3, cn2.numChildren());
{
final CallParamValueNode cn2cpvn0 = (CallParamValueNode) cn2.getChild(0);
assertEquals("yoo", cn2cpvn0.getKey());
assertEquals("round($too)", cn2cpvn0.getValueExprText());
assertTrue(cn2cpvn0.getValueExprUnion().getExpr().getChild(0) instanceof FunctionNode);
}
{
final CallParamContentNode cn2cpcn1 = (CallParamContentNode) cn2.getChild(1);
assertEquals("woo", cn2cpcn1.getKey());
assertNull(cn2cpcn1.getContentKind());
assertEquals("poo", ((RawTextNode) cn2cpcn1.getChild(0)).getRawText());
}
{
final CallParamContentNode cn2cpcn2 = (CallParamContentNode) cn2.getChild(2);
assertEquals("doo", cn2cpcn2.getKey());
assertNotNull(cn2cpcn2.getContentKind());
assertEquals(ContentKind.HTML, cn2cpcn2.getContentKind());
assertEquals("doopoo", ((RawTextNode) cn2cpcn2.getChild(0)).getRawText());
}
CallBasicNode cn3 = (CallBasicNode) nodes.get(3);
assertEquals(SyntaxVersion.V2, cn3.getSyntaxVersion());
assertEquals(null, cn3.getCalleeName());
assertEquals(".booTemplate_", cn3.getSrcCalleeName());
assertEquals(false, cn3.isPassingData());
assertEquals(false, cn3.isPassingAllData());
assertEquals(null, cn3.getDataExpr());
assertEquals("XXX", cn3.genBasePlaceholderName());
assertEquals(0, cn3.numChildren());
CallBasicNode cn4 = (CallBasicNode) nodes.get(4);
assertEquals(SyntaxVersion.V2, cn4.getSyntaxVersion());
assertEquals(null, cn4.getCalleeName());
assertEquals(".zooTemplate", cn4.getSrcCalleeName());
assertEquals(true, cn4.isPassingData());
assertEquals(false, cn4.isPassingAllData());
assertTrue(cn4.getDataExpr().getChild(0) != null);
assertEquals("$animals", cn4.getDataExpr().toSourceString());
assertEquals(4, cn4.numChildren());
{
final CallParamValueNode cn4cpvn0 = (CallParamValueNode) cn4.getChild(0);
assertEquals("yoo", cn4cpvn0.getKey());
assertEquals("round($too)", cn4cpvn0.getValueExprText());
assertTrue(cn4cpvn0.getValueExprUnion().getExpr().getChild(0) instanceof FunctionNode);
}
{
final CallParamContentNode cn4cpcn1 = (CallParamContentNode) cn4.getChild(1);
assertEquals("woo", cn4cpcn1.getKey());
assertNull(cn4cpcn1.getContentKind());
assertEquals("poo", ((RawTextNode) cn4cpcn1.getChild(0)).getRawText());
}
{
final CallParamValueNode cn4cpvn2 = (CallParamValueNode) cn4.getChild(2);
assertEquals("zoo", cn4cpvn2.getKey());
assertEquals("0", cn4cpvn2.getValueExprText());
}
{
final CallParamContentNode cn4cpcn3 = (CallParamContentNode) cn4.getChild(3);
assertEquals("doo", cn4cpcn3.getKey());
assertNotNull(cn4cpcn3.getContentKind());
assertEquals(ContentKind.HTML, cn4cpcn3.getContentKind());
assertEquals("doopoo", ((RawTextNode) cn4cpcn3.getChild(0)).getRawText());
}