ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

strstream_buffer_read_test.cpp
Go to the documentation of this file.
00001 /*
00002  * Note: Strstreams are really broken in STLport. But strstreams are 
00003  * obsolete, and even if ones was mentioned in D7.1--D7.4 of 
00004  * Standard, we have no wish to spent time with repair ones.
00005  */
00006 #if !defined (_STLP_NO_IOSTREAMS)
00007 #  include <strstream>
00008 
00009 #  include "cppunit/cppunit_proxy.h"
00010 
00011 #  if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
00012 using namespace std;
00013 #  endif
00014 
00015 class StrstreamBufferTest : public CPPUNIT_NS::TestCase
00016 {
00017   CPPUNIT_TEST_SUITE(StrstreamBufferTest);
00018   CPPUNIT_TEST(read_from_buffer);
00019   CPPUNIT_TEST_SUITE_END();
00020 
00021 protected:
00022   void read_from_buffer();
00023 };
00024 
00025 CPPUNIT_TEST_SUITE_REGISTRATION(StrstreamBufferTest);
00026 
00027 void StrstreamBufferTest::read_from_buffer()
00028 {
00029   char hello[] = "Hello";
00030   strstream stream(hello, sizeof(hello), ios_base::in);
00031   char cur;
00032   stream >> cur;
00033   CPPUNIT_ASSERT(cur == 'H'); 
00034 }
00035 #endif

Generated on Sat May 26 2012 04:34:47 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.