mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
Rewrite includes in tests to use library's include paths
This commit is contained in:
parent
82cc5bc034
commit
90e2549cec
@ -88,8 +88,6 @@ include(CTest)
|
||||
|
||||
add_executable(SelfTest ${TEST_SOURCES})
|
||||
target_link_libraries(SelfTest PRIVATE Catch2)
|
||||
# Fixme!
|
||||
target_include_directories(SelfTest PRIVATE ${SOURCES_DIR})
|
||||
|
||||
# It took CMake until 3.8 to abandon the doomed approach of enumerating
|
||||
# required features so we just list bunch of C++11 and C++14 features.
|
||||
|
@ -6,11 +6,11 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include "catch_test_spec_parser.h"
|
||||
#include "catch_test_case_info.h"
|
||||
#include "catch_config.hpp"
|
||||
#include "catch_commandline.h"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_test_spec_parser.h>
|
||||
#include <catch2/catch_test_case_info.h>
|
||||
#include <catch2/catch_config.hpp>
|
||||
#include <catch2/catch_commandline.h>
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
|
@ -3,7 +3,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
// Tests of generator implementation details
|
||||
TEST_CASE("Generators internals", "[generators][internals]") {
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
||||
namespace {
|
||||
struct manual_clock {
|
||||
|
@ -5,10 +5,10 @@
|
||||
* 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 "catch_suppress_warnings.h"
|
||||
#include "catch_test_case_tracker.h"
|
||||
#include <catch2/catch_suppress_warnings.h>
|
||||
#include <catch2/catch_test_case_tracker.h>
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
using namespace Catch;
|
||||
|
||||
|
@ -5,9 +5,9 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "catch_random_number_generator.h"
|
||||
#include <catch2/catch_random_number_generator.h>
|
||||
|
||||
TEST_CASE("Our PCG implementation provides expected results for known seeds", "[rng]") {
|
||||
Catch::SimplePcg32 rng;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "catch_stringref.h"
|
||||
#include <catch2/catch_stringref.h>
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "catch_string_manip.h"
|
||||
#include <catch2/catch_string_manip.h>
|
||||
|
||||
#include "catch.hpp"
|
||||
#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";
|
||||
|
@ -6,8 +6,8 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include "catch_tag_alias_registry.h"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_tag_alias_registry.h>
|
||||
|
||||
TEST_CASE( "Tag alias can be registered against tag patterns" ) {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "catch_enum_values_registry.h"
|
||||
#include <catch2/catch_enum_values_registry.h>
|
||||
|
||||
enum class EnumClass3 { Value1, Value2, Value3, Value4 };
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "catch.hpp"
|
||||
#include "catch_xmlwriter.h"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <catch2/catch_xmlwriter.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
// This file is only here to verify (to the extent possible) the self sufficiency of the header
|
||||
#include "catch_suppress_warnings.h"
|
||||
#include "catch_console_colour.h"
|
||||
#include <catch2/catch_suppress_warnings.h>
|
||||
#include <catch2/catch_console_colour.h>
|
||||
|
@ -1,2 +1,2 @@
|
||||
// This file is only here to verify (to the extent possible) the self sufficiency of the header
|
||||
#include "catch_debugger.h"
|
||||
#include <catch2/catch_debugger.h>
|
||||
|
@ -1,2 +1,2 @@
|
||||
#include "catch_suppress_warnings.h"
|
||||
#include "catch_interfaces_reporter.h"
|
||||
#include <catch2/catch_suppress_warnings.h>
|
||||
#include <catch2/catch_interfaces_reporter.h>
|
||||
|
@ -1,3 +1,3 @@
|
||||
// This file is only here to verify (to the extent possible) the self sufficiency of the header
|
||||
#include "catch_suppress_warnings.h"
|
||||
#include "catch_option.hpp"
|
||||
#include <catch2/catch_suppress_warnings.h>
|
||||
#include <catch2/catch_option.hpp>
|
||||
|
@ -1,3 +1,3 @@
|
||||
// This file is only here to verify (to the extent possible) the self sufficiency of the header
|
||||
#include "catch_suppress_warnings.h"
|
||||
#include "catch_stream.h"
|
||||
#include <catch2/catch_suppress_warnings.h>
|
||||
#include <catch2/catch_stream.h>
|
||||
|
@ -1,2 +1,2 @@
|
||||
// This file is only here to verify (to the extent possible) the self sufficiency of the header
|
||||
#include "catch_test_case_tracker.h"
|
||||
#include <catch2/catch_test_case_tracker.h>
|
||||
|
@ -1,3 +1,3 @@
|
||||
// This file is only here to verify (to the extent possible) the self sufficiency of the header
|
||||
#include "catch_suppress_warnings.h"
|
||||
#include "catch_test_spec.h"
|
||||
#include <catch2/catch_suppress_warnings.h>
|
||||
#include <catch2/catch_test_spec.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// This file is only here to verify (to the extent possible) the self sufficiency of the header
|
||||
#include "catch_suppress_warnings.h"
|
||||
#include "catch_xmlwriter.h"
|
||||
#include "catch_reenable_warnings.h"
|
||||
#include <catch2/catch_suppress_warnings.h>
|
||||
#include <catch2/catch_xmlwriter.h>
|
||||
#include <catch2/catch_reenable_warnings.h>
|
||||
|
@ -7,13 +7,13 @@
|
||||
*/
|
||||
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
// These reporters are not included in the single include, so must be included separately in the main file
|
||||
#include "reporters/catch_reporter_teamcity.hpp"
|
||||
#include "reporters/catch_reporter_tap.hpp"
|
||||
#include "reporters/catch_reporter_automake.hpp"
|
||||
#include "reporters/catch_reporter_sonarqube.hpp"
|
||||
#include <catch2/reporters/catch_reporter_teamcity.hpp>
|
||||
#include <catch2/reporters/catch_reporter_tap.hpp>
|
||||
#include <catch2/reporters/catch_reporter_automake.hpp>
|
||||
#include <catch2/reporters/catch_reporter_sonarqube.hpp>
|
||||
|
||||
|
||||
// Some example tag aliases
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
namespace { namespace BDDTests {
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <map>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace{ namespace ClassTests {
|
||||
|
@ -30,7 +30,7 @@ std::ostream& operator<<(std::ostream& out, foo::helper_1403 const&) {
|
||||
}
|
||||
///////////////////////////////
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <limits>
|
||||
|
@ -26,7 +26,7 @@ std::ostream& operator<<(std::ostream& o, truthy) {
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
TEST_CASE( "Reconstruction should be based on stringification: #914" , "[Decomposition][failing][.]") {
|
||||
CHECK(truthy(false));
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <iostream>
|
||||
|
||||
TEST_CASE( "INFO and WARN do not abort tests", "[messages][.]" ) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#if defined(CATCH_CONFIG_CPP17_BYTE)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
|
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#if defined(CATCH_CONFIG_CPP17_OPTIONAL)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.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 "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <tuple>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#if defined(CATCH_CONFIG_CPP17_VARIANT)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
|
||||
|
@ -13,7 +13,7 @@ std::string fallbackStringifier(T const&) {
|
||||
}
|
||||
|
||||
#define CATCH_CONFIG_FALLBACK_STRINGIFIER fallbackStringifier
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
// that is triggered when compiling as Win32|Release
|
||||
#endif
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sstream>
|
||||
|
@ -6,7 +6,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
|
||||
TEST_CASE()
|
||||
|
Loading…
Reference in New Issue
Block a user