Kaydet (Commit) ede5d170 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Caolán McNamara

fdo#70185: Correct and reenable SmNodeToTextVisitor's test case

This fixes the order of handling csub/csup changed at 80de3c0f.

Change-Id: I1b5ad39b367e1933f8a17ce8126feed4d996f662
Reviewed-on: https://gerrit.libreoffice.org/13086Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 9673698f
...@@ -221,8 +221,8 @@ void Test::SimpleOperators() ...@@ -221,8 +221,8 @@ void Test::SimpleOperators()
parseandparseagain("sum{a}", "Sum"); parseandparseagain("sum{a}", "Sum");
parseandparseagain("prod{a}", "Product"); parseandparseagain("prod{a}", "Product");
parseandparseagain("coprod{a}", "Coproduct"); parseandparseagain("coprod{a}", "Coproduct");
//FIXME parseandparseagain("int from {r_0} to {r_t} a", "Upper and lower bounds shown with integral (from & to)"); parseandparseagain("int from {r_0} to {r_t} a", "Upper and lower bounds shown with integral (from & to)");
//FIXME ParseAndCheck("int csup {r_0} csub {r_t} a", "int csup { r rsub 0 } csub { r rsub t } a ", "Upper and lower bounds shown with integral (csub & csup)"); ParseAndCheck("int csup {r_0} csub {r_t} a", "int csup { r _ 0 } csub { r _ t } a ", "Upper and lower bounds shown with integral (csub & csup)");
//FIXME ParseAndCheck("sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "Sum with sized upper and lower bounds"); //FIXME ParseAndCheck("sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "Sum with sized upper and lower bounds");
parseandparseagain("int{a}", "Integral"); parseandparseagain("int{a}", "Integral");
parseandparseagain("iint{a}", "Double integral"); parseandparseagain("iint{a}", "Double integral");
......
...@@ -2238,21 +2238,21 @@ void SmNodeToTextVisitor::Visit( SmOperNode* pNode ) ...@@ -2238,21 +2238,21 @@ void SmNodeToTextVisitor::Visit( SmOperNode* pNode )
LineToText( pChild ); LineToText( pChild );
Append( "} " ); Append( "} " );
} }
if( ( pChild = pSubSup->GetSubSup( CSUB ) ) ) { if( ( pChild = pSubSup->GetSubSup( CSUP ) ) ) {
Separate( ); Separate( );
if (pSubSup->IsUseLimits()) if (pSubSup->IsUseLimits())
Append( "from { " ); Append( "to { " );
else else
Append( "csub { " ); Append( "csup { " );
LineToText( pChild ); LineToText( pChild );
Append( "} " ); Append( "} " );
} }
if( ( pChild = pSubSup->GetSubSup( CSUP ) ) ) { if( ( pChild = pSubSup->GetSubSup( CSUB ) ) ) {
Separate( ); Separate( );
if (pSubSup->IsUseLimits()) if (pSubSup->IsUseLimits())
Append( "to { " ); Append( "from { " );
else else
Append( "csup { " ); Append( "csub { " );
LineToText( pChild ); LineToText( pChild );
Append( "} " ); Append( "} " );
} }
...@@ -2428,20 +2428,20 @@ void SmNodeToTextVisitor::Visit( SmSubSupNode* pNode ) ...@@ -2428,20 +2428,20 @@ void SmNodeToTextVisitor::Visit( SmSubSupNode* pNode )
Append( "_ " ); Append( "_ " );
LineToText( pChild ); LineToText( pChild );
} }
if( ( pChild = pNode->GetSubSup( CSUB ) ) ) { if( ( pChild = pNode->GetSubSup( CSUP ) ) ) {
Separate( ); Separate( );
if (pNode->IsUseLimits()) if (pNode->IsUseLimits())
Append( "from " ); Append( "to " );
else else
Append( "csub " ); Append( "csup " );
LineToText( pChild ); LineToText( pChild );
} }
if( ( pChild = pNode->GetSubSup( CSUP ) ) ) { if( ( pChild = pNode->GetSubSup( CSUB ) ) ) {
Separate( ); Separate( );
if (pNode->IsUseLimits()) if (pNode->IsUseLimits())
Append( "to " ); Append( "from " );
else else
Append( "csup " ); Append( "csub " );
LineToText( pChild ); LineToText( pChild );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment