Ticket #2305: unit_test.patch
File unit_test.patch, 3.7 KB (added by , 14 years ago) |
---|
-
boost/test/unit_test_suite_impl.hpp
228 228 struct user_tc_method_invoker { 229 229 typedef void (UserTestCase::*test_method )(); 230 230 231 user_tc_method_invoker( shared_ptr<InstanceType> inst, test_method test_method )232 : m_inst( inst ), m_test_method( test_method ) {}231 user_tc_method_invoker( shared_ptr<InstanceType> inst, test_method test_method_ ) 232 : m_inst( inst ), m_test_method( test_method_ ) {} 233 233 234 234 void operator()() { ((*m_inst).*m_test_method)(); } 235 235 -
boost/test/utils/basic_cstring/basic_cstring.hpp
511 511 512 512 template<typename CharT> 513 513 inline typename basic_cstring<CharT>::size_type 514 basic_cstring<CharT>::find( basic_cstring<CharT> substr ) const514 basic_cstring<CharT>::find( basic_cstring<CharT> substr_ ) const 515 515 { 516 if( substr .is_empty() || substr.size() > size() )516 if( substr_.is_empty() || substr_.size() > size() ) 517 517 return (size_type)npos; 518 518 519 519 const_iterator it = begin(); 520 const_iterator last = end() - substr .size() + 1;520 const_iterator last = end() - substr_.size() + 1; 521 521 522 522 while( it != last ) { 523 if( traits_type::compare( it, substr .begin(), substr.size() ) == 0 )523 if( traits_type::compare( it, substr_.begin(), substr_.size() ) == 0 ) 524 524 break; 525 525 526 526 ++it; … … 533 533 534 534 template<typename CharT> 535 535 inline typename basic_cstring<CharT>::size_type 536 basic_cstring<CharT>::rfind( basic_cstring<CharT> substr ) const536 basic_cstring<CharT>::rfind( basic_cstring<CharT> substr_ ) const 537 537 { 538 if( substr .is_empty() || substr.size() > size() )538 if( substr_.is_empty() || substr_.size() > size() ) 539 539 return (size_type)npos; 540 540 541 const_iterator it = end() - substr .size();541 const_iterator it = end() - substr_.size(); 542 542 const_iterator last = begin()-1; 543 543 544 544 while( it != last ) { 545 if( traits_type::compare( it, substr .begin(), substr.size() ) == 0 )545 if( traits_type::compare( it, substr_.begin(), substr_.size() ) == 0 ) 546 546 break; 547 547 548 548 --it; -
boost/progress.hpp
77 77 class progress_display : private noncopyable 78 78 { 79 79 public: 80 explicit progress_display( unsigned long expected_count ,80 explicit progress_display( unsigned long expected_count_, 81 81 std::ostream & os = std::cout, 82 82 const std::string & s1 = "\n", //leading strings 83 83 const std::string & s2 = "", 84 84 const std::string & s3 = "" ) 85 85 // os is hint; implementation may ignore, particularly in embedded systems 86 : m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count ); }86 : m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count_); } 87 87 88 void restart( unsigned long expected_count )88 void restart( unsigned long expected_count_ ) 89 89 // Effects: display appropriate scale 90 90 // Postconditions: count()==0, expected_count()==expected_count 91 91 { 92 92 _count = _next_tic_count = _tic = 0; 93 _expected_count = expected_count ;93 _expected_count = expected_count_; 94 94 95 95 m_os << m_s1 << "0% 10 20 30 40 50 60 70 80 90 100%\n" 96 96 << m_s2 << "|----|----|----|----|----|----|----|----|----|----|"