ReactOS 0.4.15-dev-7693-gd0e2924
SstreamTest Class Reference
Inheritance diagram for SstreamTest:
Collaboration diagram for SstreamTest:

Protected Member Functions

void output ()
 
void input ()
 
void input_char ()
 
void io ()
 
void err ()
 
void err_long ()
 
void maxint ()
 
void init_in ()
 
void init_out ()
 
void buf ()
 
void rdbuf ()
 
void streambuf_output ()
 
void seek ()
 
void seekp ()
 
void seek_gp ()
 
void tellp ()
 
void negative ()
 

Private Member Functions

 CPPUNIT_TEST_SUITE (SstreamTest)
 
 CPPUNIT_TEST (output)
 
 CPPUNIT_TEST (input)
 
 CPPUNIT_TEST (input_char)
 
 CPPUNIT_TEST (io)
 
 CPPUNIT_TEST (err)
 
 CPPUNIT_TEST (err_long)
 
 CPPUNIT_TEST (maxint)
 
 CPPUNIT_TEST (init_in)
 
 CPPUNIT_TEST (init_out)
 
 CPPUNIT_TEST (buf)
 
 CPPUNIT_TEST (rdbuf)
 
 CPPUNIT_TEST (streambuf_output)
 
 CPPUNIT_TEST (seek)
 
 CPPUNIT_TEST (seekp)
 
 CPPUNIT_TEST (seek_gp)
 
 CPPUNIT_TEST (tellp)
 
 CPPUNIT_TEST (negative)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 19 of file sstream_test.cpp.

Member Function Documentation

◆ buf()

void SstreamTest::buf ( )
protected

Definition at line 287 of file sstream_test.cpp.

288{
290
291 ss << "1234567\n89\n";
292 char buf[10];
293 buf[7] = 'x';
294 ss.get( buf, 10 );
295 CPPUNIT_ASSERT( !ss.fail() );
296 CPPUNIT_ASSERT( buf[0] == '1' );
297 CPPUNIT_ASSERT( buf[1] == '2' );
298 CPPUNIT_ASSERT( buf[2] == '3' );
299 CPPUNIT_ASSERT( buf[3] == '4' );
300 CPPUNIT_ASSERT( buf[4] == '5' );
301 CPPUNIT_ASSERT( buf[5] == '6' );
302 CPPUNIT_ASSERT( buf[6] == '7' ); // 27.6.1.3 paragraph 10, paragraph 7
303 CPPUNIT_ASSERT( buf[7] == 0 ); // 27.6.1.3 paragraph 8
304 char c;
305 ss.get(c);
306 CPPUNIT_ASSERT( !ss.fail() );
307 CPPUNIT_ASSERT( c == '\n' ); // 27.6.1.3 paragraph 10, paragraph 7
308 ss.get(c);
309 CPPUNIT_ASSERT( !ss.fail() );
310 CPPUNIT_ASSERT( c == '8' );
311}
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
const GLubyte * c
Definition: glext.h:8905
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define ss
Definition: i386-dis.c:441
#define c
Definition: ke_i.h:80

Referenced by input_char().

◆ CPPUNIT_TEST() [1/17]

SstreamTest::CPPUNIT_TEST ( buf  )
private

◆ CPPUNIT_TEST() [2/17]

SstreamTest::CPPUNIT_TEST ( err  )
private

◆ CPPUNIT_TEST() [3/17]

SstreamTest::CPPUNIT_TEST ( err_long  )
private

◆ CPPUNIT_TEST() [4/17]

SstreamTest::CPPUNIT_TEST ( init_in  )
private

◆ CPPUNIT_TEST() [5/17]

SstreamTest::CPPUNIT_TEST ( init_out  )
private

◆ CPPUNIT_TEST() [6/17]

SstreamTest::CPPUNIT_TEST ( input  )
private

◆ CPPUNIT_TEST() [7/17]

SstreamTest::CPPUNIT_TEST ( input_char  )
private

◆ CPPUNIT_TEST() [8/17]

SstreamTest::CPPUNIT_TEST ( io  )
private

◆ CPPUNIT_TEST() [9/17]

SstreamTest::CPPUNIT_TEST ( maxint  )
private

