Compare commits

..

6 Commits

Author SHA1 Message Date
Martin Hořeňovský
6860c8def0 v1.12.2 2018-05-14 15:15:28 +02:00
Martin Hořeňovský
3255ee6312 Add missing <cassert> includes
Until recently we were probably getting it from some transitive
include, but it broke. Because all files should include what
they use anyway, adding `#include <cassert>` to all files that
use `assert()` without including it is the best solution.

Fixes #1249
2018-04-22 20:36:41 +02:00
Martin Hořeňovský
74effafca7 v1.12.1 2018-03-02 21:22:10 +01:00
Martin Hořeňovský
7d0cfd27ce Fix deprecation warning in ~ScopedMessage 2018-02-25 21:29:01 +01:00
Martin Hořeňovský
3fe4d394a5 Wrap all uses in min and max in extra parentheses
This prevents `min` and `max` macros from windows headers (!@#$)
from breaking compilation.

Related to #1191
2018-02-23 13:06:52 +01:00
Martin Hořeňovský
b97e9a2f8b Update path for catch-classic vcpkg's portfile 2018-01-12 11:06:09 +01:00
13 changed files with 51 additions and 16 deletions

View File

@@ -3,9 +3,9 @@
[![Github Releases](https://img.shields.io/github/release/philsquared/catch.svg)](https://github.com/philsquared/catch/releases)
[![Build Status](https://travis-ci.org/philsquared/Catch.svg?branch=master)](https://travis-ci.org/philsquared/Catch)
[![Build status](https://ci.appveyor.com/api/projects/status/hrtk60hv6tw6fght/branch/master?svg=true)](https://ci.appveyor.com/project/philsquared/catch/branch/master)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/hgiYhcvH835lHvaA)
[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/jG7wnHX9VAcxpSHy)
<a href="https://github.com/philsquared/Catch/releases/download/v1.12.0/catch.hpp">The latest, single header, version can be downloaded directly using this link</a>
<a href="https://github.com/philsquared/Catch/releases/download/v1.12.2/catch.hpp">The latest, single header, version can be downloaded directly using this link</a>
## What's the Catch?

View File

@@ -4,7 +4,7 @@ from conans import ConanFile
class CatchConan(ConanFile):
name = "Catch"
version = "1.12.0"
version = "1.12.2"
description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD"
author = "philsquared"
generators = "cmake"

View File

@@ -1,3 +1,16 @@
# 1.12.2
### Fixes
* Fixed missing <cassert> include
# 1.12.1
### Fixes
* Fixed deprecation warning in `ScopedMessage::~ScopedMessage`
* All uses of `min` or `max` identifiers are now wrapped in parentheses
* This avoids problems when Windows headers define `min` and `max` macros
# 1.12.0
### Fixes

View File

@@ -37,11 +37,18 @@ namespace Catch {
: m_info( other.m_info )
{}
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
#endif
ScopedMessage::~ScopedMessage() {
if ( !std::uncaught_exception() ){
getResultCapture().popScopedMessage(m_info);
}
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
} // end namespace Catch

View File

@@ -16,6 +16,8 @@
#include "catch_interfaces_registry_hub.h"
#include "catch_wildcard_pattern.hpp"
#include <cassert>
namespace Catch {
ResultBuilder::ResultBuilder( char const* macroName,

View File

@@ -22,7 +22,7 @@
#include "catch_result_builder.h"
#include "catch_fatal_condition.hpp"
#include <cassert>
#include <set>
#include <string>

View File

@@ -27,9 +27,9 @@ namespace Catch {
result_type operator()( result_type n ) const { return std::rand() % n; }
#ifdef CATCH_CONFIG_CPP11_SHUFFLE
static constexpr result_type min() { return 0; }
static constexpr result_type max() { return 1000000; }
result_type operator()() const { return std::rand() % max(); }
static constexpr result_type (min)() { return 0; }
static constexpr result_type (max)() { return 1000000; }
result_type operator()() const { return std::rand() % (max)(); }
#endif
template<typename V>
static void shuffle( V& vector ) {

View File

@@ -38,7 +38,7 @@ namespace Catch {
}
inline Version libraryVersion() {
static Version version( 1, 12, 0, "", 0 );
static Version version( 1, 12, 2, "", 0 );
return version;
}

View File

@@ -13,6 +13,7 @@
#include "../internal/catch_reporter_registrars.hpp"
#include "../internal/catch_console_colour.hpp"
#include <cassert>
#include <cfloat>
#include <cstdio>

View File

@@ -14,6 +14,7 @@
// file can be distributed as a single header that works with the main
// Catch single header.
#include <cassert>
#include <cstring>
#ifdef __clang__

View File

@@ -8,7 +8,7 @@ from releaseCommon import Version
print(catchPath)
default_path = '../vcpkg/ports/catch/'
default_path = '../vcpkg/ports/catch-classic/'
def adjusted_path(path):
return os.path.join(catchPath, path)

View File

@@ -1,6 +1,6 @@
/*
* Catch v1.12.0
* Generated: 2018-01-11 21:56:34.893972
* Catch v1.12.2
* Generated: 2018-05-14 15:10:01.112442
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -6599,6 +6599,7 @@ namespace Catch {
#endif // not Windows
#include <cassert>
#include <set>
#include <string>
@@ -7292,9 +7293,9 @@ namespace Catch {
result_type operator()( result_type n ) const { return std::rand() % n; }
#ifdef CATCH_CONFIG_CPP11_SHUFFLE
static constexpr result_type min() { return 0; }
static constexpr result_type max() { return 1000000; }
result_type operator()() const { return std::rand() % max(); }
static constexpr result_type (min)() { return 0; }
static constexpr result_type (max)() { return 1000000; }
result_type operator()() const { return std::rand() % (max)(); }
#endif
template<typename V>
static void shuffle( V& vector ) {
@@ -8466,7 +8467,7 @@ namespace Catch {
}
inline Version libraryVersion() {
static Version version( 1, 12, 0, "", 0 );
static Version version( 1, 12, 2, "", 0 );
return version;
}
@@ -8501,11 +8502,18 @@ namespace Catch {
: m_info( other.m_info )
{}
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
#endif
ScopedMessage::~ScopedMessage() {
if ( !std::uncaught_exception() ){
getResultCapture().popScopedMessage(m_info);
}
}
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
} // end namespace Catch
@@ -9164,6 +9172,8 @@ std::string toString( std::nullptr_t ) {
// #included from: catch_result_builder.hpp
#define TWOBLUECUBES_CATCH_RESULT_BUILDER_HPP_INCLUDED
#include <cassert>
namespace Catch {
ResultBuilder::ResultBuilder( char const* macroName,
@@ -10657,6 +10667,7 @@ namespace Catch {
// #included from: ../reporters/catch_reporter_console.hpp
#define TWOBLUECUBES_CATCH_REPORTER_CONSOLE_HPP_INCLUDED
#include <cassert>
#include <cfloat>
#include <cstdio>

View File

@@ -10,7 +10,7 @@ class CatchConanTest(ConanFile):
settings = "os", "compiler", "arch", "build_type"
username = getenv("CONAN_USERNAME", "philsquared")
channel = getenv("CONAN_CHANNEL", "testing")
requires = "Catch/1.12.0@%s/%s" % (username, channel)
requires = "Catch/1.12.2@%s/%s" % (username, channel)
def build(self):
cmake = CMake(self)