diff options
author | Eike Rathke <erack@redhat.com> | 2017-10-17 12:32:09 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-10-17 12:35:09 +0200 |
commit | d1538ef63863f7a016bd2c3752ccdd9819e41781 (patch) | |
tree | 0a7df4c7498cdd3009dda38aafff6c5582e52b61 /svl | |
parent | 0f50f4d91809c65b50da087a84fb7b8722fda3f9 (diff) |
More tests for time and date+time fractions of seconds, tdf#112933 related
Covering the loop and non-loop states in
ImpSvNumberformatScan::FinalScan()
Change-Id: I4a8da617a2a61ad12a99462bfe4014aaa5a75c1b
Diffstat (limited to 'svl')
-rw-r--r-- | svl/qa/unit/svl.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 43824e4d8c71..a8ebfbc281aa 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -1311,6 +1311,25 @@ void Test::testUserDefinedNumberFormats() sCode = "MM:SS.0"; sExpected = "23:53.6"; checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + // Two decimals. + sCode = "MM:SS.00"; + sExpected = "23:53.61"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + // Three decimals. + sCode = "MM:SS.000"; + sExpected = "23:53.605"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + + // Same with date+time. + sCode = "YYYY-MM-DD MM:SS.0"; + sExpected = "1900-01-02 23:53.6"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "YYYY-MM-DD MM:SS.00"; + sExpected = "1900-01-02 23:53.61"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); + sCode = "YYYY-MM-DD MM:SS.000"; + sExpected = "1900-01-02 23:53.605"; + checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected); } } |