mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 05:15:39 +02:00
Start using piecemeal includes in test files
This commit is contained in:
@@ -6,10 +6,13 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_approx.h>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
using Catch::Detail::Approx;
|
||||
|
||||
namespace { namespace ApproxTests {
|
||||
|
||||
#ifndef APPROX_TEST_HELPERS_INCLUDED // Don't compile this more than once per TU
|
||||
|
@@ -1,12 +1,9 @@
|
||||
/*
|
||||
* Created by Phil on 29/11/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
namespace { namespace BDDTests {
|
||||
|
||||
|
@@ -1,12 +1,9 @@
|
||||
/*
|
||||
* Created by Phil on 09/11/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace{ namespace ClassTests {
|
||||
|
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Created by Martin on 17/02/2017.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -30,7 +28,8 @@ std::ostream& operator<<(std::ostream& out, foo::helper_1403 const&) {
|
||||
}
|
||||
///////////////////////////////
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_matchers_string.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -218,7 +217,7 @@ namespace { namespace CompilationTests {
|
||||
REQUIRE( y.v == 0 );
|
||||
REQUIRE( 0 == y.v );
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("#1319: Sections can have description (even if it is not saved", "[compilation]") {
|
||||
SECTION("SectionName", "This is a long form section description") {
|
||||
SUCCEED();
|
||||
|
@@ -1,7 +1,4 @@
|
||||
/*
|
||||
* Created by Phil on 08/11/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -11,10 +8,13 @@
|
||||
// Wdouble-promotion is not supported until 3.8
|
||||
# if (__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ > 7)
|
||||
# pragma clang diagnostic ignored "-Wdouble-promotion"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_approx.h>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
using Catch::Detail::Approx;
|
||||
|
||||
#include <string>
|
||||
#include <limits>
|
||||
|
@@ -1,7 +1,4 @@
|
||||
/*
|
||||
* Created by Martin on 27/5/2017.
|
||||
* Copyright 2017 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -26,7 +23,7 @@ std::ostream& operator<<(std::ostream& o, truthy) {
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
TEST_CASE( "Reconstruction should be based on stringification: #914" , "[Decomposition][failing][.]") {
|
||||
CHECK(truthy(false));
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_enum_values_registry.h>
|
||||
|
||||
|
||||
namespace {
|
||||
|
@@ -1,12 +1,10 @@
|
||||
/*
|
||||
* Created by Phil on 09/11/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_matchers_string.h>
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_generators_generic.hpp>
|
||||
#include <catch2/catch_generators_specific.hpp>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
@@ -1,15 +1,18 @@
|
||||
/*
|
||||
* Created by Phil on 21/02/2017.
|
||||
* Copyright 2017 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_matchers_exception.hpp>
|
||||
#include <catch2/catch_matchers_floating.h>
|
||||
#include <catch2/catch_matchers_generic.hpp>
|
||||
#include <catch2/catch_matchers_string.h>
|
||||
#include <catch2/catch_matchers_vector.h>
|
||||
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
|
@@ -1,12 +1,9 @@
|
||||
/*
|
||||
* Created by Phil on 09/11/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <iostream>
|
||||
|
||||
TEST_CASE( "INFO and WARN do not abort tests", "[messages][.]" ) {
|
||||
|
@@ -1,12 +1,9 @@
|
||||
/*
|
||||
* Created by Phil on 29/11/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#if defined(CATCH_CONFIG_CPP17_BYTE)
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
|
@@ -1,12 +1,10 @@
|
||||
/*
|
||||
* Created by Martin on 17/02/2017.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#if defined(CATCH_CONFIG_CPP17_OPTIONAL)
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
TEST_CASE( "std::pair<int,std::string> -> toString", "[toString][pair]" ) {
|
||||
std::pair<int,std::string> value( 34, "xyzzy" );
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include <tuple>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#if defined(CATCH_CONFIG_CPP17_VARIANT)
|
||||
|
||||
|
@@ -13,7 +13,7 @@ std::string fallbackStringifier(T const&) {
|
||||
}
|
||||
|
||||
#define CATCH_CONFIG_FALLBACK_STRINGIFIER fallbackStringifier
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
/*
|
||||
* Created by Phil on 09/11/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -15,7 +12,7 @@
|
||||
// that is triggered when compiling as Win32|Release
|
||||
#endif
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sstream>
|
||||
|
@@ -1,12 +1,9 @@
|
||||
/*
|
||||
* Created by Phil on 15/03/2013.
|
||||
* Copyright 2013 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
|
||||
TEST_CASE()
|
||||
|
Reference in New Issue
Block a user