◆ CPPUNIT_TEST() [10/17]

SstreamTest::CPPUNIT_TEST ( negative  )
private

◆ CPPUNIT_TEST() [11/17]

SstreamTest::CPPUNIT_TEST ( output  )
private

◆ CPPUNIT_TEST() [12/17]

SstreamTest::CPPUNIT_TEST ( rdbuf  )
private

◆ CPPUNIT_TEST() [13/17]

SstreamTest::CPPUNIT_TEST ( seek  )
private

◆ CPPUNIT_TEST() [14/17]

SstreamTest::CPPUNIT_TEST ( seek_gp  )
private

◆ CPPUNIT_TEST() [15/17]

SstreamTest::CPPUNIT_TEST ( seekp  )
private

◆ CPPUNIT_TEST() [16/17]

SstreamTest::CPPUNIT_TEST ( streambuf_output  )
private

◆ CPPUNIT_TEST() [17/17]

SstreamTest::CPPUNIT_TEST ( tellp  )
private

◆ CPPUNIT_TEST_SUITE()

SstreamTest::CPPUNIT_TEST_SUITE ( SstreamTest  )
private

◆ CPPUNIT_TEST_SUITE_END()

SstreamTest::CPPUNIT_TEST_SUITE_END ( )
private

◆ err()

void SstreamTest::err ( )
protected

Definition at line 173 of file sstream_test.cpp.

174{
175 stringstream s( "9" );
176
177 int i = 0;
178 s >> i;
179 CPPUNIT_ASSERT( !s.fail() );
180 CPPUNIT_ASSERT( i == 9 );
181 s >> i;
182 CPPUNIT_ASSERT( s.fail() );
183 CPPUNIT_ASSERT( s.eof() );
184 CPPUNIT_ASSERT( i == 9 );
185}
GLdouble s
Definition: gl.h:2039
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

◆ err_long()

void SstreamTest::err_long ( )
protected

Definition at line 187 of file sstream_test.cpp.

188{
189 stringstream s( "9" );
190
191 long i = 0;
192 s >> i;
193 CPPUNIT_ASSERT( !s.fail() );
194 CPPUNIT_ASSERT( i == 9 );
195 s >> i;
196 CPPUNIT_ASSERT( s.fail() );
197 CPPUNIT_ASSERT( s.eof() );
198 CPPUNIT_ASSERT( i == 9 );
199}

◆ init_in()

void SstreamTest::init_in ( )
protected

Definition at line 227 of file sstream_test.cpp.

228{
229 istringstream is( "12345" );
230 int n;
231
232 is >> n;
233 CPPUNIT_ASSERT( !is.fail() );
234 CPPUNIT_ASSERT( n == 12345 );
235
236 istringstream dis( "1.2345" );
237 double d;
238
239 dis >> d;
240 CPPUNIT_ASSERT( !dis.fail() );
241 CPPUNIT_ASSERT( are_equals(d, 1.2345) );
242
243 istringstream fis( "1.2345" );
244 float f;
245
246 fis >> f;
247 CPPUNIT_ASSERT( !fis.fail() );
248 CPPUNIT_ASSERT( are_equals(f, 1.2345f) );
249}
GLdouble n
Definition: glext.h:7729
GLfloat f
Definition: glext.h:7540
#define d
Definition: ke_i.h:81
#define f
Definition: ke_i.h:83
bool are_equals(_Tp val, _Tp ref)
Definition: math_aux.h:19

◆ init_out()

void SstreamTest::init_out ( )
protected

Definition at line 251 of file sstream_test.cpp.

252{
253 ostringstream os( "12345" );
254 CPPUNIT_ASSERT( os.str() == "12345" );
255
256 os << 67;
257 CPPUNIT_ASSERT( os.good() );
258
259 // This satisfy to the Standard:
260 // CPPUNIT_ASSERT( os.str() == "67345" );
261 // But we don't know the reason, why standard state that.
262
263 /*
264 * 27.7.1.1: ... then copies the content of str into the basic_sringbuf
265 * underlying character sequence and initializes the input and output
266 * sequences according to which. If which & ios_base::out is true, initializes
267 * the output sequence with underlying sequence. ...
268 *
269 * I can treat this as 'like output was performed', and then I should bump
270 * put pointer... Looks like more useful then my previous treatment.
271 *
272 * - ptr
273 */
274
275 CPPUNIT_ASSERT( os.str() == "1234567" );
276
277
278 os.str( "89ab" );
279 CPPUNIT_ASSERT( os.str() == "89ab" );
280
281 os << 10;
282 CPPUNIT_ASSERT( os.good() );
283 // CPPUNIT_ASSERT( os.str() == "10ab" );
284 CPPUNIT_ASSERT( os.str() == "89ab10" );
285}

