mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
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.
This commit is contained in:
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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") {
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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]") {
|
||||
|
@@ -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"
|
||||
|
@@ -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)
|
||||
|
@@ -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]") {
|
||||
|
@@ -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>
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_stringref.h>
|
||||
#include <catch2/catch_stringref.hpp>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
@@ -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";
|
||||
|
@@ -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" ) {
|
||||
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_xmlwriter.h>
|
||||
#include <catch2/internal/catch_xmlwriter.hpp>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
@@ -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>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_approx.h>
|
||||
#include <catch2/catch_approx.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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 {
|
||||
|
@@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user