logo       

4140 - in trunk/Template: src/parsers/tst/implementations tests [eZComponen: msg#00313

web.ezcomponents.cvs

Subject: 4140 - in trunk/Template: src/parsers/tst/implementations tests [eZComponents: Trunk]

Author: Raymond Bosman
Date: 2006-11-30 10:28:23 +0100 (Thu, 30 Nov 2006)
New Revision: 4140

Log:
- Added missing abstract methods from the TST tree output.
- Enabled the TST output in the regression test system.

Modified:
trunk/Template/src/parsers/tst/implementations/tst_tree_output.php
trunk/Template/tests/regression_test.php

Modified: trunk/Template/src/parsers/tst/implementations/tst_tree_output.php
===================================================================
--- trunk/Template/src/parsers/tst/implementations/tst_tree_output.php
2006-11-30 09:00:07 UTC (rev 4139)
+++ trunk/Template/src/parsers/tst/implementations/tst_tree_output.php
2006-11-30 09:28:23 UTC (rev 4140)
@@ -310,7 +310,51 @@
$this->text .= $this->outputNode( $node );
}

+ public function visitCacheTstNode( ezcTemplateCacheTstNode $node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }

+ public function visitDeclarationTstNode( ezcTemplateDeclarationTstNode
$node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }
+
+ public function visitCycleControlTstNode( ezcTemplateCycleControlTstNode
$node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }
+
+ public function visitIncludeTstNode( ezcTemplateIncludeTstNode $node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }
+
+ public function visitReturnTstNode( ezcTemplateReturnTstNode $node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }
+
+ public function visitSwitchTstNode( ezcTemplateSwitchTstNode $node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }
+
+ public function visitCaseTstNode( ezcTemplateCaseTstNode $node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }
+
+ public function visitLiteralArrayTstNode( ezcTemplateLiteralArrayTstNode
$node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }
+
+ public function visitArrayRangeOperatorTstNode(
ezcTemplateArrayRangeOperatorTstNode $node )
+ {
+ $this->text .= $this->outputNode( $node );
+ }
+
/**
* Extracts position data from the specified node and set in the out
parameters.
* The position is taken from ezcTemplateTstNode::startCursor and
ezcTemplateTstNode::endCursor.

Modified: trunk/Template/tests/regression_test.php
===================================================================
--- trunk/Template/tests/regression_test.php 2006-11-30 09:00:07 UTC (rev
4139)
+++ trunk/Template/tests/regression_test.php 2006-11-30 09:28:23 UTC (rev
4140)
@@ -279,54 +279,56 @@
}
}
}
- if ( $reply == "dta" || $reply == "d" )
+
+ if ( $reply == "dtt" || $reply == "d" )
{
- if ( $template->astTree instanceof ezcTemplateAstNode )
+ // NOTE: This currently fails due to missing
implementations in the Tst class.
+ if ( $template->tstTree instanceof ezcTemplateTstNode )
{
if ( $reply == "d" )
{
- $displayText .= "------AST------\n";
+ $displayText .= "------TST------\n";
}
- $displayText .= ezcTemplateAstTreeOutput::output(
$template->astTree );
+
+ $displayText .= ezcTemplateTstTreeOutput::output(
$template->tstTree );
+ $displayText .= "\n";
}
else
{
if ( $reply == "d" )
{
- $displayText .= "------AST tree not
available------\n";
+ $displayText .= "------TST tree not
available------\n";
}
else
{
- echo "The AST tree is not available\n";
+ echo "The TST tree is not available\n";
continue;
}
}
}
- if ( $reply == "dtt" )
+ if ( $reply == "dta" || $reply == "d" )
{
- // NOTE: This currently fails due to missing
implementations in the Tst class.
- if ( $template->tstTree instanceof ezcTemplateTstNode )
+ if ( $template->astTree instanceof ezcTemplateAstNode )
{
if ( $reply == "d" )
{
- $displayText .= "------TST------\n";
+ $displayText .= "------AST------\n";
}
- $displayText .= ezcTemplateTstTreeOutput::output(
$template->tstTree );
+ $displayText .= ezcTemplateAstTreeOutput::output(
$template->astTree );
}
else
{
if ( $reply == "d" )
{
- $displayText .= "------TST tree not
available------\n";
+ $displayText .= "------AST tree not
available------\n";
}
else
{
- echo "The TST tree is not available\n";
+ echo "The AST tree is not available\n";
continue;
}
}
}
-
if ( PHP_OS == 'Linux' )
{
// Pipe the text to less



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise