Kaydet (Commit) 6486899b authored tarafından Miklos Vajna's avatar Miklos Vajna

test RTF_M{RAD,SEPCHR,SSUB,F}

Change-Id: I73f472fb09f97d94fbc9ef5cf38d9cf3c4beb999
üst c0bd973c
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
{\mrad
{\mradPr
{\mdegHide on}
{\mctrlPr\f34 }
}
{\mdeg
{\rtlch\fcs1 \af1 \ltrch\fcs0
\f34\insrsid816065 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid816065 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 4}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
{\mrad
{\mradPr
{\mctrlPr
\f34 }
}
{\mdeg
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid816065 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 3}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid816065 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid816065 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 +1}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
}
}
}
}
}
\par
}
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13126585 }
{\md
{\mdPr
{\mbegChr A}
{\msepChr B}
{\mendChr C}
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid13126585 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13126585 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid13126585 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 y}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid13126585 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid13126585 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 z}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13126585 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13126585 }
}
}
}
\par
}
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSup
{\msSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 y}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 +}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSup
{\msSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1
\ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 e}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{
\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSup
{\msSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{
\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0
\f34\insrsid15485000 }
{\msSub
{\msSubPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSubSup
{\msSubSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 c}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msPre
{\msPrePr
{\mctrlPr\f34 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 2}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000
\hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 1}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0
\f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSubSup
{\msSubSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msPre
{\msPrePr
{\mctrlPr\f34 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 4}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 5}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid15485000 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\mlimLow
{\mlimLowPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\mlimUpp
{\mlimUppPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\mlim
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 6}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\mlim
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 3}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{
\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 2}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0
\f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 1}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
}
}
}
\par
}
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
}
}
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6706768
\par }
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mtype lin}
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
}
}
}
}
{
\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6706768
\par }
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mtype noBar}
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
}
}
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6706768
\par }
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mtype noBar}
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mtype noBar}
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 c}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
}
}
}
}
\par
}
...@@ -63,6 +63,10 @@ public: ...@@ -63,6 +63,10 @@ public:
void testMathLimupp(); void testMathLimupp();
void testMathStrikeh(); void testMathStrikeh();
void testMathPlaceholders(); void testMathPlaceholders();
void testMathRad();
void testMathSepchr();
void testMathSubscripts();
void testMathVerticalstacks();
CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT) #if !defined(MACOSX) && !defined(WNT)
...@@ -88,6 +92,10 @@ public: ...@@ -88,6 +92,10 @@ public:
CPPUNIT_TEST(testMathLimupp); CPPUNIT_TEST(testMathLimupp);
CPPUNIT_TEST(testMathStrikeh); CPPUNIT_TEST(testMathStrikeh);
CPPUNIT_TEST(testMathPlaceholders); CPPUNIT_TEST(testMathPlaceholders);
CPPUNIT_TEST(testMathRad);
CPPUNIT_TEST(testMathSepchr);
CPPUNIT_TEST(testMathSubscripts);
CPPUNIT_TEST(testMathVerticalstacks);
#endif #endif
#endif #endif
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
...@@ -358,6 +366,37 @@ void Test::testMathPlaceholders() ...@@ -358,6 +366,37 @@ void Test::testMathPlaceholders()
CPPUNIT_ASSERT_EQUAL(OUString("sum from <?> to <?> <?>"), aActual); CPPUNIT_ASSERT_EQUAL(OUString("sum from <?> to <?> <?>"), aActual);
} }
void Test::testMathRad()
{
roundtrip("math-rad.rtf");
OUString aActual = getFormula(getRun(getParagraph(1), 1));
CPPUNIT_ASSERT_EQUAL(OUString("sqrt {4} nroot {3} {x + 1}"), aActual);
}
void Test::testMathSepchr()
{
roundtrip("math-sepchr.rtf");
OUString aActual = getFormula(getRun(getParagraph(1), 1));
CPPUNIT_ASSERT_EQUAL(OUString("AxByBzC"), aActual);
}
void Test::testMathSubscripts()
{
roundtrip("math-subscripts.rtf");
OUString aActual = getFormula(getRun(getParagraph(1), 1));
OUString aExpected("{x} ^ {y} + {e} ^ {x} {x} ^ {b} {x} rsub {b} {a} rsub {c} rsup {b} {x} lsub {2} lsup {1} {{x csup {6} csub {3}} lsub {4} lsup {5}} rsub {2} rsup {1}");
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
}
void Test::testMathVerticalstacks()
{
roundtrip("math-vertical-stacks.rtf");
CPPUNIT_ASSERT_EQUAL(OUString("{a} over {b}"), getFormula(getRun(getParagraph(1), 1)));
CPPUNIT_ASSERT_EQUAL(OUString("{a} / {b}"), getFormula(getRun(getParagraph(2), 1)));
CPPUNIT_ASSERT_EQUAL(OUString("stack { a # b }"), getFormula(getRun(getParagraph(3), 1)));
CPPUNIT_ASSERT_EQUAL(OUString("stack { a # stack { b # c } }"), getFormula(getRun(getParagraph(4), 1)));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
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