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()
parseandparseagain("sum{a}", "Sum");
parseandparseagain("prod{a}", "Product");
parseandparseagain("coprod{a}", "Coproduct");
//FIXME 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)");
parseandparseagain("int from {r_0} to {r_t} a", "Upper and lower bounds shown with integral (from & to)");
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");
parseandparseagain("int{a}", "Integral");
parseandparseagain("iint{a}", "Double integral");
......
......@@ -2238,21 +2238,21 @@ void SmNodeToTextVisitor::Visit( SmOperNode* pNode )
LineToText( pChild );
Append( "} " );
}
if( ( pChild = pSubSup->GetSubSup( CSUB ) ) ) {
if( ( pChild = pSubSup->GetSubSup( CSUP ) ) ) {
Separate( );
if (pSubSup->IsUseLimits())
Append( "from { " );
Append( "to { " );
else
Append( "csub { " );
Append( "csup { " );
LineToText( pChild );
Append( "} " );
}
if( ( pChild = pSubSup->GetSubSup( CSUP ) ) ) {
if( ( pChild = pSubSup->GetSubSup( CSUB ) ) ) {
Separate( );
if (pSubSup->IsUseLimits())
Append( "to { " );
Append( "from { " );
else
Append( "csup { " );
Append( "csub { " );
LineToText( pChild );
Append( "} " );
}
......@@ -2428,20 +2428,20 @@ void SmNodeToTextVisitor::Visit( SmSubSupNode* pNode )
Append( "_ " );
LineToText( pChild );
}
if( ( pChild = pNode->GetSubSup( CSUB ) ) ) {
if( ( pChild = pNode->GetSubSup( CSUP ) ) ) {
Separate( );
if (pNode->IsUseLimits())
Append( "from " );
Append( "to " );
else
Append( "csub " );
Append( "csup " );
LineToText( pChild );
}
if( ( pChild = pNode->GetSubSup( CSUP ) ) ) {
if( ( pChild = pNode->GetSubSup( CSUB ) ) ) {
Separate( );
if (pNode->IsUseLimits())
Append( "to " );
Append( "from " );
else
Append( "csup " );
Append( "csub " );
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