Merge branch 'master' of https://github.com/BillyONeal/Catch into BillyONeal-master

This commit is contained in:
Phil Nash 2016-10-26 12:04:38 +01:00
commit f90ee9fb37
2 changed files with 6 additions and 3 deletions

View File

@ -21,8 +21,11 @@ namespace Catch {
bool contains( std::string const& s, std::string const& infix ) {
return s.find( infix ) != std::string::npos;
}
char toLowerCh(char c) {
return static_cast<char>( ::tolower( c ) );
}
void toLowerInPlace( std::string& s ) {
std::transform( s.begin(), s.end(), s.begin(), ::tolower );
std::transform( s.begin(), s.end(), s.begin(), toLowerCh );
}
std::string toLower( std::string const& s ) {
std::string lc = s;

View File

@ -24,9 +24,9 @@
#endif
namespace Catch {
struct RandomNumberGenerator {
typedef int result_type;
typedef std::ptrdiff_t result_type;
result_type operator()( result_type n ) const { return std::rand() % n; }