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:
@@ -4,7 +4,7 @@
|
||||
// of a testing binary, and other test files to link against it.
|
||||
|
||||
// Let Catch provide main():
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
#include <catch2/internal/catch_default_main.hpp>
|
||||
|
||||
// That's it
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// 010-TestCase.cpp
|
||||
|
||||
// Let Catch provide main():
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
#include <catch2/internal/catch_default_main.hpp>
|
||||
|
||||
// And write tests in the same file:
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// source code of Catch itself and reuse the resulting object file for linking.
|
||||
|
||||
// Let Catch provide main():
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
#include <catch2/internal/catch_default_main.hpp>
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// there is no important difference between having `std::cerr` buffered
|
||||
// or unbuffered.
|
||||
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
#include <catch2/internal/catch_default_main.hpp>
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
|
@@ -5,8 +5,8 @@
|
||||
// It will have infinite capacity and settable lower/upper bound
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_generators.hpp>
|
||||
#include <catch2/catch_generators_generic.hpp>
|
||||
#include <catch2/generators/catch_generators.hpp>
|
||||
#include <catch2/generators/catch_generators_adapters.hpp>
|
||||
|
||||
#include <random>
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_generators_generic.hpp>
|
||||
#include <catch2/generators/catch_generators_adapters.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
@@ -7,8 +7,8 @@
|
||||
// by value directly, or copied by the generators during construction.
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_generators_generic.hpp>
|
||||
#include <catch2/catch_generators_specific.hpp>
|
||||
#include <catch2/generators/catch_generators_adapters.hpp>
|
||||
#include <catch2/generators/catch_generators_random.hpp>
|
||||
|
||||
TEST_CASE("Generate random doubles across different ranges",
|
||||
"[generator][example][advanced]") {
|
||||
|
@@ -10,8 +10,8 @@
|
||||
// that.
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_generators_generic.hpp>
|
||||
#include <catch2/catch_generators_specific.hpp>
|
||||
#include <catch2/generators/catch_generators_adapters.hpp>
|
||||
#include <catch2/generators/catch_generators_random.hpp>
|
||||
|
||||
TEST_CASE("Generate random doubles across different ranges",
|
||||
"[generator][example][advanced]") {
|
||||
|
Reference in New Issue
Block a user