Skip to content

Commit 914aeec

Browse files
committed
v3.8.0
1 parent 232e893 commit 914aeec

File tree

7 files changed

+134
-81
lines changed

7 files changed

+134
-81
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
3535
endif()
3636

3737
project(Catch2
38-
VERSION 3.7.1 # CML version placeholder, don't delete
38+
VERSION 3.8.0 # CML version placeholder, don't delete
3939
LANGUAGES CXX
4040
HOMEPAGE_URL "https://github.com/catchorg/Catch2"
4141
DESCRIPTION "A modern, C++-native, unit test framework."

docs/release-notes.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Release notes
44
**Contents**<br>
5+
[3.8.0](#380)<br>
56
[3.7.1](#371)<br>
67
[3.7.0](#370)<br>
78
[3.6.0](#360)<br>
@@ -65,6 +66,31 @@
6566
[Even Older versions](#even-older-versions)<br>
6667

6768

69+
## 3.8.0
70+
71+
### Improvements
72+
* Added `std::initializer_list` overloads for `(Unordered)RangeEquals` matcher (#2915, #2919)
73+
* Added explicit casts to silence GCC's `Wconversion` (#2875)
74+
* Made the use of `builtin_constant_p` tricks in assertion macros configurable (#2925)
75+
* It is used to prod GCC-like compilers into providing warnings for the asserted expressions, but the compilers miscompile it annoyingly often.
76+
* Cleaned out Clang-Tidy's `performance-enum-size` warnings
77+
* Added support for using `from_range` generator with iterators with `value_type = const T` (#2926)
78+
* This is not correct `value_type` typedef, but it is used in the wild and the change does not make the code meaningfully worse.
79+
80+
### Fixes
81+
* Fixed crash when stringifying pre-1970 (epoch) dates on Windows (#2944)
82+
83+
### Miscellaneous
84+
* Fixes and improvements for `catch_discover_tests` CMake helper
85+
* Removed redundant `CTEST_FILE` param when creating the indirection file for `PRE_TEST` discovery mode (#2936)
86+
* Rewrote the test discovery logic to use output from the JSON reporter
87+
* This means that `catch_discover_tests` now requires CMake 3.19 or newer
88+
* Added `ADD_TAGS_AS_LABELS` option. If specified, each CTest test will be labeled with corrensponding Catch2's test tag
89+
* Bumped up the minimum required CMake version to build Catch2 to 3.16
90+
* Meson build now provides option to avoid installing Catch2
91+
* Bazel build is moved to Bzlmod.
92+
93+
6894
## 3.7.1
6995

7096
### Improvements

extras/catch_amalgamated.cpp

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
// SPDX-License-Identifier: BSL-1.0
88

9-
// Catch v3.7.1
10-
// Generated: 2024-09-17 10:36:45.608896
9+
// Catch v3.8.0
10+
// Generated: 2025-01-06 00:39:54.679994
1111
// ----------------------------------------------------------
1212
// This file is an amalgamation of multiple different files.
1313
// You probably shouldn't edit it directly.
@@ -332,7 +332,7 @@ namespace Catch {
332332
double diff = b - m;
333333
return a + diff * diff;
334334
} ) /
335-
( last - first );
335+
static_cast<double>( last - first );
336336
return std::sqrt( variance );
337337
}
338338

@@ -367,7 +367,7 @@ namespace Catch {
367367
double* first,
368368
double* last ) {
369369
auto count = last - first;
370-
double idx = (count - 1) * k / static_cast<double>(q);
370+
double idx = static_cast<double>((count - 1) * k) / static_cast<double>(q);
371371
int j = static_cast<int>(idx);
372372
double g = idx - j;
373373
std::nth_element(first, first + j, last);
@@ -470,10 +470,10 @@ namespace Catch {
470470

471471
double accel = sum_cubes / ( 6 * std::pow( sum_squares, 1.5 ) );
472472
long n = static_cast<long>( resample.size() );
473-
double prob_n =
473+
double prob_n = static_cast<double>(
474474
std::count_if( resample.begin(),
475475
resample.end(),
476-
[point]( double x ) { return x < point; } ) /
476+
[point]( double x ) { return x < point; } )) /
477477
static_cast<double>( n );
478478
// degenerate case with uniform samples
479479
if ( Catch::Detail::directCompare( prob_n, 0. ) ) {
@@ -1926,7 +1926,7 @@ namespace Catch {
19261926
return static_cast<unsigned int>(getElapsedMicroseconds()/1000);
19271927
}
19281928
auto Timer::getElapsedSeconds() const -> double {
1929-
return getElapsedMicroseconds()/1000000.0;
1929+
return static_cast<double>(getElapsedMicroseconds())/1000000.0;
19301930
}
19311931

19321932

@@ -1946,7 +1946,10 @@ namespace Detail {
19461946
const int hexThreshold = 255;
19471947

19481948
struct Endianness {
1949-
enum Arch { Big, Little };
1949+
enum Arch : uint8_t {
1950+
Big,
1951+
Little
1952+
};
19501953

19511954
static Arch which() {
19521955
int one = 1;
@@ -2280,7 +2283,7 @@ namespace Catch {
22802283
}
22812284

22822285
Version const& libraryVersion() {
2283-
static Version version( 3, 7, 1, "", 0 );
2286+
static Version version( 3, 8, 0, "", 0 );
22842287
return version;
22852288
}
22862289

@@ -3516,7 +3519,7 @@ namespace {
35163519
#endif // Windows/ ANSI/ None
35173520

35183521

3519-
#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC )
3522+
#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC ) || defined( __GLIBC__ )
35203523
# define CATCH_INTERNAL_HAS_ISATTY
35213524
# include <unistd.h>
35223525
#endif
@@ -5258,7 +5261,7 @@ namespace {
52585261
SimplePcg32::result_type SimplePcg32::operator()() {
52595262
// prepare the output value
52605263
const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);
5261-
const auto output = rotate_right(xorshifted, m_state >> 59u);
5264+
const auto output = rotate_right(xorshifted, static_cast<uint32_t>(m_state >> 59u));
52625265

52635266
// advance state
52645267
m_state = m_state * 6364136223846793005ULL + s_inc;
@@ -9108,7 +9111,7 @@ struct RowBreak {};
91089111
struct OutputFlush {};
91099112

91109113
class Duration {
9111-
enum class Unit {
9114+
enum class Unit : uint8_t {
91129115
Auto,
91139116
Nanoseconds,
91149117
Microseconds,
@@ -9180,7 +9183,10 @@ class Duration {
91809183
};
91819184
} // end anon namespace
91829185

9183-
enum class Justification { Left, Right };
9186+
enum class Justification : uint8_t {
9187+
Left,
9188+
Right
9189+
};
91849190

91859191
struct ColumnInfo {
91869192
std::string name;

0 commit comments

Comments
 (0)