mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 05:16:10 +01:00
Bump version to v3.0.0 preview 3
This commit is contained in:
parent
853565bfb8
commit
b9853b4b35
@ -46,6 +46,7 @@
|
|||||||
|
|
||||||
## 3.0.1 (in progress)
|
## 3.0.1 (in progress)
|
||||||
|
|
||||||
|
|
||||||
**Catch2 now uses statically compiled library as its distribution model.
|
**Catch2 now uses statically compiled library as its distribution model.
|
||||||
This also means that to get all of Catch2's functionality in a test file,
|
This also means that to get all of Catch2's functionality in a test file,
|
||||||
you have to include multiple headers.**
|
you have to include multiple headers.**
|
||||||
@ -70,7 +71,7 @@ new design.
|
|||||||
* Why is Catch2 moving to separate headers?
|
* Why is Catch2 moving to separate headers?
|
||||||
* The short answer is future extensibility and scalability. The long answer is complex and can be found on my blog, but at the most basic level, it is that providing single-header distribution is at odds with providing variety of useful features. When Catch2 was distributed in a single header, adding a new Matcher would cause overhead for everyone, but was useful only to a subset of users. This meant that the barrier to entry for new Matchers/Generators/etc is high in single header model, but much smaller in the new model.
|
* The short answer is future extensibility and scalability. The long answer is complex and can be found on my blog, but at the most basic level, it is that providing single-header distribution is at odds with providing variety of useful features. When Catch2 was distributed in a single header, adding a new Matcher would cause overhead for everyone, but was useful only to a subset of users. This meant that the barrier to entry for new Matchers/Generators/etc is high in single header model, but much smaller in the new model.
|
||||||
* Will Catch2 again distribute single-header version in the future?
|
* Will Catch2 again distribute single-header version in the future?
|
||||||
* No. But I intend to provide sqlite-style distribution option, with 1 header and 1 "unity" .cpp file. Do note that the header will have similar problem to the `catch_all.hpp` header.
|
* No. But we do provide sqlite-style amalgamated distribution option. This means that you can download just 1 .cpp file and 1 header and place them next to your own sources. However, doing this has downsides similar to using the `catch_all.hpp` header.
|
||||||
* Why the big breaking change caused by replacing `catch.hpp` with `catch_all.hpp`?
|
* Why the big breaking change caused by replacing `catch.hpp` with `catch_all.hpp`?
|
||||||
* The convenience header `catch_all.hpp` exists for two reasons. One of them is to provide a way for quick migration from Catch2, the second one is to provide a simple way to test things with Catch2. Using it for migration has one drawback in that it is **big**. This means that including it _will_ cause significant compile time drag, and so using it to migrate should be a concious decision by the user, not something they can just stumble into unknowingly.
|
* The convenience header `catch_all.hpp` exists for two reasons. One of them is to provide a way for quick migration from Catch2, the second one is to provide a simple way to test things with Catch2. Using it for migration has one drawback in that it is **big**. This means that including it _will_ cause significant compile time drag, and so using it to migrate should be a concious decision by the user, not something they can just stumble into unknowingly.
|
||||||
|
|
||||||
@ -129,6 +130,9 @@ new design.
|
|||||||
* Catch2 currently provides _some_ generic matchers, but there should be more before final release of v3
|
* Catch2 currently provides _some_ generic matchers, but there should be more before final release of v3
|
||||||
* So far, `IsEmpty`, `SizeIs`, and `Contains` are provided.
|
* So far, `IsEmpty`, `SizeIs`, and `Contains` are provided.
|
||||||
* At least `ElementsAre` and `UnorderedElementsAre` are planned.
|
* At least `ElementsAre` and `UnorderedElementsAre` are planned.
|
||||||
|
* Some runtime performance improvements
|
||||||
|
* Significant compilation time improvements
|
||||||
|
* including `catch_test_macros.hpp` is 80% cheaper than including `catch.hpp`
|
||||||
|
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
@ -149,6 +153,7 @@ new design.
|
|||||||
* `catch2-with-main` also links in the default main
|
* `catch2-with-main` also links in the default main
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 2.13.2
|
## 2.13.2
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
// SPDX-License-Identifier: BSL-1.0
|
// SPDX-License-Identifier: BSL-1.0
|
||||||
|
|
||||||
// Catch v3.0.0-preview.2
|
// Catch v3.0.0-preview.3
|
||||||
// Generated: 2020-09-07 20:00:04.097397
|
// Generated: 2020-10-08 13:59:26.616931
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
// This file is an amalgamation of multiple different files.
|
// This file is an amalgamation of multiple different files.
|
||||||
// You probably shouldn't edit it directly.
|
// You probably shouldn't edit it directly.
|
||||||
@ -1784,7 +1784,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Version const& libraryVersion() {
|
Version const& libraryVersion() {
|
||||||
static Version version( 3, 0, 0, "preview", 2 );
|
static Version version( 3, 0, 0, "preview", 3 );
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2678,13 +2678,14 @@ namespace Catch {
|
|||||||
// vvv formerly catch_uncaught_exceptions.cpp vvv //
|
// vvv formerly catch_uncaught_exceptions.cpp vvv //
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
bool uncaught_exceptions() {
|
bool uncaught_exceptions() {
|
||||||
#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||||
return false;
|
return false;
|
||||||
#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) || (defined(__cpp_lib_uncaught_exceptions) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS))
|
#elif defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
|
||||||
return std::uncaught_exceptions() > 0;
|
return std::uncaught_exceptions() > 0;
|
||||||
#else
|
#else
|
||||||
return std::uncaught_exception();
|
return std::uncaught_exception();
|
||||||
@ -3988,7 +3989,7 @@ namespace Catch {
|
|||||||
if (tmpnam_s(m_buffer)) {
|
if (tmpnam_s(m_buffer)) {
|
||||||
CATCH_RUNTIME_ERROR("Could not get a temp filename");
|
CATCH_RUNTIME_ERROR("Could not get a temp filename");
|
||||||
}
|
}
|
||||||
if (fopen_s(&m_file, m_buffer, "w")) {
|
if (fopen_s(&m_file, m_buffer, "w+")) {
|
||||||
char buffer[100];
|
char buffer[100];
|
||||||
if (strerror_s(buffer, errno)) {
|
if (strerror_s(buffer, errno)) {
|
||||||
CATCH_RUNTIME_ERROR("Could not translate errno to a string");
|
CATCH_RUNTIME_ERROR("Could not translate errno to a string");
|
||||||
@ -5188,10 +5189,10 @@ namespace Catch {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
struct HashTest {
|
struct HashTest {
|
||||||
explicit HashTest(SimplePcg32& rng) {
|
explicit HashTest(SimplePcg32& rng_inst) {
|
||||||
basis = rng();
|
basis = rng_inst();
|
||||||
basis <<= 32;
|
basis <<= 32;
|
||||||
basis |= rng();
|
basis |= rng_inst();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t basis;
|
uint64_t basis;
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
// SPDX-License-Identifier: BSL-1.0
|
// SPDX-License-Identifier: BSL-1.0
|
||||||
|
|
||||||
// Catch v3.0.0-preview.2
|
// Catch v3.0.0-preview.3
|
||||||
// Generated: 2020-09-07 20:00:03.521464
|
// Generated: 2020-10-08 13:59:26.309308
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
// This file is an amalgamation of multiple different files.
|
// This file is an amalgamation of multiple different files.
|
||||||
// You probably shouldn't edit it directly.
|
// You probably shouldn't edit it directly.
|
||||||
@ -289,7 +289,7 @@ namespace Catch {
|
|||||||
|
|
||||||
// We have to avoid both ICC and Clang, because they try to mask themselves
|
// We have to avoid both ICC and Clang, because they try to mask themselves
|
||||||
// as gcc, and we want only GCC in this block
|
// as gcc, and we want only GCC in this block
|
||||||
#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC)
|
#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__)
|
||||||
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" )
|
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" )
|
||||||
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" )
|
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" )
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ namespace Catch {
|
|||||||
// ```
|
// ```
|
||||||
//
|
//
|
||||||
// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
|
// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
|
||||||
# if !defined(__ibmxl__)
|
# if !defined(__ibmxl__) && !defined(__CUDACC__)
|
||||||
# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */
|
# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@ -7472,6 +7472,45 @@ namespace Catch {
|
|||||||
#endif // CATCH_INTERFACES_ALL_HPP_INCLUDED
|
#endif // CATCH_INTERFACES_ALL_HPP_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** \file
|
||||||
|
* Wrapper for UNCAUGHT_EXCEPTIONS configuration option
|
||||||
|
*
|
||||||
|
* For some functionality, Catch2 requires to know whether there is
|
||||||
|
* an active exception. Because `std::uncaught_exception` is deprecated
|
||||||
|
* in C++17, we want to use `std::uncaught_exceptions` if possible.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP
|
||||||
|
#define CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# if _MSC_VER >= 1900 // Visual Studio 2015 or newer
|
||||||
|
# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
#if defined(__cpp_lib_uncaught_exceptions) \
|
||||||
|
&& !defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
|
||||||
|
|
||||||
|
# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
|
||||||
|
#endif // __cpp_lib_uncaught_exceptions
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) \
|
||||||
|
&& !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) \
|
||||||
|
&& !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
|
||||||
|
|
||||||
|
# define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif // CATCH_CONFIG_UNCAUGHT_EXCEPTIONS_HPP
|
||||||
|
|
||||||
|
|
||||||
#ifndef CATCH_CONSOLE_COLOUR_HPP_INCLUDED
|
#ifndef CATCH_CONSOLE_COLOUR_HPP_INCLUDED
|
||||||
#define CATCH_CONSOLE_COLOUR_HPP_INCLUDED
|
#define CATCH_CONSOLE_COLOUR_HPP_INCLUDED
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Version const& libraryVersion() {
|
Version const& libraryVersion() {
|
||||||
static Version version( 3, 0, 0, "preview", 2 );
|
static Version version( 3, 0, 0, "preview", 3 );
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user