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
72001879
Kaydet (Commit)
72001879
authored
Agu 09, 2012
tarafından
Artur Dorda
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added testing 'measure to string' function
Change-Id: I36de98025ec72230cd960191ab47ab39ce965cc5
üst
978c6b87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
test_converter.cxx
sax/qa/cppunit/test_converter.cxx
+10
-0
No files found.
sax/qa/cppunit/test_converter.cxx
Dosyayı görüntüle @
72001879
...
...
@@ -322,6 +322,15 @@ void doTestStringToMeasure(sal_Int32 rValue, char const*const pis, sal_Int16 nTa
CPPUNIT_ASSERT_EQUAL
(
rValue
,
nVal
);
}
void
doTestMeasureToString
(
char
const
*
const
pis
,
sal_Int32
nMeasure
,
sal_Int16
const
nSourceUnit
,
sal_Int16
const
nTargetUnit
)
{
::
rtl
::
OUString
const
is
(
::
rtl
::
OUString
::
createFromAscii
(
pis
));
::
rtl
::
OUStringBuffer
buf
;
Converter
::
convertMeasure
(
buf
,
nMeasure
,
nSourceUnit
,
nTargetUnit
);
OSL_TRACE
(
"%s"
,
::
rtl
::
OUStringToOString
(
buf
.
getStr
(),
RTL_TEXTENCODING_UTF8
).
getStr
());
CPPUNIT_ASSERT_EQUAL
(
is
,
buf
.
makeStringAndClear
());
}
void
ConverterTest
::
testMeasure
()
{
doTestStringToMeasure
(
1000
,
"10mm"
,
MeasureUnit
::
MM_100TH
,
-
1
,
4321
);
...
...
@@ -344,6 +353,7 @@ void ConverterTest::testMeasure()
doTestStringToMeasure
(
600
,
"600px"
,
MeasureUnit
::
PIXEL
,
10
,
4321
);
doTestStringToMeasure
(
777
,
"777"
,
MeasureUnit
::
APPFONT
,
10
,
4321
);
doTestStringToMeasure
(
80000
,
"80000"
,
MeasureUnit
::
SYSFONT
,
10
,
432100
);
doTestMeasureToString
(
"60mm"
,
6000
,
MeasureUnit
::
MM_100TH
,
MeasureUnit
::
MM_10TH
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
ConverterTest
);
...
...
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