tdf#99996 tdf#100594 tdf#100754 Add qa unit test
- tdf#99996: new algorithm for better fraction representation - tdf#100594: forced denominator with one ? for numerator - tdf#100754: forced denominator with text after fraction Change-Id: I0990c7b3848ba5def629346f71be732d75ca248d Reviewed-on: https://gerrit.libreoffice.org/26867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
committed by
Caolán McNamara
parent
50094d8f8e
commit
37d97ff389
@@ -1099,6 +1099,21 @@ void Test::testUserDefinedNumberFormats()
|
||||
sExpected = "54:23:03 02/01/00";
|
||||
checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
|
||||
}
|
||||
{ // tdf#99996: better algorithm for fraction representation
|
||||
sCode = "# ?/???";
|
||||
sExpected = "-575 540/697";
|
||||
checkPreviewString(aFormatter, sCode, -575.774749601315, eLang, sExpected);
|
||||
}
|
||||
{ // tdf#100594: forced denominator
|
||||
sCode = "# ?/100";
|
||||
sExpected = " 6/100";
|
||||
checkPreviewString(aFormatter, sCode, 0.06, eLang, sExpected);
|
||||
}
|
||||
{ // tdf#100754: forced denominator with text after fraction
|
||||
sCode = "# ?/16\" inch\"";
|
||||
sExpected = "2 6/16 inch";
|
||||
checkPreviewString(aFormatter, sCode, 2.379, eLang, sExpected);
|
||||
}
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
||||
|
Reference in New Issue
Block a user