First public contribution.
2 #if !defined (STLPORT) || !defined (_STLP_USE_NO_IOSTREAMS)
7 #include "cppunit/cppunit_proxy.h"
9 #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
16 class OstreamIteratorTest : public CPPUNIT_NS::TestCase
18 CPPUNIT_TEST_SUITE(OstreamIteratorTest);
19 CPPUNIT_TEST(ostmit0);
20 CPPUNIT_TEST_SUITE_END();
26 CPPUNIT_TEST_SUITE_REGISTRATION(OstreamIteratorTest);
29 // tests implementation
31 void OstreamIteratorTest::ostmit0()
33 // not necessary, tested in copy_test
34 int array [] = { 1, 5, 2, 4 };
40 ostream_iterator<char> iter(os);
41 copy(text, text + 5, iter);
42 CPPUNIT_ASSERT(os.good());
44 CPPUNIT_ASSERT(os.good());
46 ostream_iterator<int> iter2(os);
47 copy(array, array + 4, iter2);
48 CPPUNIT_ASSERT(os.good());
49 CPPUNIT_ASSERT(os.str() == "hello 1524");