diff options
| author | Leitwolf | 2026-10-25 10:31:36 +0300 |
|---|---|---|
| committer | GitHub | 2026-10-25 10:31:36 +0300 |
| commit | d2e3e074bb2e1b8ffd9fc990d0b87667ea602f58 (patch) | |
| tree | 0bce4462b2e190c39b3e1c5f697e3e4abd1a5e2a /examples | |
| parent | 13f81a480a93807c14dddb5abdb97355ced4d4c5 (diff) | |
| parent | 126dc333564cb72b5115d9a9242d66694694b6d0 (diff) | |
| download | catch3-d2e3e074bb2e1b8ffd9fc990d0b87667ea602f58.tar.gz | |
Merge pull request #18 from Progmasoft/build/catch3-identity
Give Catch3 its own build names and headers
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/010-TestCase.cpp | 2 | ||||
| -rw-r--r-- | examples/020-TestCase-1.cpp | 2 | ||||
| -rw-r--r-- | examples/020-TestCase-2.cpp | 2 | ||||
| -rw-r--r-- | examples/030-Asn-Require-Check.cpp | 2 | ||||
| -rw-r--r-- | examples/100-Fix-Section.cpp | 2 | ||||
| -rw-r--r-- | examples/110-Fix-ClassFixture.cpp | 2 | ||||
| -rw-r--r-- | examples/111-Fix-PersistentFixture.cpp | 2 | ||||
| -rw-r--r-- | examples/120-Bdd-ScenarioGivenWhenThen.cpp | 2 | ||||
| -rw-r--r-- | examples/210-Evt-EventListeners.cpp | 8 | ||||
| -rw-r--r-- | examples/231-Cfg-OutputStreams.cpp | 2 | ||||
| -rw-r--r-- | examples/232-Cfg-CustomMain.cpp | 2 | ||||
| -rw-r--r-- | examples/300-Gen-OwnGenerator.cpp | 6 | ||||
| -rw-r--r-- | examples/301-Gen-MapTypeConversion.cpp | 4 | ||||
| -rw-r--r-- | examples/302-Gen-Table.cpp | 4 | ||||
| -rw-r--r-- | examples/310-Gen-VariablesInGenerators.cpp | 6 | ||||
| -rw-r--r-- | examples/311-Gen-CustomCapture.cpp | 6 | ||||
| -rw-r--r-- | examples/CMakeLists.txt | 6 |
17 files changed, 30 insertions, 30 deletions
diff --git a/examples/010-TestCase.cpp b/examples/010-TestCase.cpp index 9e5cd8cd..5eb982c8 100644 --- a/examples/010-TestCase.cpp +++ b/examples/010-TestCase.cpp @@ -8,7 +8,7 @@ // 010-TestCase.cpp // And write tests in the same file: -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> static int Factorial( int number ) { return number <= 1 ? number : Factorial( number - 1 ) * number; // fail diff --git a/examples/020-TestCase-1.cpp b/examples/020-TestCase-1.cpp index a9d87dbc..86de07a9 100644 --- a/examples/020-TestCase-1.cpp +++ b/examples/020-TestCase-1.cpp @@ -8,7 +8,7 @@ // 020-TestCase-1.cpp -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> TEST_CASE( "1: All test cases reside in other .cpp files (empty)", "[multi-file:1]" ) { } diff --git a/examples/020-TestCase-2.cpp b/examples/020-TestCase-2.cpp index 72dd0ffb..908db1c0 100644 --- a/examples/020-TestCase-2.cpp +++ b/examples/020-TestCase-2.cpp @@ -10,7 +10,7 @@ // main() provided by Catch in file 020-TestCase-1.cpp. -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> static int Factorial( int number ) { return number <= 1 ? number : Factorial( number - 1 ) * number; // fail diff --git a/examples/030-Asn-Require-Check.cpp b/examples/030-Asn-Require-Check.cpp index 62cd3cfc..ed6ad752 100644 --- a/examples/030-Asn-Require-Check.cpp +++ b/examples/030-Asn-Require-Check.cpp @@ -18,7 +18,7 @@ // main() provided by linkage to Catch2WithMain -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> static std::string one() { return "1"; diff --git a/examples/100-Fix-Section.cpp b/examples/100-Fix-Section.cpp index 7c8d8aa8..d1e4cdbc 100644 --- a/examples/100-Fix-Section.cpp +++ b/examples/100-Fix-Section.cpp @@ -14,7 +14,7 @@ // main() provided by linkage to Catch2WithMain -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> #include <vector> TEST_CASE( "vectors can be sized and resized", "[vector]" ) { diff --git a/examples/110-Fix-ClassFixture.cpp b/examples/110-Fix-ClassFixture.cpp index 614c3797..1b3f053f 100644 --- a/examples/110-Fix-ClassFixture.cpp +++ b/examples/110-Fix-ClassFixture.cpp @@ -14,7 +14,7 @@ // main() provided by linkage to Catch2WithMain -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> class DBConnection { diff --git a/examples/111-Fix-PersistentFixture.cpp b/examples/111-Fix-PersistentFixture.cpp index 2bef90ff..bed9d3e3 100644 --- a/examples/111-Fix-PersistentFixture.cpp +++ b/examples/111-Fix-PersistentFixture.cpp @@ -17,7 +17,7 @@ // main() provided by linkage to Catch2WithMain -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> #include <thread> diff --git a/examples/120-Bdd-ScenarioGivenWhenThen.cpp b/examples/120-Bdd-ScenarioGivenWhenThen.cpp index 345d53c3..b3edcd8c 100644 --- a/examples/120-Bdd-ScenarioGivenWhenThen.cpp +++ b/examples/120-Bdd-ScenarioGivenWhenThen.cpp @@ -10,7 +10,7 @@ // main() provided by linkage with Catch2WithMain -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> SCENARIO( "vectors can be sized and resized", "[vector]" ) { diff --git a/examples/210-Evt-EventListeners.cpp b/examples/210-Evt-EventListeners.cpp index f0a9f0af..48ccce20 100644 --- a/examples/210-Evt-EventListeners.cpp +++ b/examples/210-Evt-EventListeners.cpp @@ -13,10 +13,10 @@ // 2. My listener and registration // 3. Test cases -#include <catch2/catch_test_macros.hpp> -#include <catch2/reporters/catch_reporter_event_listener.hpp> -#include <catch2/reporters/catch_reporter_registrars.hpp> -#include <catch2/catch_test_case_info.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> +#include <Progmasoft/Catch3/Reporters/EventListener.hpp> +#include <Progmasoft/Catch3/Reporters/Registrars.hpp> +#include <Progmasoft/Catch3/TestCaseInfo.hpp> #include <iostream> // ----------------------------------------------------------------------- diff --git a/examples/231-Cfg-OutputStreams.cpp b/examples/231-Cfg-OutputStreams.cpp index 5aee38bc..e750333d 100644 --- a/examples/231-Cfg-OutputStreams.cpp +++ b/examples/231-Cfg-OutputStreams.cpp @@ -13,7 +13,7 @@ // semantic, because it buffers the output. For most uses however, // there is no important difference between having `std::cerr` buffered // or unbuffered. -#include <catch2/catch_test_macros.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> #include <sstream> #include <cstdio> diff --git a/examples/232-Cfg-CustomMain.cpp b/examples/232-Cfg-CustomMain.cpp index 6ef05fe7..0ba58250 100644 --- a/examples/232-Cfg-CustomMain.cpp +++ b/examples/232-Cfg-CustomMain.cpp @@ -14,7 +14,7 @@ // same `main`: what happens before `run` happens in every worker too, which // is where global set-up belongs. -#include <catch2/catch_session.hpp> +#include <Progmasoft/Catch3/Session.hpp> #include <cstdlib> #include <iostream> diff --git a/examples/300-Gen-OwnGenerator.cpp b/examples/300-Gen-OwnGenerator.cpp index ff28ad73..12859026 100644 --- a/examples/300-Gen-OwnGenerator.cpp +++ b/examples/300-Gen-OwnGenerator.cpp @@ -12,9 +12,9 @@ // Specifically we will implement a random number generator for integers // It will have infinite capacity and settable lower/upper bound -#include <catch2/catch_test_macros.hpp> -#include <catch2/generators/catch_generators.hpp> -#include <catch2/generators/catch_generators_adapters.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> +#include <Progmasoft/Catch3/Generators/Generators.hpp> +#include <Progmasoft/Catch3/Generators/Adapters.hpp> #include <random> diff --git a/examples/301-Gen-MapTypeConversion.cpp b/examples/301-Gen-MapTypeConversion.cpp index 26f7538c..99bb1f6b 100644 --- a/examples/301-Gen-MapTypeConversion.cpp +++ b/examples/301-Gen-MapTypeConversion.cpp @@ -13,8 +13,8 @@ // that converts the strings using stoi, so the returned type is actually // an int. -#include <catch2/catch_test_macros.hpp> -#include <catch2/generators/catch_generators_adapters.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> +#include <Progmasoft/Catch3/Generators/Adapters.hpp> #include <string> #include <sstream> diff --git a/examples/302-Gen-Table.cpp b/examples/302-Gen-Table.cpp index 3cdb1430..54afc802 100644 --- a/examples/302-Gen-Table.cpp +++ b/examples/302-Gen-Table.cpp @@ -10,8 +10,8 @@ // Shows how to use table to run a test many times with different inputs. Lifted from examples on // issue #850. -#include <catch2/catch_test_macros.hpp> -#include <catch2/generators/catch_generators.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> +#include <Progmasoft/Catch3/Generators/Generators.hpp> #include <string> struct TestSubject { diff --git a/examples/310-Gen-VariablesInGenerators.cpp b/examples/310-Gen-VariablesInGenerators.cpp index 5d24d45a..ab584520 100644 --- a/examples/310-Gen-VariablesInGenerators.cpp +++ b/examples/310-Gen-VariablesInGenerators.cpp @@ -14,9 +14,9 @@ // _WILL_ outlive the variables -- thus they should be either captured // by value directly, or copied by the generators during construction. -#include <catch2/catch_test_macros.hpp> -#include <catch2/generators/catch_generators_adapters.hpp> -#include <catch2/generators/catch_generators_random.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> +#include <Progmasoft/Catch3/Generators/Adapters.hpp> +#include <Progmasoft/Catch3/Generators/Random.hpp> TEST_CASE("Generate random doubles across different ranges", "[generator][example][advanced]") { diff --git a/examples/311-Gen-CustomCapture.cpp b/examples/311-Gen-CustomCapture.cpp index ee310383..5c01a084 100644 --- a/examples/311-Gen-CustomCapture.cpp +++ b/examples/311-Gen-CustomCapture.cpp @@ -17,9 +17,9 @@ // per-variable custom capture list, this example shows how to achieve // that. -#include <catch2/catch_test_macros.hpp> -#include <catch2/generators/catch_generators_adapters.hpp> -#include <catch2/generators/catch_generators_random.hpp> +#include <Progmasoft/Catch3/TestMacros.hpp> +#include <Progmasoft/Catch3/Generators/Adapters.hpp> +#include <Progmasoft/Catch3/Generators/Random.hpp> TEST_CASE("Generate random doubles across different ranges", "[generator][example][advanced]") { diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 74b65995..292dac9a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(Catch2Examples LANGUAGES CXX) +project(Catch3Examples LANGUAGES CXX) message(STATUS "Examples included") @@ -18,7 +18,7 @@ add_executable(020-MultiFile add_executable(231-Cfg_OutputStreams 231-Cfg-OutputStreams.cpp ) -target_link_libraries(231-Cfg_OutputStreams Catch2_buildall_interface) +target_link_libraries(231-Cfg_OutputStreams Catch3_buildall_interface) target_compile_definitions(231-Cfg_OutputStreams PUBLIC CATCH_CONFIG_NOSTDOUT) # These examples use the standard separate compilation @@ -51,7 +51,7 @@ set(ALL_EXAMPLE_TARGETS ) foreach(name ${ALL_EXAMPLE_TARGETS}) - target_link_libraries(${name} Catch2WithMain) + target_link_libraries(${name} Catch3WithMain) endforeach() list(APPEND CATCH_TEST_TARGETS ${ALL_EXAMPLE_TARGETS}) |