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
67bdb8f1
Kaydet (Commit)
67bdb8f1
authored
Mar 16, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use SAL_N_ELEMENTS
Change-Id: I6610f8e888389d09b673504f1eb9387dd38fb6c1
üst
abdba4ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
test_stream.cxx
tools/qa/cppunit/test_stream.cxx
+6
-6
No files found.
tools/qa/cppunit/test_stream.cxx
Dosyayı görüntüle @
67bdb8f1
...
...
@@ -61,7 +61,7 @@ namespace
{
char
foo
[]
=
"foo"
;
std
::
istringstream
iss
(
foo
,
std
::
istringstream
::
in
);
SvMemoryStream
aMemStream
(
(
void
*
)
foo
,
strlen
(
foo
)
,
STREAM_READ
);
SvMemoryStream
aMemStream
(
foo
,
SAL_N_ELEMENTS
(
foo
)
-
1
,
STREAM_READ
);
char
std_a
(
78
);
iss
>>
std_a
;
...
...
@@ -152,7 +152,7 @@ namespace
void
Test
::
test_fastostring
()
{
char
foo
[]
=
"foobar"
;
SvMemoryStream
aMemStream
(
(
void
*
)
foo
,
strlen
(
foo
)
,
STREAM_READ
);
SvMemoryStream
aMemStream
(
foo
,
SAL_N_ELEMENTS
(
foo
)
-
1
,
STREAM_READ
);
rtl
::
OString
aOne
=
read_uInt8s_ToOString
(
aMemStream
,
3
);
CPPUNIT_ASSERT
(
aOne
==
"foo"
);
...
...
@@ -172,7 +172,7 @@ namespace
void
Test
::
test_read_cstring
()
{
char
foo
[]
=
"foobar"
;
SvMemoryStream
aMemStream
(
(
void
*
)
foo
,
strlen
(
foo
)
,
STREAM_READ
);
SvMemoryStream
aMemStream
(
foo
,
SAL_N_ELEMENTS
(
foo
)
-
1
,
STREAM_READ
);
rtl
::
OString
aOne
=
read_zeroTerminated_uInt8s_ToOString
(
aMemStream
);
CPPUNIT_ASSERT
(
aOne
==
"foobar"
);
...
...
@@ -190,7 +190,7 @@ namespace
void
Test
::
test_read_pstring
()
{
char
foo
[]
=
"
\3
foobar"
;
SvMemoryStream
aMemStream
(
(
void
*
)
foo
,
strlen
(
foo
)
,
STREAM_READ
);
SvMemoryStream
aMemStream
(
foo
,
SAL_N_ELEMENTS
(
foo
)
-
1
,
STREAM_READ
);
rtl
::
OString
aFoo
=
read_lenPrefixed_uInt8s_ToOString
<
sal_uInt8
>
(
aMemStream
);
CPPUNIT_ASSERT
(
aFoo
==
"foo"
);
...
...
@@ -232,7 +232,7 @@ namespace
void
Test
::
test_readline
()
{
char
foo
[]
=
"foo
\n
bar
\n\n
"
;
SvMemoryStream
aMemStream
(
(
void
*
)
foo
,
strlen
(
foo
)
,
STREAM_READ
);
SvMemoryStream
aMemStream
(
foo
,
SAL_N_ELEMENTS
(
foo
)
-
1
,
STREAM_READ
);
rtl
::
OString
aFoo
;
sal_Bool
bRet
;
...
...
@@ -291,7 +291,7 @@ namespace
CPPUNIT_ASSERT
(
iss
.
eof
()
&&
!
iss
.
bad
());
char
bar
[]
=
"foo"
;
SvMemoryStream
aMemStreamB
(
(
void
*
)
bar
,
strlen
(
bar
)
,
STREAM_READ
);
SvMemoryStream
aMemStreamB
(
bar
,
SAL_N_ELEMENTS
(
bar
)
-
1
,
STREAM_READ
);
bRet
=
aMemStreamB
.
ReadLine
(
aFoo
);
CPPUNIT_ASSERT
(
bRet
);
CPPUNIT_ASSERT
(
aFoo
==
"foo"
);
...
...
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