diff options
| author | Martin Hořeňovský | 2020-03-30 10:34:21 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-04-24 18:58:44 +0200 |
| commit | e1e6872c4c0f79731894c9b763843af33d16bdab (patch) | |
| tree | 46761d72b6bf87088e152aa8f42d1b092f2c5c8b /tests | |
| parent | 3836aa9cebbd546fc3036836aac3b2e3f5fd9b74 (diff) | |
| download | catch3-e1e6872c4c0f79731894c9b763843af33d16bdab.tar.gz | |
Standardize header names and file locations
This is both a really big and a really small commit. It is small in
that it only contains renaming, moving and modification of include
directives caused by this.
It is really big in the obvious way of touching something like 200
files.
The new rules for naming files is simple: headers use the `.hpp`
extension. The rules for physical file layout is still kinda in
progress, but the basics are also simple:
* Significant parts of functionality get their own subfolder
* Benchmarking is in `catch2/benchmark`
* Matchers are in `catch2/matchers`
* Generators are in `catch2/generators`
* Reporters are in `catch2/reporters`
* Baseline testing facilities are in `catch2/`
* Various top level folders also contain `internal` subfolder,
with files that users probably do not want to include directly,
at least not until they have to write something like their own
reporter.
* The exact files in these subfolders is likely to change later
on
Note that while some includes were cleaned up in this commit, it
is only the low hanging fruit and further cleanup using automatic
tooling will happen later.
Also note that various include guards, copyright notices and file
headers will also be standardized later, rather than in this commit.
Diffstat (limited to 'tests')
24 files changed, 37 insertions, 35 deletions
diff --git a/tests/ExtraTests/X01-PrefixedMacros.cpp b/tests/ExtraTests/X01-PrefixedMacros.cpp index 05eff1ce..3fc23b09 100644 --- a/tests/ExtraTests/X01-PrefixedMacros.cpp +++ b/tests/ExtraTests/X01-PrefixedMacros.cpp @@ -1,7 +1,7 @@ // X11-DisableStringification.cpp // Test that Catch's prefixed macros compile and run properly. -#include <catch2/catch_default_main.hpp> +#include <catch2/internal/catch_default_main.hpp> // This won't provide full coverage, but it might be worth checking // the other branch as well #include <catch2/catch_test_macros.hpp> diff --git a/tests/ExtraTests/X02-DisabledMacros.cpp b/tests/ExtraTests/X02-DisabledMacros.cpp index 1c7385c7..10d5c697 100644 --- a/tests/ExtraTests/X02-DisabledMacros.cpp +++ b/tests/ExtraTests/X02-DisabledMacros.cpp @@ -2,7 +2,7 @@ // Test that CATCH_CONFIG_DISABLE turns off TEST_CASE autoregistration // and expressions in assertion macros are not run. -#include <catch2/catch_default_main.hpp> +#include <catch2/internal/catch_default_main.hpp> #include <catch2/catch_test_macros.hpp> #include <iostream> diff --git a/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp b/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp index fb72826e..5deb30f9 100644 --- a/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp +++ b/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp @@ -1,4 +1,4 @@ -#include <catch2/catch_default_main.hpp> +#include <catch2/internal/catch_default_main.hpp> #include <catch2/catch_test_macros.hpp> TEST_CASE("Tests that run") { diff --git a/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp b/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp index 82d6edfa..0870e9ca 100644 --- a/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp +++ b/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp @@ -1,4 +1,4 @@ -#include <catch2/catch_default_main.hpp> +#include <catch2/internal/catch_default_main.hpp> #include <catch2/catch_test_macros.hpp> namespace Catch { diff --git a/tests/ExtraTests/X10-FallbackStringifier.cpp b/tests/ExtraTests/X10-FallbackStringifier.cpp index a52f371f..900d23e7 100644 --- a/tests/ExtraTests/X10-FallbackStringifier.cpp +++ b/tests/ExtraTests/X10-FallbackStringifier.cpp @@ -9,7 +9,7 @@ std::string fallbackStringifier(T const&) { return "{ !!! }"; } -#include <catch2/catch_default_main.hpp> +#include <catch2/internal/catch_default_main.hpp> #include <catch2/catch_test_macros.hpp> struct foo { diff --git a/tests/ExtraTests/X11-DisableStringification.cpp b/tests/ExtraTests/X11-DisableStringification.cpp index 0d84771d..5cd32f12 100644 --- a/tests/ExtraTests/X11-DisableStringification.cpp +++ b/tests/ExtraTests/X11-DisableStringification.cpp @@ -4,7 +4,7 @@ // and preprocessor token pasting. In other words, hopefully this test // will be deleted soon :-) -#include <catch2/catch_default_main.hpp> +#include <catch2/internal/catch_default_main.hpp> #include <catch2/catch_test_macros.hpp> namespace { diff --git a/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp b/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp index 375b66db..454b0a8d 100644 --- a/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp +++ b/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp @@ -4,7 +4,7 @@ // wrong. #include <windows.h> -#include <catch2/catch_default_main.hpp> +#include <catch2/internal/catch_default_main.hpp> #include <catch2/catch_test_macros.hpp> TEST_CASE("Catch2 did survive compilation with windows.h", "[compile-test]") { diff --git a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index f8d6bd3b..48a297b2 100644 --- a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -3,14 +3,14 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ -#include <catch2/catch_approx.h> +#include <catch2/catch_approx.hpp> #include <catch2/catch_test_macros.hpp> #include <catch2/matchers/catch_matchers_string.hpp> -#include <catch2/catch_test_spec_parser.h> -#include <catch2/catch_test_case_info.h> +#include <catch2/internal/catch_test_spec_parser.hpp> +#include <catch2/catch_test_case_info.hpp> #include <catch2/catch_config.hpp> -#include <catch2/catch_commandline.h> -#include <catch2/catch_generators.hpp> +#include <catch2/internal/catch_commandline.hpp> +#include <catch2/generators/catch_generators.hpp> #ifdef __clang__ # pragma clang diagnostic ignored "-Wc++98-compat" diff --git a/tests/SelfTest/IntrospectiveTests/Details.tests.cpp b/tests/SelfTest/IntrospectiveTests/Details.tests.cpp index 5a24663c..bddb0d5b 100644 --- a/tests/SelfTest/IntrospectiveTests/Details.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Details.tests.cpp @@ -4,7 +4,7 @@ */ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_enforce.h> +#include <catch2/internal/catch_enforce.hpp> #if defined(_MSC_VER) #pragma warning(push) diff --git a/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp b/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp index 459485bc..81fb4ebc 100644 --- a/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp @@ -1,8 +1,9 @@ -#include <catch2/catch_approx.h> +#include <catch2/catch_approx.hpp> #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_generator_exception.hpp> -#include <catch2/catch_generators_generic.hpp> -#include <catch2/catch_generators_specific.hpp> +#include <catch2/generators/catch_generator_exception.hpp> +#include <catch2/generators/catch_generators_adapters.hpp> +#include <catch2/generators/catch_generators_random.hpp> +#include <catch2/generators/catch_generators_range.hpp> // Tests of generator implementation details TEST_CASE("Generators internals", "[generators][internals]") { diff --git a/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp b/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp index f9a0a424..50c17169 100644 --- a/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp @@ -7,7 +7,7 @@ */ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_approx.h> +#include <catch2/catch_approx.hpp> #include <catch2/catch_config.hpp> #include <catch2/benchmark/catch_benchmark.hpp> #include <catch2/benchmark/catch_chronometer.hpp> diff --git a/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp b/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp index b6b4060a..fd40abfa 100644 --- a/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp @@ -4,7 +4,7 @@ */ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_test_case_tracker.h> +#include <catch2/internal/catch_test_case_tracker.hpp> using namespace Catch; diff --git a/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp b/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp index f1ff847a..3d388c66 100644 --- a/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp @@ -4,7 +4,7 @@ */ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_random_number_generator.h> +#include <catch2/internal/catch_random_number_generator.hpp> TEST_CASE("Our PCG implementation provides expected results for known seeds", "[rng]") { Catch::SimplePcg32 rng; diff --git a/tests/SelfTest/IntrospectiveTests/String.tests.cpp b/tests/SelfTest/IntrospectiveTests/String.tests.cpp index 5255804f..ae1cc817 100644 --- a/tests/SelfTest/IntrospectiveTests/String.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/String.tests.cpp @@ -1,5 +1,5 @@ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_stringref.h> +#include <catch2/catch_stringref.hpp> #include <cstring> diff --git a/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp b/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp index 327c8811..d78567ca 100644 --- a/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp @@ -1,6 +1,6 @@ #include <catch2/catch_test_macros.hpp> #include <catch2/matchers/catch_matchers_vector.hpp> -#include <catch2/catch_string_manip.h> +#include <catch2/internal/catch_string_manip.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"; diff --git a/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp b/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp index 7765c2fa..15d37c98 100644 --- a/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp @@ -5,9 +5,9 @@ #include <catch2/matchers/catch_matchers_string.hpp> #include <catch2/matchers/catch_matchers_vector.hpp> -#include <catch2/catch_tag_alias_registry.h> +#include <catch2/internal/catch_tag_alias_registry.hpp> #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_test_case_info.h> +#include <catch2/catch_test_case_info.hpp> TEST_CASE( "Tag alias can be registered against tag patterns" ) { diff --git a/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp b/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp index d82b5402..966bebed 100644 --- a/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp @@ -1,4 +1,4 @@ -#include <catch2/catch_enum_values_registry.h> +#include <catch2/internal/catch_enum_values_registry.hpp> #include <catch2/matchers/catch_matchers_vector.hpp> #include <catch2/catch_test_macros.hpp> diff --git a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp index b764e3b5..519c3d40 100644 --- a/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp @@ -1,5 +1,5 @@ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_xmlwriter.h> +#include <catch2/internal/catch_xmlwriter.hpp> #include <sstream> diff --git a/tests/SelfTest/TestMain.cpp b/tests/SelfTest/TestMain.cpp index c7cc5fd0..88025d3a 100644 --- a/tests/SelfTest/TestMain.cpp +++ b/tests/SelfTest/TestMain.cpp @@ -3,7 +3,7 @@ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ -#include <catch2/catch_tag_alias_autoregistrar.h> +#include <catch2/catch_tag_alias_autoregistrar.hpp> // Some example tag aliases CATCH_REGISTER_TAG_ALIAS( "[@nhf]", "[failing]~[.]" ) @@ -25,4 +25,4 @@ struct TestListener : Catch::TestEventListenerBase { CATCH_REGISTER_LISTENER( TestListener ) -#include <catch2/catch_default_main.hpp> +#include <catch2/internal/catch_default_main.hpp> diff --git a/tests/SelfTest/UsageTests/Approx.tests.cpp b/tests/SelfTest/UsageTests/Approx.tests.cpp index 9a1f0474..f0d8919c 100644 --- a/tests/SelfTest/UsageTests/Approx.tests.cpp +++ b/tests/SelfTest/UsageTests/Approx.tests.cpp @@ -7,7 +7,7 @@ */ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_approx.h> +#include <catch2/catch_approx.hpp> #include <cmath> diff --git a/tests/SelfTest/UsageTests/Benchmark.tests.cpp b/tests/SelfTest/UsageTests/Benchmark.tests.cpp index 38ad6a9f..b2d41cf2 100644 --- a/tests/SelfTest/UsageTests/Benchmark.tests.cpp +++ b/tests/SelfTest/UsageTests/Benchmark.tests.cpp @@ -1,7 +1,7 @@ #include <catch2/catch_test_macros.hpp> #include <catch2/benchmark/catch_benchmark.hpp> #include <catch2/benchmark/catch_constructor.hpp> -#include <catch2/catch_generators_specific.hpp> +#include <catch2/generators/catch_generators_range.hpp> #include <map> diff --git a/tests/SelfTest/UsageTests/Condition.tests.cpp b/tests/SelfTest/UsageTests/Condition.tests.cpp index 28ca8dd6..7c6a1d73 100644 --- a/tests/SelfTest/UsageTests/Condition.tests.cpp +++ b/tests/SelfTest/UsageTests/Condition.tests.cpp @@ -11,7 +11,7 @@ # endif #endif -#include <catch2/catch_approx.h> +#include <catch2/catch_approx.hpp> #include <catch2/catch_test_macros.hpp> using Catch::Approx; diff --git a/tests/SelfTest/UsageTests/EnumToString.tests.cpp b/tests/SelfTest/UsageTests/EnumToString.tests.cpp index 171e795f..2a6731cb 100644 --- a/tests/SelfTest/UsageTests/EnumToString.tests.cpp +++ b/tests/SelfTest/UsageTests/EnumToString.tests.cpp @@ -1,5 +1,5 @@ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_enum_values_registry.h> +#include <catch2/internal/catch_enum_values_registry.hpp> namespace { diff --git a/tests/SelfTest/UsageTests/Generators.tests.cpp b/tests/SelfTest/UsageTests/Generators.tests.cpp index 0b4511c6..45088111 100644 --- a/tests/SelfTest/UsageTests/Generators.tests.cpp +++ b/tests/SelfTest/UsageTests/Generators.tests.cpp @@ -1,7 +1,8 @@ #include <catch2/catch_test_macros.hpp> -#include <catch2/catch_generator_exception.hpp> -#include <catch2/catch_generators_generic.hpp> -#include <catch2/catch_generators_specific.hpp> +#include <catch2/generators/catch_generator_exception.hpp> +#include <catch2/generators/catch_generators_adapters.hpp> +#include <catch2/generators/catch_generators_random.hpp> +#include <catch2/generators/catch_generators_range.hpp> #include <cstring> |