diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1953a566..0139f963 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,6 +26,6 @@ jobs: run: poetry run mkdocs build - name: deploy - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }} run: poetry run mkdocs gh-deploy --force diff --git a/docs/assertions.md b/docs/assertions.md index 40faa5eb..49d87e0e 100644 --- a/docs/assertions.md +++ b/docs/assertions.md @@ -26,7 +26,7 @@ The ```CHECK``` family are equivalent but execution continues in the same test c Evaluates the expression and records the result. If an exception is thrown, it is caught, reported, and counted as a failure. These are the macros you will use most of the time. Examples: -``` +```cpp CHECK( str == "string value" ); CHECK( thisReturnsTrue() ); REQUIRE( i == 42 ); @@ -177,6 +177,4 @@ TEST_CASE_METHOD((Fixture), "foo", "[bar]") { This solution is not always applicable, because it might require extra changes on the Catch's side to work. ---- -[Home](Readme.md#top) diff --git a/docs/assets/c2_hand_logo.png b/docs/assets/c2_hand_logo.png deleted file mode 100644 index ab857eaa..00000000 Binary files a/docs/assets/c2_hand_logo.png and /dev/null differ diff --git a/docs/assets/catch2_logo_with_bg.png b/docs/assets/catch2_logo_with_bg.png deleted file mode 100644 index 963eaf49..00000000 Binary files a/docs/assets/catch2_logo_with_bg.png and /dev/null differ diff --git a/docs/ci-and-misc.md b/docs/ci-and-misc.md index c07da29f..0b7d7b7c 100644 --- a/docs/ci-and-misc.md +++ b/docs/ci-and-misc.md @@ -105,6 +105,4 @@ when stepping through code. integration with CMake has been moved to its own page.](cmake-integration.md#top) ---- -[Home](Readme.md#top) diff --git a/docs/cmake-integration.md b/docs/cmake-integration.md index e38d5c2f..1b7c6226 100644 --- a/docs/cmake-integration.md +++ b/docs/cmake-integration.md @@ -408,6 +408,4 @@ cd vcpkg The catch2 port in vcpkg is kept up to date by microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. ---- -[Home](Readme.md#top) diff --git a/docs/command-line.md b/docs/command-line.md index a15a2131..3a644baf 100644 --- a/docs/command-line.md +++ b/docs/command-line.md @@ -583,6 +583,4 @@ ignored. Verbosity defaults to _normal_. ---- -[Home](Readme.md#top) diff --git a/docs/commercial-users.md b/docs/commercial-users.md index 020eaefc..428b9371 100644 --- a/docs/commercial-users.md +++ b/docs/commercial-users.md @@ -18,6 +18,4 @@ with you sharing this fact. - [King](https://king.com) ---- -[Home](Readme.md#top) diff --git a/docs/comparing-floating-point-numbers.md b/docs/comparing-floating-point-numbers.md index ab5ba6df..64825fc4 100644 --- a/docs/comparing-floating-point-numbers.md +++ b/docs/comparing-floating-point-numbers.md @@ -187,6 +187,4 @@ to Approx's value when computing the allowed relative margin from the Approx's value. ---- -[Home](Readme.md#top) diff --git a/docs/configuration.md b/docs/configuration.md index d4421f3c..18e8b5f7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -264,6 +264,4 @@ The macro will be used as is, that is, `CATCH_BREAK_INTO_DEBUGGER();` must compile and must break into debugger. ---- -[Home](Readme.md#top) diff --git a/docs/contributing.md b/docs/contributing.md index d9f87fc1..faaafa28 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -152,9 +152,7 @@ should use. It provides you with the top anchor mentioned to link to Text that explains how to use the cool feature. ---- -[Home](Readme.md#top) ``` * Crosslinks to different pages should target the `top` anchor, like this @@ -338,6 +336,4 @@ while contributing to Catch2. _This documentation will always be in-progress as new information comes up, but we are trying to keep it as up to date as possible._ ---- -[Home](Readme.md#top) diff --git a/docs/deprecations.md b/docs/deprecations.md index 1fb79aaa..7a59ffc9 100644 --- a/docs/deprecations.md +++ b/docs/deprecations.md @@ -35,6 +35,4 @@ being aborted (when using `--abort` or `--abortx`). It is however **NOT** invoked for test cases that are [explicitly skipped using the `SKIP` macro](skipping-passing-failing.md#top). ---- -[Home](Readme.md#top) diff --git a/docs/event-listeners.md b/docs/event-listeners.md index 71db3e18..9f089931 100644 --- a/docs/event-listeners.md +++ b/docs/event-listeners.md @@ -39,6 +39,4 @@ _Note that you should not use any assertion macros within a Listener!_ own page](reporter-events.md#top). ---- -[Home](Readme.md#top) diff --git a/docs/faq.md b/docs/faq.md index a7d0455a..8c9af814 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -89,6 +89,4 @@ above what your platform does. **Important: ``'s distributions are not specified to be repeatable across different platforms.** ---- -[Home](Readme.md#top) diff --git a/docs/list-of-examples.md b/docs/list-of-examples.md index a919408a..aa6a75f6 100644 --- a/docs/list-of-examples.md +++ b/docs/list-of-examples.md @@ -3,44 +3,86 @@ ## Already available -- Test Case: [Single-file](../examples/010-TestCase.cpp) -- Test Case: [Multiple-file 1](../examples/020-TestCase-1.cpp), [2](../examples/020-TestCase-2.cpp) -- Assertion: [REQUIRE, CHECK](../examples/030-Asn-Require-Check.cpp) -- Fixture: [Sections](../examples/100-Fix-Section.cpp) -- Fixture: [Class-based fixtures](../examples/110-Fix-ClassFixture.cpp) -- BDD: [SCENARIO, GIVEN, WHEN, THEN](../examples/120-Bdd-ScenarioGivenWhenThen.cpp) -- Listener: [Listeners](../examples/210-Evt-EventListeners.cpp) -- Configuration: [Provide your own output streams](../examples/231-Cfg-OutputStreams.cpp) -- Generators: [Create your own generator](../examples/300-Gen-OwnGenerator.cpp) -- Generators: [Use map to convert types in GENERATE expression](../examples/301-Gen-MapTypeConversion.cpp) -- Generators: [Run test with a table of input values](../examples/302-Gen-Table.cpp) -- Generators: [Use variables in generator expressions](../examples/310-Gen-VariablesInGenerators.cpp) -- Generators: [Use custom variable capture in generator expressions](../examples/311-Gen-CustomCapture.cpp) +### Test Case: Single-file +```cpp +--8<-- "examples/010-TestCase.cpp" +``` +### Test Case: Multiple-files +=== "File 1" + ```cpp + --8<-- "examples/020-TestCase-1.cpp" + ``` +=== "File 2" + ```cpp + --8<-- "examples/020-TestCase-2.cpp" + ``` +### Assertion (REQUIRE, CHECK) +```cpp +--8<-- "examples/030-Asn-Require-Check.cpp" +``` +### Fixtures +#### Sections +```cpp +--8<-- "examples/100-Fix-Section.cpp" +``` +#### Class-based fixtures +```cpp +--8<-- "examples/110-Fix-ClassFixture.cpp" +``` +### BDD (SCENARIO, GIVEN, WHEN, THEN) +```cpp +--8<-- "examples/120-Bdd-ScenarioGivenWhenThen.cpp" +``` +### Listener +```cpp +--8<-- "examples/210-Evt-EventListeners.cpp" +``` +### Configuration - *Provide your own output streams* +```cpp +--8<-- "examples/231-Cfg-OutputStreams.cpp" +``` +### Generators +#### Create your own generator +```cpp +--8<-- "examples/300-Gen-OwnGenerator.cpp" +``` +#### Use map to convert types in GENERATE expression +```cpp +--8<-- "examples/301-Gen-MapTypeConversion.cpp" +``` +#### Run test with a table of input values +```cpp +--8<-- "examples/302-Gen-Table.cpp" +``` +#### Use variables in generator expressions +```cpp +--8<-- "examples/310-Gen-VariablesInGenerators.cpp" +``` +#### Use custom variable capture in generator expressions +```cpp +--8<-- "examples/311-Gen-CustomCapture.cpp" +``` +??? note "Planned (TBD)" + + - Assertion: [REQUIRE_THAT and Matchers](../examples/040-Asn-RequireThat.cpp) + - Assertion: [REQUIRE_NO_THROW](../examples/050-Asn-RequireNoThrow.cpp) + - Assertion: [REQUIRE_THROWS](../examples/050-Asn-RequireThrows.cpp) + - Assertion: [REQUIRE_THROWS_AS](../examples/070-Asn-RequireThrowsAs.cpp) + - Assertion: [REQUIRE_THROWS_WITH](../examples/080-Asn-RequireThrowsWith.cpp) + - Assertion: [REQUIRE_THROWS_MATCHES](../examples/090-Asn-RequireThrowsMatches.cpp) + - Floating point: [Approx - Comparisons](../examples/130-Fpt-Approx.cpp) + - Logging: [CAPTURE - Capture expression](../examples/140-Log-Capture.cpp) + - Logging: [INFO - Provide information with failure](../examples/150-Log-Info.cpp) + - Logging: [WARN - Issue warning](../examples/160-Log-Warn.cpp) + - Logging: [FAIL, FAIL_CHECK - Issue message and force failure/continue](../examples/170-Log-Fail.cpp) + - Logging: [SUCCEED - Issue message and continue](../examples/180-Log-Succeed.cpp) + - Report: [User-defined type](../examples/190-Rpt-ReportUserDefinedType.cpp) + - Report: [User-defined reporter](../examples/202-Rpt-UserDefinedReporter.cpp) + - Report: [Automake reporter](../examples/205-Rpt-AutomakeReporter.cpp) + - Report: [TAP reporter](../examples/206-Rpt-TapReporter.cpp) + - Report: [Multiple reporter](../examples/208-Rpt-MultipleReporters.cpp) + - Configuration: [Provide your own main()](../examples/220-Cfg-OwnMain.cpp) + - Configuration: [Compile-time configuration](../examples/230-Cfg-CompileTimeConfiguration.cpp) + - Configuration: [Run-time configuration](../examples/240-Cfg-RunTimeConfiguration.cpp) -## Planned - -- Assertion: [REQUIRE_THAT and Matchers](../examples/040-Asn-RequireThat.cpp) -- Assertion: [REQUIRE_NO_THROW](../examples/050-Asn-RequireNoThrow.cpp) -- Assertion: [REQUIRE_THROWS](../examples/050-Asn-RequireThrows.cpp) -- Assertion: [REQUIRE_THROWS_AS](../examples/070-Asn-RequireThrowsAs.cpp) -- Assertion: [REQUIRE_THROWS_WITH](../examples/080-Asn-RequireThrowsWith.cpp) -- Assertion: [REQUIRE_THROWS_MATCHES](../examples/090-Asn-RequireThrowsMatches.cpp) -- Floating point: [Approx - Comparisons](../examples/130-Fpt-Approx.cpp) -- Logging: [CAPTURE - Capture expression](../examples/140-Log-Capture.cpp) -- Logging: [INFO - Provide information with failure](../examples/150-Log-Info.cpp) -- Logging: [WARN - Issue warning](../examples/160-Log-Warn.cpp) -- Logging: [FAIL, FAIL_CHECK - Issue message and force failure/continue](../examples/170-Log-Fail.cpp) -- Logging: [SUCCEED - Issue message and continue](../examples/180-Log-Succeed.cpp) -- Report: [User-defined type](../examples/190-Rpt-ReportUserDefinedType.cpp) -- Report: [User-defined reporter](../examples/202-Rpt-UserDefinedReporter.cpp) -- Report: [Automake reporter](../examples/205-Rpt-AutomakeReporter.cpp) -- Report: [TAP reporter](../examples/206-Rpt-TapReporter.cpp) -- Report: [Multiple reporter](../examples/208-Rpt-MultipleReporters.cpp) -- Configuration: [Provide your own main()](../examples/220-Cfg-OwnMain.cpp) -- Configuration: [Compile-time configuration](../examples/230-Cfg-CompileTimeConfiguration.cpp) -- Configuration: [Run-time configuration](../examples/240-Cfg-RunTimeConfiguration.cpp) - ---- - -[Home](Readme.md#top) diff --git a/docs/logging.md b/docs/logging.md index dbd4f912..6ab809dc 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -154,6 +154,4 @@ to enclose the expression inside parentheses: `CAPTURE( (std::pair{1, 2}) );` ---- -[Home](Readme.md#top) diff --git a/docs/matchers.md b/docs/matchers.md index 14c15898..425b9033 100644 --- a/docs/matchers.md +++ b/docs/matchers.md @@ -435,6 +435,4 @@ and new style matchers arbitrarily. > `MatcherGenericBase` lives in `catch2/matchers/catch_matchers_templated.hpp` ---- -[Home](Readme.md#top) diff --git a/docs/migrate-v2-to-v3.md b/docs/migrate-v2-to-v3.md index 84ed7690..204be8d5 100644 --- a/docs/migrate-v2-to-v3.md +++ b/docs/migrate-v2-to-v3.md @@ -93,6 +93,4 @@ the [interfaces](reporters.md#top) and the [events](reporter-events.md#top) are now documented. ---- -[Home](Readme.md#top) diff --git a/docs/opensource-users.md b/docs/opensource-users.md index a02d0b98..9714c484 100644 --- a/docs/opensource-users.md +++ b/docs/opensource-users.md @@ -154,6 +154,4 @@ SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gr ### [Standardese](https://github.com/foonathan/standardese) Standardese aims to be a nextgen Doxygen. ---- -[Home](Readme.md#top) diff --git a/docs/own-main.md b/docs/own-main.md index 26dfa86d..efbef7e9 100644 --- a/docs/own-main.md +++ b/docs/own-main.md @@ -127,6 +127,4 @@ part of the version. As an example, given single header version v2.3.4, the macros would expand into `2`, `3`, and `4` respectively. ---- -[Home](Readme.md#top) diff --git a/docs/release-notes.md b/docs/release-notes.md index 8b413b15..2643a606 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1659,6 +1659,4 @@ Other: ## Even Older versions Release notes were not maintained prior to v1.6.0, but you should be able to work them out from the Git history ---- -[Home](Readme.md#top) diff --git a/docs/reporter-events.md b/docs/reporter-events.md index 015f67be..6d028a0a 100644 --- a/docs/reporter-events.md +++ b/docs/reporter-events.md @@ -170,6 +170,4 @@ or Windows SE handler is called into with a fatal signal/exception. `noMatchingTestCases` is sent for each user provided test specification that did not match any registered tests. ---- -[Home](Readme.md#top) diff --git a/docs/reporters.md b/docs/reporters.md index 496c61a9..2c28f256 100644 --- a/docs/reporters.md +++ b/docs/reporters.md @@ -208,6 +208,4 @@ important for the reporter to work _nicely_. ---- -[Home](Readme.md#top) diff --git a/docs/skipping-passing-failing.md b/docs/skipping-passing-failing.md index 4300d9d3..7c8240e2 100644 --- a/docs/skipping-passing-failing.md +++ b/docs/skipping-passing-failing.md @@ -124,6 +124,4 @@ TEST_CASE( "FAIL showcase" ) { ``` ---- -[Home](Readme.md#top) diff --git a/docs/test-cases-and-sections.md b/docs/test-cases-and-sections.md index acebcc51..7a02c26d 100644 --- a/docs/test-cases-and-sections.md +++ b/docs/test-cases-and-sections.md @@ -341,6 +341,4 @@ TEMPLATE_PRODUCT_TEST_CASE_SIG("A Template product test case with array signatur ``` ---- -[Home](Readme.md#top) diff --git a/docs/test-fixtures.md b/docs/test-fixtures.md index 9c9eaa18..56387e7b 100644 --- a/docs/test-fixtures.md +++ b/docs/test-fixtures.md @@ -157,6 +157,4 @@ TEMPLATE_LIST_TEST_CASE_METHOD(Template_Fixture, } ``` ---- -[Home](Readme.md#top) diff --git a/docs/tostring.md b/docs/tostring.md index adce3cc7..1c6d5638 100644 --- a/docs/tostring.md +++ b/docs/tostring.md @@ -127,6 +127,4 @@ inside the `StringMaker` specialization, like so: This assertion will fail and print out the `testFloat1` and `testFloat2` to 15 decimal places. ---- -[Home](Readme.md#top) diff --git a/docs/tutorial.md b/docs/tutorial.md index 342c7381..576373be 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -222,6 +222,4 @@ about these as you go, in the ever-growing [reference section](Readme.md#top) of the documentation. ---- -[Home](Readme.md#top) diff --git a/docs/usage-tips.md b/docs/usage-tips.md index 6be01ee6..b1949ba6 100644 --- a/docs/usage-tips.md +++ b/docs/usage-tips.md @@ -95,6 +95,4 @@ and makes tests easy to navigate by reflecting the project's organizational structure. ---- -[Home](Readme.md#top) diff --git a/docs/why-catch.md b/docs/why-catch.md index 2c0178ca..e938c2bb 100644 --- a/docs/why-catch.md +++ b/docs/why-catch.md @@ -54,6 +54,4 @@ for some idea on who else also uses Catch2. See the [tutorial](tutorial.md#top) to get more of a taste of using Catch2 in practice. ---- -[Home](Readme.md#top) diff --git a/mkdocs.yml b/mkdocs.yml index d0221340..b6eb925a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -25,8 +25,8 @@ theme: font: text: Open Sans code: Fira Code - logo: assets/catch2_logo_with_bg.png - favicon: assets/c2_hand_logo.png + logo: https://github.com/catchorg/Catch2/blob/devel/data/artwork/catch2-logo-small-with-background.png?raw=true + favicon: https://github.com/catchorg/Catch2/blob/devel/data/artwork/catch2-hand-logo.png?raw=true plugins: @@ -34,9 +34,6 @@ plugins: - mike - - - markdown_extensions: - def_list - pymdownx.tasklist: @@ -51,6 +48,9 @@ markdown_extensions: - pymdownx.details - admonition - tables + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true - toc: permalink: "#"