Skip to content

Commit

Permalink
Update Catch to v2.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Apr 22, 2020
1 parent 137b6d3 commit 2025e88
Show file tree
Hide file tree
Showing 34 changed files with 1,008 additions and 158 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"uuid": "^7.0.3"
},
"devDependencies": {
"@types/node": "^13.13.1",
"@types/node": "^13.13.2",
"@types/random-number": "0.0.0",
"@types/uuid": "^7.0.2",
"@typescript-eslint/eslint-plugin": "^2.29.0",
Expand Down
2 changes: 1 addition & 1 deletion worker/deps/catch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()


project(Catch2 LANGUAGES CXX VERSION 2.11.3)
project(Catch2 LANGUAGES CXX VERSION 2.12.1)

# Provide path for scripts
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
Expand Down
4 changes: 2 additions & 2 deletions worker/deps/catch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
[![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)
[![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/p9Pcgple8QWwgNR0)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/DQL97fLLJLZXwB8d)
[![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.11.3/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.12.1/catch.hpp">The latest version of the single header can be downloaded directly using this link</a>

## Catch2 is released!

Expand Down
2 changes: 1 addition & 1 deletion worker/deps/catch/contrib/ParseAndAddCatchTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function(ParseAndAddCatchTests_ParseFile SourceFile TestTarget)
if("${TestType}" STREQUAL "SCENARIO")
set(Name "Scenario: ${Name}")
endif()
if(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME AND TestFixture)
if(PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME AND "${TestType}" MATCHES "(CATCH_)?TEST_CASE_METHOD" AND TestFixture )
set(CTestName "${TestFixture}:${Name}")
else()
set(CTestName "${Name}")
Expand Down
14 changes: 14 additions & 0 deletions worker/deps/catch/docs/cmake-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[Automatic test registration](#automatic-test-registration)<br>
[CMake project options](#cmake-project-options)<br>
[Installing Catch2 from git repository](#installing-catch2-from-git-repository)<br>
[Installing Catch2 from vcpkg](#installing-catch2-from-vcpkg)<br>

Because we use CMake to build Catch2, we also provide a couple of
integration points for our users.
Expand Down Expand Up @@ -220,6 +221,19 @@ when configuring the build, and then modify your calls to
[find_package](https://cmake.org/cmake/help/latest/command/find_package.html)
accordingly.

## Installing Catch2 from vcpkg

Alternatively, you can build and install Catch2 using [vcpkg](https://github.com/microsoft/vcpkg/) dependency manager:
```
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install catch2
```

The catch2 port in vcpkg is kept up to date by microsoft team members and community contributors.
If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.

---

Expand Down
18 changes: 14 additions & 4 deletions worker/deps/catch/docs/command-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,25 @@ This option lists all available tests in a non-indented form, one on each line.

Test cases are ordered one of three ways:


### decl
Declaration order (this is the default order if no --order argument is provided). The order the tests were originally declared in. Note that ordering between files is not guaranteed and is implementation dependent.
Declaration order (this is the default order if no --order argument is provided).
Tests in the same TU are sorted using their declaration orders, different
TUs are in an implementation (linking) dependent order.


### lex
Lexicographically sorted. Tests are sorted, alpha-numerically, by name.
Lexicographic order. Tests are sorted by their name, their tags are ignored.


### rand
Randomly sorted. Test names are sorted using ```std::random_shuffle()```. By default the random number generator is seeded with 0 - and so the order is repeatable. To control the random seed see <a href="#rng-seed">rng-seed</a>.

Randomly sorted. The order is dependent on Catch2's random seed (see
[`--rng-seed`](#rng-seed)), and is subset invariant. What this means
is that as long as the random seed is fixed, running only some tests
(e.g. via tag) does not change their relative order.

> The subset stability was introduced in Catch2 v2.12.0

<a id="rng-seed"></a>
## Specify a seed for the Random Number Generator
Expand Down
31 changes: 17 additions & 14 deletions worker/deps/catch/docs/opensource-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ Listing a project here does not imply endorsement and the plan is to keep these
### [ApprovalTests.cpp](https://github.com/approvals/ApprovalTests.cpp)
C++11 implementation of Approval Tests, for quick, convenient testing of legacy code.

### [args](https://github.com/Taywee/args)
A simple header-only C++ argument parser library.

### [Azmq](https://github.com/zeromq/azmq)
Boost Asio style bindings for ZeroMQ.

### [Cataclysm: Dark Days Ahead](https://github.com/CleverRaven/Cataclysm-DDA)
Post-apocalyptic survival RPG.

### [ChakraCore](https://github.com/Microsoft/ChakraCore)
The core part of the Chakra JavaScript engine that powers Microsoft Edge.

### [ChaiScript](https://github.com/ChaiScript/ChaiScript)
A, header-only, embedded scripting language designed from the ground up to directly target C++ and take advantage of modern C++ development techniques.

### [ChakraCore](https://github.com/Microsoft/ChakraCore)
The core part of the Chakra JavaScript engine that powers Microsoft Edge.

### [Clara](https://github.com/philsquared/Clara)
A, single-header-only, type-safe, command line parser - which also prints formatted usage strings.

Expand Down Expand Up @@ -65,9 +68,6 @@ A small C++ library wrapper for the native C ODBC API.
### [Nonius](https://github.com/libnonius/nonius)
A header-only framework for benchmarking small snippets of C++ code.

### [SOCI](https://github.com/SOCI/soci)
The C++ Database Access Library.

### [polymorphic_value](https://github.com/jbcoe/polymorphic_value)
A polymorphic value-type for C++.

Expand All @@ -77,18 +77,21 @@ A C++ client library for Consul. Consul is a distributed tool for discovering an
### [Reactive-Extensions/ RxCpp](https://github.com/Reactive-Extensions/RxCpp)
A library of algorithms for values-distributed-in-time.

### [thor](https://github.com/xorz57/thor)
Wrapper Library for CUDA.
### [SOCI](https://github.com/SOCI/soci)
The C++ Database Access Library.

### [TextFlowCpp](https://github.com/philsquared/textflowcpp)
A small, single-header-only, library for wrapping and composing columns of text.

### [thor](https://github.com/xorz57/thor)
Wrapper Library for CUDA.

### [toml++](https://github.com/marzer/tomlplusplus)
A header-only TOML parser and serializer for modern C++.

### [Trompeloeil](https://github.com/rollbear/trompeloeil)
A thread-safe header-only mocking framework for C++14.

### [args](https://github.com/Taywee/args)
A simple header-only C++ argument parser library.

## Applications & Tools

### [ArangoDB](https://github.com/arangodb/arangodb)
Expand All @@ -103,6 +106,9 @@ MAME originally stood for Multiple Arcade Machine Emulator.
### [Newsbeuter](https://github.com/akrennmair/newsbeuter)
Newsbeuter is an open-source RSS/Atom feed reader for text terminals.

### [PopHead](https://github.com/SPC-Some-Polish-Coders/PopHead)
A 2D, Zombie, RPG game which is being made on our own engine.

### [raspigcd](https://github.com/pantadeusz/raspigcd)
Low level CLI app and library for execution of GCODE on Raspberry Pi without any additional microcontrolers (just RPi + Stepsticks).

Expand All @@ -112,9 +118,6 @@ SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gr
### [Standardese](https://github.com/foonathan/standardese)
Standardese aims to be a nextgen Doxygen.

### [PopHead](https://github.com/SPC-Some-Polish-Coders/PopHead)
A 2D, Zombie, RPG game which is being made on our own engine.

---

[Home](Readme.md#top)
33 changes: 33 additions & 0 deletions worker/deps/catch/docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Release notes
**Contents**<br>
[2.12.1](#2121)<br>
[2.12.0](#2120)<br>
[2.11.3](#2113)<br>
[2.11.2](#2112)<br>
[2.11.1](#2111)<br>
Expand Down Expand Up @@ -34,6 +36,37 @@
[Older versions](#older-versions)<br>
[Even Older versions](#even-older-versions)<br>

## 2.12.1

### Fixes
* Vector matchers now support initializer list literals better

### Improvements
* Added support for `^` (bitwise xor) to `CHECK` and `REQUIRE`


## 2.12.0

### Improvements
* Running tests in random order (`--order rand`) has been reworked significantly (#1908)
* Given same seed, all platforms now produce the same order
* Given same seed, the relative order of tests does not change if you select only a subset of them
* Vector matchers support custom allocators (#1909)
* `|` and `&` (bitwise or and bitwise and) are now supported in `CHECK` and `REQUIRE`
* The resulting type must be convertible to `bool`

### Fixes
* Fixed computation of benchmarking column widths in ConsoleReporter (#1885, #1886)
* Suppressed clang-tidy's `cppcoreguidelines-pro-type-vararg` in assertions (#1901)
* It was a false positive trigered by the new warning support workaround
* Fixed bug in test specification parser handling of OR'd patterns using escaping (#1905)

### Miscellaneous
* Worked around IBM XL's codegen bug (#1907)
* It would emit code for _destructors_ of temporaries in an unevaluated context
* Improved detection of stdlib's support for `std::uncaught_exceptions` (#1911)


## 2.11.3

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions worker/deps/catch/include/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#define TWOBLUECUBES_CATCH_HPP_INCLUDED

#define CATCH_VERSION_MAJOR 2
#define CATCH_VERSION_MINOR 11
#define CATCH_VERSION_PATCH 3
#define CATCH_VERSION_MINOR 12
#define CATCH_VERSION_PATCH 1

#ifdef __clang__
# pragma clang system_header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "catch_interfaces_registry_hub.h"
#include "catch_capture_matchers.h"
#include "catch_run_context.h"
#include "catch_enforce.h"

namespace Catch {

Expand Down
17 changes: 15 additions & 2 deletions worker/deps/catch/include/internal/catch_compiler_capabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#endif

#if defined(CATCH_CPP17_OR_GREATER)
#if defined(__cpp_lib_uncaught_exceptions)
# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS
#endif

Expand All @@ -58,7 +58,20 @@
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" )
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" )

# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__)
// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug
// which results in calls to destructors being emitted for each temporary,
// without a matching initialization. In practice, this can result in something
// like `std::string::~string` being called on an uninitialized value.
//
// For example, this code will likely segfault under IBM XL:
// ```
// REQUIRE(std::string("12") + "34" == "1234")
// ```
//
// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
# if !defined(__ibmxl__)
# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg) */
# endif


# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
Expand Down
3 changes: 1 addition & 2 deletions worker/deps/catch/include/internal/catch_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)

# include <assert.h>
# include <stdbool.h>
# include <cassert>
# include <sys/types.h>
# include <unistd.h>
# include <cstddef>
Expand Down
12 changes: 12 additions & 0 deletions worker/deps/catch/include/internal/catch_decomposer.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,18 @@ namespace Catch {
auto operator <= ( RhsT const& rhs ) -> BinaryExpr<LhsT, RhsT const&> const {
return { static_cast<bool>(m_lhs <= rhs), m_lhs, "<=", rhs };
}
template <typename RhsT>
auto operator | (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
return { static_cast<bool>(m_lhs | rhs), m_lhs, "|", rhs };
}
template <typename RhsT>
auto operator & (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
return { static_cast<bool>(m_lhs & rhs), m_lhs, "&", rhs };
}
template <typename RhsT>
auto operator ^ (RhsT const& rhs) -> BinaryExpr<LhsT, RhsT const&> const {
return { static_cast<bool>(m_lhs ^ rhs), m_lhs, "^", rhs };
}

template<typename RhsT>
auto operator && ( RhsT const& ) -> BinaryExpr<LhsT, RhsT const&> const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ namespace Catch {
{}

std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {
#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
return "";
#else
try {
if( it == itEnd )
std::rethrow_exception(std::current_exception());
Expand All @@ -55,6 +58,7 @@ namespace Catch {
catch( T& ex ) {
return m_translateFunction( ex );
}
#endif
}

protected:
Expand Down
Loading

0 comments on commit 2025e88

Please sign in to comment.