Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhil Nash2014-09-03 19:23:22 +0100
committerPhil Nash2014-09-03 19:23:22 +0100
commit4caabfa45ebe21cf9c0c07e04af3cd43614a984c (patch)
tree9b1b719f3c4a502b5b325e7c5cf6fe012bc577c3
parent5ea326685736c6bd558d589d1949d4e8b40ca8a1 (diff)
downloadcatch3-4caabfa45ebe21cf9c0c07e04af3cd43614a984c.tar.gz
build 3
-rw-r--r--README.md2
-rw-r--r--include/internal/catch_version.hpp2
-rw-r--r--single_include/catch.hpp54
3 files changed, 46 insertions, 12 deletions
diff --git a/README.md b/README.md
index 38f6884f..f7bc851c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
![catch logo](catch-logo-small.png)
-*v1.1 build 2 (develop branch)*
+*v1.1 build 3 (develop branch)*
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp
index ac17c619..07d9c8e7 100644
--- a/include/internal/catch_version.hpp
+++ b/include/internal/catch_version.hpp
@@ -13,7 +13,7 @@
namespace Catch {
// These numbers are maintained by a script
- Version libraryVersion( 1, 1, 2, "develop" );
+ Version libraryVersion( 1, 1, 3, "develop" );
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
diff --git a/single_include/catch.hpp b/single_include/catch.hpp
index 39644f21..df8594bd 100644
--- a/single_include/catch.hpp
+++ b/single_include/catch.hpp
@@ -1,6 +1,6 @@
/*
- * CATCH v1.1 build 2 (develop branch)
- * Generated: 2014-08-22 19:34:41.932570
+ * CATCH v1.1 build 3 (develop branch)
+ * Generated: 2014-09-03 19:22:56.858064
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -139,6 +139,10 @@
//#define CATCH_CONFIG_SFINAE // Not confirmed
#endif
+#if (_MSC_VER >= 1400)
+#define CATCH_CONFIG_CPP11_NULLPTR
+#endif
+
#endif // _MSC_VER
// Use variadic macros if the compiler supports them
@@ -1037,6 +1041,11 @@ inline id performOptionalSelector( id obj, SEL sel ) {
#endif
namespace Catch {
+
+// Why we're here.
+template<typename T>
+std::string toString( T const& value );
+
namespace Detail {
// SFINAE is currently disabled by default for all compilers.
@@ -1079,10 +1088,38 @@ namespace Detail {
#endif
+#if defined(CATCH_CPP11_OR_GREATER)
+ template<typename T,
+ bool IsEmum = std::is_enum<T>::value
+ >
+ struct EnumStringMaker
+ {
+ static std::string convert( T const& ) { return "{?}"; }
+ };
+
+ template<typename T>
+ struct EnumStringMaker<T,true>
+ {
+ static std::string convert( T const& v )
+ {
+ return ::Catch::toString(
+ static_cast<typename std::underlying_type<T>::type>(v)
+ );
+ }
+ };
+#endif
template<bool C>
struct StringMakerBase {
+#if defined(CATCH_CPP11_OR_GREATER)
+ template<typename T>
+ static std::string convert( T const& v )
+ {
+ return EnumStringMaker<T>::convert( v );
+ }
+#else
template<typename T>
static std::string convert( T const& ) { return "{?}"; }
+#endif
};
template<>
@@ -1105,9 +1142,6 @@ namespace Detail {
} // end namespace Detail
template<typename T>
-std::string toString( T const& value );
-
-template<typename T>
struct StringMaker :
Detail::StringMakerBase<Detail::IsStreamInsertable<T>::value> {};
@@ -1692,7 +1726,7 @@ namespace Catch {
public:
Timer() : m_ticks( 0 ) {}
void start();
- unsigned int getElapsedNanoseconds() const;
+ unsigned int getElapsedMicroseconds() const;
unsigned int getElapsedMilliseconds() const;
double getElapsedSeconds() const;
@@ -6530,7 +6564,7 @@ namespace Catch {
namespace Catch {
// These numbers are maintained by a script
- Version libraryVersion( 1, 1, 2, "develop" );
+ Version libraryVersion( 1, 1, 3, "develop" );
}
// #included from: catch_message.hpp
@@ -6728,14 +6762,14 @@ namespace Catch {
void Timer::start() {
m_ticks = getCurrentTicks();
}
- unsigned int Timer::getElapsedNanoseconds() const {
+ unsigned int Timer::getElapsedMicroseconds() const {
return static_cast<unsigned int>(getCurrentTicks() - m_ticks);
}
unsigned int Timer::getElapsedMilliseconds() const {
- return static_cast<unsigned int>((getCurrentTicks() - m_ticks)/1000);
+ return static_cast<unsigned int>(getElapsedMicroseconds()/1000);
}
double Timer::getElapsedSeconds() const {
- return (getCurrentTicks() - m_ticks)/1000000.0;
+ return getElapsedMicroseconds()/1000000.0;
}
} // namespace Catch