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
04560897
Kaydet (Commit)
04560897
authored
Agu 13, 2012
tarafından
Artur Dorda
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
decodeBase64 test is done and working
Change-Id: I4dfc20e0e577f986c626d4c4bab5b4e3214e4567
üst
57cac07a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
test_converter.cxx
sax/qa/cppunit/test_converter.cxx
+14
-0
No files found.
sax/qa/cppunit/test_converter.cxx
Dosyayı görüntüle @
04560897
...
...
@@ -518,6 +518,17 @@ void doTestEncodeBase64(char const*const pis, const uno::Sequence<sal_Int8> aPas
OSL_TRACE
(
"%s"
,
::
rtl
::
OUStringToOString
(
buf
.
getStr
(),
RTL_TEXTENCODING_UTF8
).
getStr
());
CPPUNIT_ASSERT_EQUAL
(
is
,
buf
.
makeStringAndClear
());
}
void
doTestDecodeBase64
(
const
uno
::
Sequence
<
sal_Int8
>
aPass
,
char
const
*
const
pis
)
{
::
rtl
::
OUString
const
is
(
::
rtl
::
OUString
::
createFromAscii
(
pis
));
uno
::
Sequence
<
sal_Int8
>
tempSequence
;
Converter
::
decodeBase64
(
tempSequence
,
is
);
OSL_TRACE
(
"%s"
,
::
rtl
::
OUStringToOString
(
is
.
getStr
(),
RTL_TEXTENCODING_UTF8
).
getStr
());
bool
b
=
(
tempSequence
==
aPass
);
CPPUNIT_ASSERT
(
b
);
}
void
ConverterTest
::
testBase64
()
{
comphelper
::
SequenceAsVector
<
sal_Int8
>
tempSeq
(
4
);
...
...
@@ -525,17 +536,20 @@ void ConverterTest::testBase64()
tempSeq
.
push_back
(
i
);
uno
::
Sequence
<
sal_Int8
>
tempSequence
=
tempSeq
.
getAsConstList
();
doTestEncodeBase64
(
"AAAAAAABAgM="
,
tempSequence
);
doTestDecodeBase64
(
tempSequence
,
"AAAAAAABAgM="
);
tempSeq
[
0
]
=
sal_Int8
(
5
);
tempSeq
[
1
]
=
sal_Int8
(
2
);
tempSeq
[
2
]
=
sal_Int8
(
3
);
tempSequence
=
tempSeq
.
getAsConstList
();
doTestEncodeBase64
(
"BQIDAAABAgM="
,
tempSequence
);
doTestDecodeBase64
(
tempSequence
,
"BQIDAAABAgM="
);
tempSeq
[
0
]
=
sal_Int8
(
200
);
tempSeq
[
1
]
=
sal_Int8
(
31
);
tempSeq
[
2
]
=
sal_Int8
(
77
);
tempSeq
[
3
]
=
sal_Int8
(
111
);
tempSequence
=
tempSeq
.
getAsConstList
();
doTestEncodeBase64
(
"yB9NbwABAgM="
,
tempSequence
);
doTestDecodeBase64
(
tempSequence
,
"yB9NbwABAgM="
);
}
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