ReactOS 0.4.15-dev-8413-gc1c91f2
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
10
11# if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
12using namespace std;
13# endif
14
15class StrstreamBufferTest : public CPPUNIT_NS::TestCase
16{
20
21protected:
22 void read_from_buffer();
23};
24
26
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
#define strstream
Definition: _strstream.h:36
CPPUNIT_TEST(read_from_buffer)
CPPUNIT_TEST_SUITE(StrstreamBufferTest)
#define CPPUNIT_TEST_SUITE_REGISTRATION(X)
Definition: cppunit_mini.h:193
#define CPPUNIT_ASSERT(X)
Definition: cppunit_mini.h:200
FxCollectionEntry * cur
Definition: ctx.idl:7
Definition: features.h:417
Definition: parse.h:23