#include "sys.h" #include "debug.h" #include "bitsetTest.h" #include #include #include #include #include #include // gcc 2.96 doesn't have std::ptr_fun class do_toupper { public: int operator()(int const left) const { return std::toupper(left); } }; template void bitsetTest::testOutputLevel2(void) { std::ostringstream output; output << get_b(OverLoadHook()); std::string s = output.str(); std::transform(s.begin(), s.end(), s.begin(), do_toupper() /* ISO C++: std::ptr_fun(std::toupper) */); CPPUNIT_ASSERT( std::string(b_str[n % 1000]) == s ); } void bitsetTest::testOutput(void) { // Tests successful construction of test variables as well as output. #ifndef FASTTEST testOutputLevel2(); testOutputLevel2(); testOutputLevel2(); testOutputLevel2(); testOutputLevel2(); testOutputLevel2(); testOutputLevel2(); testOutputLevel2(); #endif testOutputLevel2(); #ifndef FASTTEST testOutputLevel2(); #endif }