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
56321c27
Kaydet (Commit)
56321c27
authored
Tem 25, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add a test for a nasty suspicion I have
üst
5958f74e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
test_streamstate.cxx
tools/qa/cppunit/test_streamstate.cxx
+11
-2
No files found.
tools/qa/cppunit/test_streamstate.cxx
Dosyayı görüntüle @
56321c27
...
@@ -68,7 +68,7 @@ namespace
...
@@ -68,7 +68,7 @@ namespace
aMemStream
.
Seek
(
STREAM_SEEK_TO_END
);
aMemStream
.
Seek
(
STREAM_SEEK_TO_END
);
//seeking to end doesn't set eof, reading past eof does
//seeking to end doesn't set eof, reading past eof does
CPPUNIT_ASSERT
(
!
aMemStream
.
IsE
of
());
CPPUNIT_ASSERT
(
!
aMemStream
.
e
of
());
CPPUNIT_ASSERT
(
aMemStream
.
good
());
CPPUNIT_ASSERT
(
aMemStream
.
good
());
std_a
=
78
;
std_a
=
78
;
...
@@ -86,7 +86,7 @@ namespace
...
@@ -86,7 +86,7 @@ namespace
tools_a
=
78
;
tools_a
=
78
;
aMemStream
>>
tools_a
;
aMemStream
>>
tools_a
;
//so, now eof is set
//so, now eof is set
CPPUNIT_ASSERT
(
aMemStream
.
IsE
of
());
CPPUNIT_ASSERT
(
aMemStream
.
e
of
());
//a failed read doesn't change the data, it remains unchanged
//a failed read doesn't change the data, it remains unchanged
CPPUNIT_ASSERT
(
tools_a
==
78
);
CPPUNIT_ASSERT
(
tools_a
==
78
);
//nothing wrong with the stream, so not bad
//nothing wrong with the stream, so not bad
...
@@ -94,6 +94,15 @@ namespace
...
@@ -94,6 +94,15 @@ namespace
//yet, the read didn't succeed
//yet, the read didn't succeed
CPPUNIT_ASSERT
(
!
aMemStream
.
good
());
CPPUNIT_ASSERT
(
!
aMemStream
.
good
());
sal_uInt16
tools_b
=
0x1122
;
aMemStream
.
SeekRel
(
-
1
);
CPPUNIT_ASSERT
(
!
aMemStream
.
eof
());
CPPUNIT_ASSERT
(
aMemStream
.
good
());
aMemStream
>>
tools_b
;
CPPUNIT_ASSERT
(
!
aMemStream
.
good
());
CPPUNIT_ASSERT
(
aMemStream
.
eof
());
// CPPUNIT_ASSERT(tools_b == 0x1122); //nasty, real nasty
iss
.
clear
();
iss
.
clear
();
iss
.
seekg
(
0
);
iss
.
seekg
(
0
);
CPPUNIT_ASSERT
(
iss
.
good
());
CPPUNIT_ASSERT
(
iss
.
good
());
...
...
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