◆ input()

void SstreamTest::input ( )
protected

Definition at line 94 of file sstream_test.cpp.

95{
96 {
97 istringstream s( "1\n2\nabcd\nghk lm\nabcd ef" );
98 int i = 0;
99 s >> i;
100 CPPUNIT_ASSERT( s.good() );
101 CPPUNIT_ASSERT( i == 1 );
102 double d = 0.0;
103 s >> d;
104 CPPUNIT_ASSERT( s.good() );
105 CPPUNIT_ASSERT( d == 2.0 );
106 string str;
107 s >> str;
108 CPPUNIT_ASSERT( s.good() );
109 CPPUNIT_ASSERT( str == "abcd" );
110 char c;
111 s.get(c); // extract newline, that not extracted by operator >>
112 CPPUNIT_ASSERT( s.good() );
113 CPPUNIT_ASSERT( c == '\n' );
114 getline( s, str );
115 CPPUNIT_ASSERT( s.good() );
116 CPPUNIT_ASSERT( str == "ghk lm" );
117 getline( s, str );
118 CPPUNIT_ASSERT( s.eof() );
119 CPPUNIT_ASSERT( str == "abcd ef" );
120 }
121 {
122 istringstream s("0");
123 size_t i = 1;
124 s >> i;
125 CPPUNIT_ASSERT( !s.fail() );
126 CPPUNIT_ASSERT( s.eof() );
127 CPPUNIT_ASSERT( i == 0 );
128 }
129}
const WCHAR * str
#define getline
Definition: schily.h:567

◆ input_char()

void SstreamTest::input_char ( )
protected

Definition at line 131 of file sstream_test.cpp.

132{
133 char buf[16] = { 0, '1', '2', '3' };
134 istringstream s( "0" );
135 s >> buf;
136
137 CPPUNIT_ASSERT( buf[0] == '0' );
138 CPPUNIT_ASSERT( buf[1] == 0 );
139 CPPUNIT_ASSERT( buf[2] == '2' );
140}

◆ io()

void SstreamTest::io ( )
protected

Definition at line 143 of file sstream_test.cpp.

144{
146 s << 1 << '\n' << 2.0 << '\n' << "abcd\n" << "ghk lm\n" << "abcd ef";
147 CPPUNIT_ASSERT( s.good() );
148
149 int i = 0;
150 s >> i;
151 CPPUNIT_ASSERT( i == 1 );
152 CPPUNIT_ASSERT( s.good() );
153 double d = 0.0;
154 s >> d;
155 CPPUNIT_ASSERT( d == 2.0 );
156 CPPUNIT_ASSERT( s.good() );
157 string str;
158 s >> str;
159 CPPUNIT_ASSERT( str == "abcd" );
160 CPPUNIT_ASSERT( s.good() );
161 char c;
162 s.get(c); // extract newline, that not extracted by operator >>
163 CPPUNIT_ASSERT( s.good() );
164 CPPUNIT_ASSERT( c == '\n' );
165 getline( s, str );
166 CPPUNIT_ASSERT( s.good() );
167 CPPUNIT_ASSERT( str == "ghk lm" );
168 getline( s, str );
169 CPPUNIT_ASSERT( str == "abcd ef" );
170 CPPUNIT_ASSERT( s.eof() );
171}

◆ maxint()

void SstreamTest::maxint ( )
protected

Definition at line 201 of file sstream_test.cpp.

