[Libreoffice-commits] core.git: starmath/qa starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Wed Nov 26 04:56:06 PST 2014
starmath/qa/cppunit/test_nodetotextvisitors.cxx | 4 ++--
starmath/source/visitors.cxx | 24 ++++++++++++------------
2 files changed, 14 insertions(+), 14 deletions(-)
New commits:
commit ede5d170ea25c7983ed890075d9d5479aaa08d88
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Mon Nov 24 10:34:13 2014 +0900
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 09d1d6c..6940f19 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 b0bf0df..60f6127 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 );
}
}
More information about the Libreoffice-commits
mailing list