ReactOS
0.4.16-dev-311-g9382aa2
strstream_buffer_read_test.cpp
Go to the documentation of this file.
1
/*
2
* Note: Strstreams are really broken in STLport. But strstreams are
3
* obsolete, and even if ones was mentioned in D7.1--D7.4 of
4
* Standard, we have no wish to spent time with repair ones.
5
*/
6
#if !defined (_STLP_NO_IOSTREAMS)
7
# include <strstream>
8
9
# include "
cppunit/cppunit_proxy.h
"
10
11
# if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
12
using namespace
std
;
13
# endif
14
15
class
StrstreamBufferTest
:
public
CPPUNIT_NS::TestCase
16
{
17
CPPUNIT_TEST_SUITE
(
StrstreamBufferTest
);
18
CPPUNIT_TEST
(
read_from_buffer
);
19
CPPUNIT_TEST_SUITE_END
();
20
21
protected
:
22
void
read_from_buffer
();
23
};
24
25
CPPUNIT_TEST_SUITE_REGISTRATION
(
StrstreamBufferTest
);
26
27
void
StrstreamBufferTest::read_from_buffer
()
28
{
29
char
hello
[] =
"Hello"
;
30
strstream
stream
(
hello
,
sizeof
(
hello
), ios_base::in);
31
char
cur
;
32
stream
>>
cur
;
33
CPPUNIT_ASSERT
(
cur
==
'H'
);
34
}
35
#endif
strstream
#define strstream
Definition:
_strstream.h:36
StrstreamBufferTest
Definition:
strstream_buffer_read_test.cpp:16
StrstreamBufferTest::CPPUNIT_TEST_SUITE_END
CPPUNIT_TEST_SUITE_END()
StrstreamBufferTest::CPPUNIT_TEST
CPPUNIT_TEST(read_from_buffer)
StrstreamBufferTest::read_from_buffer
void read_from_buffer()
Definition:
strstream_buffer_read_test.cpp:27
StrstreamBufferTest::CPPUNIT_TEST_SUITE
CPPUNIT_TEST_SUITE(StrstreamBufferTest)
CPPUNIT_TEST_SUITE_REGISTRATION
#define CPPUNIT_TEST_SUITE_REGISTRATION(X)
Definition:
cppunit_mini.h:193
CPPUNIT_ASSERT
#define CPPUNIT_ASSERT(X)
Definition:
cppunit_mini.h:200
cppunit_proxy.h
cur
FxCollectionEntry * cur
Definition:
fxresourceapi.cpp:412
hello
Definition:
ctx.idl:7
std
Definition:
features.h:417
stream
Definition:
parse.h:23
sdk
lib
3rdparty
stlport
test
unit
strstream_buffer_read_test.cpp
Generated on Tue Dec 3 2024 06:16:37 for ReactOS by
1.9.6