Skip to content

Commit

Permalink
3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Oct 17, 2022
1 parent 5cd8938 commit 5df88da
Show file tree
Hide file tree
Showing 7 changed files with 160 additions and 64 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()

project(Catch2
VERSION 3.1.0 # CML version placeholder, don't delete
VERSION 3.1.1 # CML version placeholder, don't delete
LANGUAGES CXX
# HOMEPAGE_URL is not supported until CMake version 3.12, which
# we do not target yet.
Expand Down
34 changes: 34 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.1.1](#311)<br>
[3.1.0](#310)<br>
[3.0.1](#301)<br>
[2.13.7](#2137)<br>
Expand Down Expand Up @@ -50,6 +51,39 @@
[Even Older versions](#even-older-versions)<br>



## 3.1.1

### Improvements
* Added `Catch::getSeed` function that user code can call to retrieve current rng-seed
* Better detection of compiler support for `-ffile-prefix-map` (#2517)
* Catch2's shared libraries now have `SOVERSION` set (#2516)
* `catch2/catch_all.hpp` convenience header no longer transitively includes `windows.h` (#2432, #2526)


### Fixes
* Fixed compilation on Universal Windows Platform
* Fixed compilation on VxWorks (#2515)
* Fixed compilation on Cygwin (#2540)
* Remove unused variable in reporter registration (#2538)
* Fixed some symbol visibility issues with dynamic library on Windows (#2527)
* Suppressed `-Wuseless-cast` warnings in `REQUIRE_THROWS*` macros (#2520, #2521)
* This was triggered when the potentially throwing expression evaluates to `void`
* Fixed "warning: storage class is not first" with `nvc++` (#2533)
* Fixed handling of `DL_PATHS` argument to `catch_discover_tests` on MacOS (#2483)
* Suppressed `*-avoid-c-arrays` clang-tidy warning in `TEMPLATE_TEST_CASE` (#2095, #2536)


### Miscellaneous
* Fixed CMake install step for Catch2 build as dynamic library (#2485)
* Raised minimum CMake version to 3.10 (#2523)
* Expect the minimum CMake version to increase once more in next few releases.
* Whole bunch of doc updates and fixes
* #1444, #2497, #2547, #2549, and more
* Added support for building Catch2 with Meson (#2530, #2539)



## 3.1.0

### Improvements
Expand Down
53 changes: 44 additions & 9 deletions extras/catch_amalgamated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

// SPDX-License-Identifier: BSL-1.0

// Catch v3.1.0
// Generated: 2022-07-17 20:14:05.885021
// Catch v3.1.1
// Generated: 2022-10-17 18:47:22.400176
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
Expand All @@ -15,6 +15,28 @@
#include "catch_amalgamated.hpp"


#ifndef CATCH_WINDOWS_H_PROXY_HPP_INCLUDED
#define CATCH_WINDOWS_H_PROXY_HPP_INCLUDED


#if defined(CATCH_PLATFORM_WINDOWS)

// We might end up with the define made globally through the compiler,
// and we don't want to trigger warnings for this
#if !defined(NOMINMAX)
# define NOMINMAX
#endif
#if !defined(WIN32_LEAN_AND_MEAN)
# define WIN32_LEAN_AND_MEAN
#endif

#include <windows.h>

#endif // defined(CATCH_PLATFORM_WINDOWS)

#endif // CATCH_WINDOWS_H_PROXY_HPP_INCLUDED




namespace Catch {
Expand Down Expand Up @@ -488,8 +510,11 @@ namespace Catch {

namespace {
bool provideBazelReporterOutput() {
#ifdef CATCH_CONFIG_BAZEL_SUPPORT
#if defined(CATCH_CONFIG_BAZEL_SUPPORT)
return true;
#elif defined(CATCH_PLATFORM_WINDOWS_UWP)
// UWP does not support environment variables
return false;
#else

# if defined( _MSC_VER )
Expand Down Expand Up @@ -554,6 +579,7 @@ namespace Catch {
} );
}

#if !defined(CATCH_PLATFORM_WINDOWS_UWP)
if(provideBazelReporterOutput()){
// Register a JUnit reporter for Bazel. Bazel sets an environment
// variable with the path to XML output. If this file is written to
Expand All @@ -575,7 +601,7 @@ namespace Catch {
{ "junit", std::string( bazelOutputFilePtr ), {}, {} } );
}
}

#endif

// We now fixup the reporter specs to handle default output spec,
// default colour spec, etc
Expand Down Expand Up @@ -659,6 +685,16 @@ namespace Catch {





namespace Catch {
std::uint32_t getSeed() {
return getCurrentContext().getConfig()->rngSeed();
}
}



#include <cassert>
#include <stack>

Expand Down Expand Up @@ -882,15 +918,13 @@ namespace Catch {
multi->addListener(listener->create(config));
}

std::size_t reporterIdx = 0;
for ( auto const& reporterSpec : config->getProcessedReporterSpecs() ) {
multi->addReporter( createReporter(
reporterSpec.name,
ReporterConfig( config,
makeStream( reporterSpec.outputFilename ),
reporterSpec.colourMode,
reporterSpec.customOptions ) ) );
reporterIdx++;
}

return multi;
Expand Down Expand Up @@ -1890,7 +1924,7 @@ namespace Catch {
}

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

Expand Down Expand Up @@ -3957,6 +3991,7 @@ namespace Detail {
FileStream( std::string const& filename ) {
m_ofs.open( filename.c_str() );
CATCH_ENFORCE( !m_ofs.fail(), "Unable to open file: '" << filename << '\'' );
m_ofs << std::unitbuf;
}
~FileStream() override = default;
public: // IStream
Expand Down Expand Up @@ -7878,7 +7913,7 @@ class AssertionPrinter {
<< serializeFilters( m_config->getTestsOrTags() )
<< '\n';
}
m_stream << "RNG seed: " << m_config->rngSeed() << '\n';
m_stream << "RNG seed: " << getSeed() << '\n';
}

void CompactReporter::assertionEnded( AssertionStats const& _assertionStats ) {
Expand Down Expand Up @@ -8399,7 +8434,7 @@ void ConsoleReporter::testRunStarting(TestRunInfo const& _testInfo) {
m_stream << m_colour->guardColour( Colour::BrightYellow ) << "Filters: "
<< serializeFilters( m_config->getTestsOrTags() ) << '\n';
}
m_stream << "Randomness seeded to: " << m_config->rngSeed() << '\n';
m_stream << "Randomness seeded to: " << getSeed() << '\n';
}

void ConsoleReporter::lazyPrint() {
Expand Down
Loading

0 comments on commit 5df88da

Please sign in to comment.