#include #include #include #include #include "testframework.h" bool found_no_exception(){ std::stringstream s("http://myurl.com"); char buffer[10]; s.get(buffer, 8); if(0 == strncmp("http://", buffer, 8)){ return true; } return false; } void no_found_throws(){ std::stringstream s("http"); char buffer[10]; s.exceptions(std::ios::badbit | std::ios::failbit | std::ios::eofbit); s.get(buffer, 8); return; } int main(){ std::cout << "Beginning ioexception test" << std::endl; TestFramework::init(); TestFramework::AssertReturns(found_no_exception, true); TestFramework::AssertThrows(no_found_throws); TestFramework::results(); return 0; }