diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2016-07-01 19:40:58 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-06 09:54:38 +0000 |
commit | 37d97ff389d0941b32405f3433d2e595e10c76ab (patch) | |
tree | e0c23fb766f37167033999c556a5ccb9e17b6d6f | |
parent | 50094d8f8eb7067009c3e9a86053d82e4c0af739 (diff) |
- 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>
-rw-r--r-- | svl/qa/unit/svl.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 5c6b7452d1e8..6271a5968fb5 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -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); |