202{
204
205 s << INT_MAX << " " << UINT_MAX << " " << LONG_MAX << " " << ULONG_MAX << " "
206 << INT_MIN << " " << LONG_MIN;
207 CPPUNIT_ASSERT( s.good() );
208
209 int i = 0;
210 unsigned int u = 0;
211 long l = 0;
212 unsigned long ul = 0;
213
214 s >> i >> u >> l >> ul;
215 CPPUNIT_ASSERT( s.good() );
219 CPPUNIT_ASSERT( ul == ULONG_MAX );
220
221 s >> i >> l;
222 CPPUNIT_ASSERT( !s.fail() );
225}
r l[0]
Definition: byte_order.h:168
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
#define INT_MIN
Definition: limits.h:39
#define ULONG_MAX
Definition: limits.h:44
#define LONG_MAX
Definition: limits.h:43
#define INT_MAX
Definition: limits.h:40
#define UINT_MAX
Definition: limits.h:41
#define LONG_MIN
Definition: limits.h:42

◆ negative()

void SstreamTest::negative ( )
protected

Definition at line 481 of file sstream_test.cpp.

482{
483 CPPUNIT_CHECK( to_string<int>(-1) == "-1" );
484 CPPUNIT_CHECK( to_string<long>(-1) == "-1" );
485}
#define CPPUNIT_CHECK(X)
Definition: cppunit_mini.h:195

◆ output()

void SstreamTest::output ( )
protected

Definition at line 66 of file sstream_test.cpp.

67{
68 {
70
71 s << 1 << '\n' << 2.0 << '\n' << "abcd\n" << "ghk lm\n" << "abcd ef";
72 CPPUNIT_ASSERT( s.good() );
73 CPPUNIT_ASSERT( s.str() == "1\n2\nabcd\nghk lm\nabcd ef" );
74 }
75
76 //Following tests are mostly used to reveal problem with the MSVC /Wp64 option
77 //used to track 64 bits portability issue:
78 {
80 size_t i = 0;
81 s << i;
82 CPPUNIT_ASSERT( s.good() );
83 CPPUNIT_ASSERT( s.str() == "0" );
84 }
85 {
87 ptrdiff_t i = 0;
88 s << i;
89 CPPUNIT_ASSERT( s.good() );
90 CPPUNIT_ASSERT( s.str() == "0" );
91 }
92}
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247

◆ rdbuf()

void SstreamTest::rdbuf ( )
protected

Definition at line 313 of file sstream_test.cpp.

314{
316
317 ss << "1234567\n89\n";
318
319 ostringstream os;
320 ss.get( *os.rdbuf(), '\n' );
321 CPPUNIT_ASSERT( !ss.fail() );
322 char c;
323 ss.get(c);
324 CPPUNIT_ASSERT( !ss.fail() );
325 CPPUNIT_ASSERT( c == '\n' ); // 27.6.1.3 paragraph 12
326 CPPUNIT_ASSERT( os.str() == "1234567" );
327}
_String str() const
Definition: _sstream.h:184
basic_stringbuf< _CharT, _Traits, _Alloc > * rdbuf() const
Definition: _sstream.h:181

◆ seek()

void SstreamTest::seek ( )
protected

Definition at line 386 of file sstream_test.cpp.

387{
388 stringstream s( "0123456789" );
389
390 CPPUNIT_ASSERT( s.tellg() == stringstream::pos_type(0) );
391 s.seekg( 6, ios::beg );
392 CPPUNIT_ASSERT( s.tellg() == stringstream::pos_type(6) );
393 s.seekg( -3, ios::cur );
394 CPPUNIT_ASSERT( s.tellg() == stringstream::pos_type(3) );
395
396 istringstream is( "0123456789" );
397 CPPUNIT_ASSERT( is.tellg() == stringstream::pos_type(0) );
398 is.seekg( 6, ios::beg );
399 CPPUNIT_ASSERT( is.tellg() == stringstream::pos_type(6) );
400 is.seekg( -3, ios::cur );
401 CPPUNIT_ASSERT( is.tellg() == stringstream::pos_type(3) );
402}
_Traits::pos_type pos_type
Definition: _sstream.h:208

◆ seek_gp()

void SstreamTest::seek_gp ( )
protected

Definition at line 419 of file sstream_test.cpp.

