Skip to content

Commit

Permalink
v3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Jan 5, 2025
1 parent 232e893 commit 914aeec
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 81 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()

project(Catch2
VERSION 3.7.1 # CML version placeholder, don't delete
VERSION 3.8.0 # CML version placeholder, don't delete
LANGUAGES CXX
HOMEPAGE_URL "https://github.com/catchorg/Catch2"
DESCRIPTION "A modern, C++-native, unit test framework."
Expand Down
26 changes: 26 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Release notes
**Contents**<br>
[3.8.0](#380)<br>
[3.7.1](#371)<br>
[3.7.0](#370)<br>
[3.6.0](#360)<br>
Expand Down Expand Up @@ -65,6 +66,31 @@
[Even Older versions](#even-older-versions)<br>


## 3.8.0

### Improvements
* Added `std::initializer_list` overloads for `(Unordered)RangeEquals` matcher (#2915, #2919)
* Added explicit casts to silence GCC's `Wconversion` (#2875)
* Made the use of `builtin_constant_p` tricks in assertion macros configurable (#2925)
* It is used to prod GCC-like compilers into providing warnings for the asserted expressions, but the compilers miscompile it annoyingly often.
* Cleaned out Clang-Tidy's `performance-enum-size` warnings
* Added support for using `from_range` generator with iterators with `value_type = const T` (#2926)
* This is not correct `value_type` typedef, but it is used in the wild and the change does not make the code meaningfully worse.

### Fixes
* Fixed crash when stringifying pre-1970 (epoch) dates on Windows (#2944)

### Miscellaneous
* Fixes and improvements for `catch_discover_tests` CMake helper
* Removed redundant `CTEST_FILE` param when creating the indirection file for `PRE_TEST` discovery mode (#2936)
* Rewrote the test discovery logic to use output from the JSON reporter
* This means that `catch_discover_tests` now requires CMake 3.19 or newer
* Added `ADD_TAGS_AS_LABELS` option. If specified, each CTest test will be labeled with corrensponding Catch2's test tag
* Bumped up the minimum required CMake version to build Catch2 to 3.16
* Meson build now provides option to avoid installing Catch2
* Bazel build is moved to Bzlmod.


## 3.7.1

### Improvements
Expand Down
32 changes: 19 additions & 13 deletions extras/catch_amalgamated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

// SPDX-License-Identifier: BSL-1.0

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

Expand Down Expand Up @@ -367,7 +367,7 @@ namespace Catch {
double* first,
double* last ) {
auto count = last - first;
double idx = (count - 1) * k / static_cast<double>(q);
double idx = static_cast<double>((count - 1) * k) / static_cast<double>(q);
int j = static_cast<int>(idx);
double g = idx - j;
std::nth_element(first, first + j, last);
Expand Down Expand Up @@ -470,10 +470,10 @@ namespace Catch {

double accel = sum_cubes / ( 6 * std::pow( sum_squares, 1.5 ) );
long n = static_cast<long>( resample.size() );
double prob_n =
double prob_n = static_cast<double>(
std::count_if( resample.begin(),
resample.end(),
[point]( double x ) { return x < point; } ) /
[point]( double x ) { return x < point; } )) /
static_cast<double>( n );
// degenerate case with uniform samples
if ( Catch::Detail::directCompare( prob_n, 0. ) ) {
Expand Down Expand Up @@ -1926,7 +1926,7 @@ namespace Catch {
return static_cast<unsigned int>(getElapsedMicroseconds()/1000);
}
auto Timer::getElapsedSeconds() const -> double {
return getElapsedMicroseconds()/1000000.0;
return static_cast<double>(getElapsedMicroseconds())/1000000.0;
}


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

struct Endianness {
enum Arch { Big, Little };
enum Arch : uint8_t {
Big,
Little
};

static Arch which() {
int one = 1;
Expand Down Expand Up @@ -2280,7 +2283,7 @@ namespace Catch {
}

Version const& libraryVersion() {
static Version version( 3, 7, 1, "", 0 );
static Version version( 3, 8, 0, "", 0 );
return version;
}

Expand Down Expand Up @@ -3516,7 +3519,7 @@ namespace {
#endif // Windows/ ANSI/ None


#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC )
#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC ) || defined( __GLIBC__ )
# define CATCH_INTERNAL_HAS_ISATTY
# include <unistd.h>
#endif
Expand Down Expand Up @@ -5258,7 +5261,7 @@ namespace {
SimplePcg32::result_type SimplePcg32::operator()() {
// prepare the output value
const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);
const auto output = rotate_right(xorshifted, m_state >> 59u);
const auto output = rotate_right(xorshifted, static_cast<uint32_t>(m_state >> 59u));

// advance state
m_state = m_state * 6364136223846793005ULL + s_inc;
Expand Down Expand Up @@ -9108,7 +9111,7 @@ struct RowBreak {};
struct OutputFlush {};

class Duration {
enum class Unit {
enum class Unit : uint8_t {
Auto,
Nanoseconds,
Microseconds,
Expand Down Expand Up @@ -9180,7 +9183,10 @@ class Duration {
};
} // end anon namespace

enum class Justification { Left, Right };
enum class Justification : uint8_t {
Left,
Right
};

struct ColumnInfo {
std::string name;
Expand Down
Loading

0 comments on commit 914aeec

Please sign in to comment.