mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
v2.10.0
This commit is contained in:
parent
a92a7d0229
commit
7c9f92bc1c
@ -6,7 +6,7 @@ if(NOT DEFINED PROJECT_NAME)
|
|||||||
set(NOT_SUBPROJECT ON)
|
set(NOT_SUBPROJECT ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(Catch2 LANGUAGES CXX VERSION 2.9.2)
|
project(Catch2 LANGUAGES CXX VERSION 2.10.0)
|
||||||
|
|
||||||
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
|
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||||
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
|
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
[![Build Status](https://travis-ci.org/catchorg/Catch2.svg?branch=master)](https://travis-ci.org/catchorg/Catch2)
|
[![Build Status](https://travis-ci.org/catchorg/Catch2.svg?branch=master)](https://travis-ci.org/catchorg/Catch2)
|
||||||
[![Build status](https://ci.appveyor.com/api/projects/status/github/catchorg/Catch2?svg=true)](https://ci.appveyor.com/project/catchorg/catch2)
|
[![Build status](https://ci.appveyor.com/api/projects/status/github/catchorg/Catch2?svg=true)](https://ci.appveyor.com/project/catchorg/catch2)
|
||||||
[![codecov](https://codecov.io/gh/catchorg/Catch2/branch/master/graph/badge.svg)](https://codecov.io/gh/catchorg/Catch2)
|
[![codecov](https://codecov.io/gh/catchorg/Catch2/branch/master/graph/badge.svg)](https://codecov.io/gh/catchorg/Catch2)
|
||||||
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/8YrGVqYqqSC4Sc5R)
|
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/00GdTUbFWaV3bNah)
|
||||||
[![Join the chat in Discord: https://discord.gg/4CWS9zD](https://img.shields.io/badge/Discord-Chat!-brightgreen.svg)](https://discord.gg/4CWS9zD)
|
[![Join the chat in Discord: https://discord.gg/4CWS9zD](https://img.shields.io/badge/Discord-Chat!-brightgreen.svg)](https://discord.gg/4CWS9zD)
|
||||||
|
|
||||||
|
|
||||||
<a href="https://github.com/catchorg/Catch2/releases/download/v2.9.2/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>
|
<a href="https://github.com/catchorg/Catch2/releases/download/v2.10.0/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>
|
||||||
|
|
||||||
## Catch2 is released!
|
## Catch2 is released!
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ by using `_NO_` in the macro, e.g. `CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS`.
|
|||||||
CATCH_CONFIG_ANDROID_LOGWRITE // Use android's logging system for debug output
|
CATCH_CONFIG_ANDROID_LOGWRITE // Use android's logging system for debug output
|
||||||
CATCH_CONFIG_GLOBAL_NEXTAFTER // Use nextafter{,f,l} instead of std::nextafter
|
CATCH_CONFIG_GLOBAL_NEXTAFTER // Use nextafter{,f,l} instead of std::nextafter
|
||||||
|
|
||||||
> [`CATCH_CONFIG_ANDROID_LOGWRITE`](https://github.com/catchorg/Catch2/issues/1743) and [`CATCH_CONFIG_GLOBAL_NEXTAFTER`](https://github.com/catchorg/Catch2/pull/1739) were introduced in Catch X.Y.Z
|
> [`CATCH_CONFIG_ANDROID_LOGWRITE`](https://github.com/catchorg/Catch2/issues/1743) and [`CATCH_CONFIG_GLOBAL_NEXTAFTER`](https://github.com/catchorg/Catch2/pull/1739) were introduced in Catch 2.10.0
|
||||||
|
|
||||||
Currently Catch enables `CATCH_CONFIG_WINDOWS_SEH` only when compiled with MSVC, because some versions of MinGW do not have the necessary Win32 API support.
|
Currently Catch enables `CATCH_CONFIG_WINDOWS_SEH` only when compiled with MSVC, because some versions of MinGW do not have the necessary Win32 API support.
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ a test case,
|
|||||||
|
|
||||||
> `ChunkGenerator<T>`, `RandomIntegerGenerator<Integral>`, `RandomFloatGenerator<Float>` and `RangeGenerator<T>` were introduced in Catch 2.7.0.
|
> `ChunkGenerator<T>`, `RandomIntegerGenerator<Integral>`, `RandomFloatGenerator<Float>` and `RangeGenerator<T>` were introduced in Catch 2.7.0.
|
||||||
|
|
||||||
> `IteratorGenerator<T>` was introduced in Catch X.Y.Z.
|
> `IteratorGenerator<T>` was introduced in Catch 2.10.0.
|
||||||
|
|
||||||
The generators also have associated helper functions that infer their
|
The generators also have associated helper functions that infer their
|
||||||
type, making their usage much nicer. These are
|
type, making their usage much nicer. These are
|
||||||
@ -76,7 +76,7 @@ type, making their usage much nicer. These are
|
|||||||
|
|
||||||
> `chunk()`, `random()` and both `range()` functions were introduced in Catch 2.7.0.
|
> `chunk()`, `random()` and both `range()` functions were introduced in Catch 2.7.0.
|
||||||
|
|
||||||
> `from_range` has been introduced in Catch X.Y.Z
|
> `from_range` has been introduced in Catch 2.10.0
|
||||||
|
|
||||||
And can be used as shown in the example below to create a generator
|
And can be used as shown in the example below to create a generator
|
||||||
that returns 100 odd random number:
|
that returns 100 odd random number:
|
||||||
|
@ -90,7 +90,7 @@ the helpers for this matcher, `WithinRel(double target, double margin)`,
|
|||||||
`WithinRel(float target)`. The latter two provide a default epsilon of
|
`WithinRel(float target)`. The latter two provide a default epsilon of
|
||||||
machine epsilon * 100.
|
machine epsilon * 100.
|
||||||
|
|
||||||
> `WithinRel` matcher was introduced in Catch X.Y.Z
|
> `WithinRel` matcher was introduced in Catch 2.10.0
|
||||||
|
|
||||||
### Generic matchers
|
### Generic matchers
|
||||||
Catch also aims to provide a set of generic matchers. Currently this set
|
Catch also aims to provide a set of generic matchers. Currently this set
|
||||||
@ -120,7 +120,7 @@ is `ExceptionMessageMatcher`, and we also provide a helper function
|
|||||||
The matched exception must publicly derive from `std::exception` and
|
The matched exception must publicly derive from `std::exception` and
|
||||||
the message matching is done _exactly_, including case.
|
the message matching is done _exactly_, including case.
|
||||||
|
|
||||||
> `ExceptionMessageMatcher` was introduced in Catch X.Y.Z
|
> `ExceptionMessageMatcher` was introduced in Catch 2.10.0
|
||||||
|
|
||||||
Example use:
|
Example use:
|
||||||
```cpp
|
```cpp
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
# Release notes
|
# Release notes
|
||||||
**Contents**<br>
|
**Contents**<br>
|
||||||
|
[2.10.0](#2100)<br>
|
||||||
[2.9.2](#292)<br>
|
[2.9.2](#292)<br>
|
||||||
[2.9.1](#291)<br>
|
[2.9.1](#291)<br>
|
||||||
[2.9.0](#290)<br>
|
[2.9.0](#290)<br>
|
||||||
@ -28,6 +29,50 @@
|
|||||||
[Even Older versions](#even-older-versions)<br>
|
[Even Older versions](#even-older-versions)<br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 2.10.0
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
* `TEMPLATE_LIST_TEST_CASE` now properly handles non-copyable and non-movable types (#1729)
|
||||||
|
* Fixed compilation error on Solaris caused by a system header defining macro `TT` (#1722, #1723)
|
||||||
|
* `REGISTER_ENUM` will now fail at compilation time if the registered enum is too large
|
||||||
|
* Removed use of `std::is_same_v` in C++17 mode (#1757)
|
||||||
|
* Fixed parsing of escaped special characters when reading test specs from a file (#1767, #1769)
|
||||||
|
|
||||||
|
|
||||||
|
### Improvements
|
||||||
|
* Trailing and leading whitespace in test/section specs are now ignored.
|
||||||
|
* Writing to Android debug log now uses `__android_log_write` instead of `__android_log_print`
|
||||||
|
* Android logging support can now be turned on/off at compile time (#1743)
|
||||||
|
* The toggle is `CATCH_CONFIG_ANDROID_LOGWRITE`
|
||||||
|
* Added a generator that returns elements of a range
|
||||||
|
* Use via `from_range(from, to)` or `from_range(container)`
|
||||||
|
* Added support for CRTs that do not provide `std::nextafter` (#1739)
|
||||||
|
* They must still provide global `nextafter{f,l,}`
|
||||||
|
* Enabled via `CATCH_CONFIG_GLOBAL_NEXTAFTER`
|
||||||
|
* Special cased `Approx(inf)` not to match non-infinite values
|
||||||
|
* Very strictly speaking this might be a breaking change, but it should match user expectations better
|
||||||
|
* The output of benchmarking through the Console reporter when `--benchmark-no-analysis` is set is now much simpler (#1768)
|
||||||
|
* Added a matcher that can be used for checking an exceptions message (#1649, #1728)
|
||||||
|
* The matcher helper function is called `Message`
|
||||||
|
* The exception must publicly derive from `std::exception`
|
||||||
|
* The matching is done exactly, including case and whitespace
|
||||||
|
* Added a matcher that can be used for checking relative equality of floating point numbers (#1746)
|
||||||
|
* Unlike `Approx`, it considers both sides when determining the allowed margin
|
||||||
|
* Special cases `NaN` and `INFINITY` to match user expectations
|
||||||
|
* The matcher helper function is called `WithinRel`
|
||||||
|
* The ULP matcher now allows for any possible distance between the two numbers
|
||||||
|
* The random number generators now use Catch-global instance of RNG (#1734, #1736)
|
||||||
|
* This means that nested random number generators actually generate different numbers
|
||||||
|
|
||||||
|
|
||||||
|
### Miscellaneous
|
||||||
|
* In-repo PNGs have been optimized to lower overhead of using Catch2 via git clone
|
||||||
|
* Catch2 now uses its own implementation of the URBG concept
|
||||||
|
* In the future we also plan to use our own implementation of the distributions from `<random>` to provide cross-platform repeatability of random results
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 2.9.2
|
## 2.9.2
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
#define TWOBLUECUBES_CATCH_HPP_INCLUDED
|
#define TWOBLUECUBES_CATCH_HPP_INCLUDED
|
||||||
|
|
||||||
#define CATCH_VERSION_MAJOR 2
|
#define CATCH_VERSION_MAJOR 2
|
||||||
#define CATCH_VERSION_MINOR 9
|
#define CATCH_VERSION_MINOR 10
|
||||||
#define CATCH_VERSION_PATCH 2
|
#define CATCH_VERSION_PATCH 0
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
# pragma clang system_header
|
# pragma clang system_header
|
||||||
|
@ -37,7 +37,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Version const& libraryVersion() {
|
Version const& libraryVersion() {
|
||||||
static Version version( 2, 9, 2, "", 0 );
|
static Version version( 2, 10, 0, "", 0 );
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -183,7 +183,6 @@ namespace Catch {
|
|||||||
|
|
||||||
SourceLineInfo lineInfo = m_sectionStack.front().lineInfo;
|
SourceLineInfo lineInfo = m_sectionStack.front().lineInfo;
|
||||||
|
|
||||||
if( !lineInfo.empty() )
|
|
||||||
os << lineInfo << "\n";
|
os << lineInfo << "\n";
|
||||||
os << getLineOfChars<'.'>() << "\n\n";
|
os << getLineOfChars<'.'>() << "\n\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user