mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Add html anchor 'top'
This commit is contained in:
parent
a7a9be59ff
commit
e8225052f1
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
![catch logo](catch-logo-small.png)
|
![catch logo](catch-logo-small.png)
|
||||||
|
|
||||||
[![Github Releases](https://img.shields.io/github/release/philsquared/catch.svg)](https://github.com/philsquared/catch/releases)
|
[![Github Releases](https://img.shields.io/github/release/philsquared/catch.svg)](https://github.com/philsquared/catch/releases)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
To get the most out of Catch, start with the [tutorial](tutorial.md).
|
To get the most out of Catch, start with the [tutorial](tutorial.md).
|
||||||
Once you're up and running consider the following reference material.
|
Once you're up and running consider the following reference material.
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Assertion Macros
|
# Assertion Macros
|
||||||
|
|
||||||
Most test frameworks have a large collection of assertion macros to capture all possible conditional forms (```_EQUALS```, ```_NOTEQUALS```, ```_GREATER_THAN``` etc).
|
Most test frameworks have a large collection of assertion macros to capture all possible conditional forms (```_EQUALS```, ```_NOTEQUALS```, ```_GREATER_THAN``` etc).
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# CI and build system integration
|
# CI and build system integration
|
||||||
|
|
||||||
Build Systems may refer to low-level tools, like CMake, or larger systems that run on servers, like Jenkins or TeamCity. This page will talk about both.
|
Build Systems may refer to low-level tools, like CMake, or larger systems that run on servers, like Jenkins or TeamCity. This page will talk about both.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
Catch works quite nicely without any command line options at all - but for those times when you want greater control the following options are available.
|
Catch works quite nicely without any command line options at all - but for those times when you want greater control the following options are available.
|
||||||
Click one of the followings links to take you straight to that option - or scroll on to browse the available options.
|
Click one of the followings links to take you straight to that option - or scroll on to browse the available options.
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Commercial users of Catch
|
# Commercial users of Catch
|
||||||
|
|
||||||
As well as [Open Source](opensource-users.md) users Catch is widely used within proprietary code bases too.
|
As well as [Open Source](opensource-users.md) users Catch is widely used within proprietary code bases too.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
Catch is designed to "just work" as much as possible. For most people the only configuration needed is telling Catch which source file should host all the implementation code (```CATCH_CONFIG_MAIN```).
|
Catch is designed to "just work" as much as possible. For most people the only configuration needed is telling Catch which source file should host all the implementation code (```CATCH_CONFIG_MAIN```).
|
||||||
|
|
||||||
Nonetheless there are still some occasions where finer control is needed. For these occasions Catch exposes a set of macros for configuring how it is built.
|
Nonetheless there are still some occasions where finer control is needed. For these occasions Catch exposes a set of macros for configuring how it is built.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Contributing to Catch
|
# Contributing to Catch
|
||||||
|
|
||||||
So you want to contribute something to Catch? That's great! Whether it's a bug fix, a new feature, support for
|
So you want to contribute something to Catch? That's great! Whether it's a bug fix, a new feature, support for
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Event Listeners
|
# Event Listeners
|
||||||
|
|
||||||
A `Listener` is a class you can register with Catch that will then be passed events,
|
A `Listener` is a class you can register with Catch that will then be passed events,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Known limitations
|
# Known limitations
|
||||||
|
|
||||||
Catch has some known limitations, that we are not planning to change. Some of these are caused by our desire to support C++98 compilers, some of these are caused by our desire to keep Catch crossplatform, some exist because their priority is seen as low compared to the development effort they would need and some other yet are compiler/runtime bugs.
|
Catch has some known limitations, that we are not planning to change. Some of these are caused by our desire to support C++98 compilers, some of these are caused by our desire to keep Catch crossplatform, some exist because their priority is seen as low compared to the development effort they would need and some other yet are compiler/runtime bugs.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Logging macros
|
# Logging macros
|
||||||
|
|
||||||
Additional messages can be logged during a test case. Note that the messages are scoped and thus will not be reported if failure occurs in scope preceding the message declaration. An example:
|
Additional messages can be logged during a test case. Note that the messages are scoped and thus will not be reported if failure occurs in scope preceding the message declaration. An example:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Matchers
|
# Matchers
|
||||||
|
|
||||||
Matchers are an alternative way to do assertions which are easily extensible and composable.
|
Matchers are an alternative way to do assertions which are easily extensible and composable.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Open Source projects using Catch
|
# Open Source projects using Catch
|
||||||
|
|
||||||
Catch is great for open source. With it's [liberal license](../LICENSE.txt) and single-header, dependency-free, distribution
|
Catch is great for open source. With it's [liberal license](../LICENSE.txt) and single-header, dependency-free, distribution
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Supplying main() yourself
|
# Supplying main() yourself
|
||||||
|
|
||||||
The easiest way to use Catch is to let it supply ```main()``` for you and handle configuring itself from the command line.
|
The easiest way to use Catch is to let it supply ```main()``` for you and handle configuring itself from the command line.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# 2.0.0 (in progress)
|
# 2.0.0 (in progress)
|
||||||
|
|
||||||
## Breaking changes
|
## Breaking changes
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# How to release
|
# How to release
|
||||||
|
|
||||||
When enough changes have accumulated, it is time to release new version of Catch. This document describes the proces in doing so, that no steps are forgotten. Note that all referenced scripts can be found in the `scripts/` directory.
|
When enough changes have accumulated, it is time to release new version of Catch. This document describes the proces in doing so, that no steps are forgotten. Note that all referenced scripts can be found in the `scripts/` directory.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Reporters
|
# Reporters
|
||||||
|
|
||||||
Catch has a modular reporting system and comes bundled with a handful of useful reporters built in.
|
Catch has a modular reporting system and comes bundled with a handful of useful reporters built in.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Why do my tests take so long to compile?
|
# Why do my tests take so long to compile?
|
||||||
|
|
||||||
Several people have reported that test code written with Catch takes much longer to compile than they would expect. Why is that?
|
Several people have reported that test code written with Catch takes much longer to compile than they would expect. Why is that?
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Test cases and sections
|
# Test cases and sections
|
||||||
|
|
||||||
While Catch fully supports the traditional, xUnit, style of class-based fixtures containing test case methods this is not the preferred style.
|
While Catch fully supports the traditional, xUnit, style of class-based fixtures containing test case methods this is not the preferred style.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
Although Catch allows you to group tests together as sections within a test case, it can still be convenient, sometimes, to group them using a more traditional test fixture. Catch fully supports this too. You define the test fixture as a simple structure:
|
Although Catch allows you to group tests together as sections within a test case, it can still be convenient, sometimes, to group them using a more traditional test fixture. Catch fully supports this too. You define the test fixture as a simple structure:
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# String conversions
|
# String conversions
|
||||||
|
|
||||||
Catch needs to be able to convert types you use in assertions and logging expressions into strings (for logging and reporting purposes).
|
Catch needs to be able to convert types you use in assertions and logging expressions into strings (for logging and reporting purposes).
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Getting Catch
|
# Getting Catch
|
||||||
|
|
||||||
The simplest way to get Catch is to download the latest [single header version](https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp). The single header is generated by merging a set of individual headers but it is still just normal source code in a header file.
|
The simplest way to get Catch is to download the latest [single header version](https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp). The single header is generated by merging a set of individual headers but it is still just normal source code in a header file.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<a id="top"></a>
|
||||||
# Why do we need yet another C++ test framework?
|
# Why do we need yet another C++ test framework?
|
||||||
|
|
||||||
Good question. For C++ there are quite a number of established frameworks,
|
Good question. For C++ there are quite a number of established frameworks,
|
||||||
|
Loading…
Reference in New Issue
Block a user