#include #include #include #ifdef _MSC_VER # include "vcl_msvc_warnings.h" #endif #define AssertEq(x,y) {status+=((x)==(y))?0:1;std::cout<<"TEST ["<<(x)<<"] == ["<<(y)<<"] : "<<((x)==(y)?"PASSED":"FAILED")<> fred; AssertEq(fred,"fred"); std::istringstream s("wilma"); char w = '?'; s >> w; AssertEq((int)w,'w'); s >> w; AssertEq((int)w,'i'); s >> w; AssertEq((int)w,'l'); s >> w; AssertEq((int)w,'m'); s >> w; AssertEq((int)w,'a'); return status; }