Newer
Older
#include "IstreamTest.h"
#include <set>
#include <vector>
#include <pair>
#include <sstream>
#include <string>
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( IstreamTest, "bits" );
CPPUNIT_TEST_SUITE_REGISTRATION( IstreamTest );
void IstreamTest::setUp() {
}
void IstreamTest::tearDown() {
}
void IstreamTest::testIstream() {
std::stringstream ss ( "TEST" );
CPPUNIT_ASSERT ( ( ( bool ) ( ss >> ext::string ( "TEST" ) ) ) == true );
CPPUNIT_ASSERT ( ( ( bool ) ( ss >> ext::string ( "TESS" ) ) ) == false );
CPPUNIT_ASSERT ( ss.str ( ) == "TEST" );
CPPUNIT_ASSERT ( ( ( bool ) ( ss >> ext::string ( "TESTS" ) ) ) == false );
CPPUNIT_ASSERT ( ss.str ( ) == "TEST" );