Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5e180078
Kaydet (Commit)
5e180078
authored
Şub 15, 2017
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
unit test for engineering notation, tdf#105968
Change-Id: Ib5303f09cfda232b0bee88df3d76650165337c08
üst
63bc2b13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
svl.cxx
svl/qa/unit/svl.cxx
+35
-0
No files found.
svl/qa/unit/svl.cxx
Dosyayı görüntüle @
5e180078
...
...
@@ -1221,6 +1221,41 @@ void Test::testUserDefinedNumberFormats()
sCode
=
"[DBNum2][$-0404]General
\\
"
;
checkPreviewString
(
aFormatter
,
sCode
,
120
,
eLang
,
sExpected
);
}
{
// tdf#105968 engineering format with value rounded up to next magnitude
sCode
=
"##0.00E+00"
;
sExpected
=
"100.00E+00"
;
checkPreviewString
(
aFormatter
,
sCode
,
99.995
,
eLang
,
sExpected
);
// test '1'=='1' assumption
checkPreviewString
(
aFormatter
,
sCode
,
100.0
,
eLang
,
sExpected
);
sExpected
=
"199.99E+00"
;
checkPreviewString
(
aFormatter
,
sCode
,
199.99
,
eLang
,
sExpected
);
sExpected
=
"1.00E+03"
;
checkPreviewString
(
aFormatter
,
sCode
,
1000.0
,
eLang
,
sExpected
);
// and another just "normally" rounded value
sExpected
=
"894.55E-06"
;
checkPreviewString
(
aFormatter
,
sCode
,
0.000894549
,
eLang
,
sExpected
);
// not expecting rounding into another magnitude
sExpected
=
"999.99E-06"
;
checkPreviewString
(
aFormatter
,
sCode
,
0.000999991
,
eLang
,
sExpected
);
// expecting rounding into another magnitude
sExpected
=
"1.00E-03"
;
checkPreviewString
(
aFormatter
,
sCode
,
0.000999999
,
eLang
,
sExpected
);
// Now the same all negative values.
sExpected
=
"-100.00E+00"
;
checkPreviewString
(
aFormatter
,
sCode
,
-
99.995
,
eLang
,
sExpected
);
checkPreviewString
(
aFormatter
,
sCode
,
-
100.0
,
eLang
,
sExpected
);
sExpected
=
"-199.99E+00"
;
checkPreviewString
(
aFormatter
,
sCode
,
-
199.99
,
eLang
,
sExpected
);
sExpected
=
"-1.00E+03"
;
checkPreviewString
(
aFormatter
,
sCode
,
-
1000.0
,
eLang
,
sExpected
);
sExpected
=
"-894.55E-06"
;
checkPreviewString
(
aFormatter
,
sCode
,
-
0.000894549
,
eLang
,
sExpected
);
sExpected
=
"-999.99E-06"
;
checkPreviewString
(
aFormatter
,
sCode
,
-
0.000999991
,
eLang
,
sExpected
);
sExpected
=
"-1.00E-03"
;
checkPreviewString
(
aFormatter
,
sCode
,
-
0.000999999
,
eLang
,
sExpected
);
}
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment