Start using piecemeal includes in test files

This commit is contained in:
Martin Hořeňovský
2020-01-20 23:24:04 +01:00
parent c381b49c60
commit 26f78f96aa
40 changed files with 88 additions and 98 deletions

View File

@@ -1,12 +1,11 @@
/*
* Created by Phil on 13/5/2013.
* Copyright 2014 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_approx.h>
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_matchers_string.h>
#include <catch2/catch_test_spec_parser.h>
#include <catch2/catch_test_case_info.h>
#include <catch2/catch_config.hpp>

View File

@@ -3,7 +3,8 @@
* 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_enforce.h>
#if defined(_MSC_VER)
#pragma warning(push)

View File

@@ -1,4 +1,7 @@
#include <catch2/catch.hpp>
#include <catch2/catch_approx.h>
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_generators_generic.hpp>
#include <catch2/catch_generators_specific.hpp>
// Tests of generator implementation details
TEST_CASE("Generators internals", "[generators][internals]") {
@@ -175,6 +178,7 @@ TEST_CASE("Generators internals", "[generators][internals]") {
}
SECTION("Floating Point") {
using Catch::Detail::Approx;
SECTION("Exact") {
const auto rangeStart = -1.;
const auto rangeEnd = 1.;

View File

@@ -391,7 +391,7 @@ TEST_CASE("measure", "[benchmark]") {
TEST_CASE("run benchmark", "[benchmark]") {
counting_clock::set_rate(1000);
auto start = counting_clock::now();
Catch::Benchmark::Benchmark bench{ "Test Benchmark", [](Catch::Benchmark::Chronometer meter) {
counting_clock::set_rate(100000);
meter.measure([] { return counting_clock::now(); });

View File

@@ -1,14 +1,12 @@
/*
* Created by Phil on 1/10/2015.
* Copyright 2015 Two Blue Cubes Ltd
*
* 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_test_macros.hpp>
#include <catch2/catch_suppress_warnings.h>
#include <catch2/catch_test_case_tracker.h>
#include <catch2/catch.hpp>
using namespace Catch;

View File

@@ -1,12 +1,9 @@
/*
* Created by Martin on 06/10/2019.
*
* 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_random_number_generator.h>
TEST_CASE("Our PCG implementation provides expected results for known seeds", "[rng]") {

View File

@@ -1,7 +1,6 @@
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_stringref.h>
#include <catch2/catch.hpp>
#include <cstring>
TEST_CASE( "StringRef", "[Strings][StringRef]" ) {

View File

@@ -1,7 +1,7 @@
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_matchers_vector.h>
#include <catch2/catch_string_manip.h>
#include <catch2/catch.hpp>
static const char * const no_whitespace = "There is no extra whitespace here";
static const char * const leading_whitespace = " \r \t\n There is no extra whitespace here";
static const char * const trailing_whitespace = "There is no extra whitespace here \t \n \r ";

View File

@@ -1,13 +1,13 @@
/*
* Created by Phil on 27/06/2014.
* Copyright 2014 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_matchers_string.h>
#include <catch2/catch_matchers_vector.h>
#include <catch2/catch_tag_alias_registry.h>
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_test_case_info.h>
TEST_CASE( "Tag alias can be registered against tag patterns" ) {

View File

@@ -1,6 +1,6 @@
#include <catch2/catch.hpp>
#include <catch2/catch_enum_values_registry.h>
#include <catch2/catch_matchers_vector.h>
#include <catch2/catch_test_macros.hpp>
enum class EnumClass3 { Value1, Value2, Value3, Value4 };

View File

@@ -1,4 +1,4 @@
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_xmlwriter.h>
#include <sstream>