diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-11-24 10:34:13 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-26 12:55:46 +0000 |
commit | ede5d170ea25c7983ed890075d9d5479aaa08d88 (patch) | |
tree | a05869fac65042d8af2ad36ee14cc427eab78612 /starmath | |
parent | 9673698f35ad249bc96506965b5e467d1f7ea0e9 (diff) |
fdo#70185: Correct and reenable SmNodeToTextVisitor's test case
This fixes the order of handling csub/csup changed at 80de3c0fe6b191f6d528ae1142737e2561b12ccd.
Change-Id: I1b5ad39b367e1933f8a17ce8126feed4d996f662
Reviewed-on: https://gerrit.libreoffice.org/13086
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/qa/cppunit/test_nodetotextvisitors.cxx | 4 | ||||
-rw-r--r-- | starmath/source/visitors.cxx | 24 |
2 files changed, 14 insertions, 14 deletions
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx index 09d1d6cd50e0..6940f194bfd7 100644 --- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx +++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx @@ -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"); diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index b0bf0df399d9..60f6127b8a0f 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -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 ); } } |