420{
421 stringstream ss( "1" );
422
423 /* ISO/IEC 14882 2003 (and 1998 too) assume change as get as put positions
424 with seekg and seekp (27.6.1.3, par 38; 27.6.2.4 par 2),
425 but this contradict to common practice and proposed draft N2588
426 (27.6.1.3, par 41; 27.6.2.5, par 4)
427
428 Now STLport implement (i.e. change behaviour ) the draft's point of view.
429 */
430
431 ss.seekg( 0, ios::beg );
432 ss.seekp( 0, ios::end );
433
434 ss << "2";
435
436 string str;
437
438 ss >> str;
439
440 /* CPPUNIT_CHECK( str == "2" ); --- according ISO/IEC 14882 2003 */
441 CPPUNIT_CHECK( str == "12" );
442}

◆ seekp()

void SstreamTest::seekp ( )
protected

Definition at line 404 of file sstream_test.cpp.

405{
407
408 s << "1234567";
409 CPPUNIT_CHECK( s.tellp() == stringstream::pos_type(7) );
410 CPPUNIT_CHECK( s.str() == "1234567" );
411 s.seekp( 0 );
412 s << "X";
413 CPPUNIT_CHECK( s.str() == "X234567" );
414 s.seekp( 0, ios::beg );
415 s << "Y";
416 CPPUNIT_CHECK( s.str() == "Y234567" );
417}

◆ streambuf_output()

void SstreamTest::streambuf_output ( )
protected

Definition at line 329 of file sstream_test.cpp.

330{
331 {
332 istringstream in("01234567890123456789");
334
335 full_streambuf full_buf(10);
336 ostream out(&full_buf);
338
339 out << in.rdbuf();
342 //out is good we can check what has been extracted:
343 CPPUNIT_ASSERT( full_buf.str() == "0123456789" );
344
345 out << in.rdbuf();
346 CPPUNIT_ASSERT( out.fail() );
348
349 ostringstream ostr;
350 ostr << in.rdbuf();
351 CPPUNIT_ASSERT( ostr );
353 CPPUNIT_ASSERT( ostr.str() == "0123456789" );
354 }
355
356# if !defined (STLPORT) || defined (_STLP_USE_EXCEPTIONS)
357 {
358 //If the output stream buffer throws:
359 istringstream in("01234567890123456789");
361
362 full_streambuf full_buf(10, true);
363 ostream out(&full_buf);
365
366 out << in.rdbuf();
367 CPPUNIT_ASSERT( out.bad() );
369 //out is bad we have no guaranty on what has been extracted:
370 //CPPUNIT_ASSERT( full_buf.str() == "0123456789" );
371
372 out.clear();
373 out << in.rdbuf();
374 CPPUNIT_ASSERT( out.fail() && out.bad() );
376
377 ostringstream ostr;
378 ostr << in.rdbuf();
379 CPPUNIT_ASSERT( ostr );
381 CPPUNIT_ASSERT( ostr.str() == "01234567890123456789" );
382 }
383# endif
384}
GLuint in
Definition: glext.h:9616
static FILE * out
Definition: regtests2xml.c:44

◆ tellp()

void SstreamTest::tellp ( )
protected

Definition at line 444 of file sstream_test.cpp.

445{
446 {
447 ostringstream o( "1" );
448
449 o << "23456";
450
451 CPPUNIT_CHECK( o.rdbuf()->pubseekoff( 0, ios_base::cur, ios_base::out ) == stringstream::pos_type(6) );
452 CPPUNIT_CHECK( o.tellp() == stringstream::pos_type(6) );
453 }
454 {
456
457 o << "123456";
458
459 CPPUNIT_CHECK( o.rdbuf()->pubseekoff( 0, ios_base::cur, ios_base::out ) == stringstream::pos_type(6) );
461 }
462 {
463 ostringstream o( "1" );
464
465 o << "23456789";
466
467 CPPUNIT_CHECK( o.rdbuf()->pubseekoff( 0, ios_base::cur, ios_base::out ) == stringstream::pos_type(9) );
468 CPPUNIT_CHECK( o.tellp() == stringstream::pos_type(9) );
469 }
470}
pos_type tellp()
Definition: _ostream.h:141

The documentation for this class was generated from the following file: