diff options
| author | Martin Hořeňovský | 2020-10-21 19:59:59 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-10-21 19:59:59 +0200 |
| commit | 0c7f96ba630a49e18e7b2fb0e5ed241b04a7898a (patch) | |
| tree | 0267b2280825989241e1e301174ebc9b1f4d6476 /docs/tutorial.md | |
| parent | 923bcc5d6fc2bf0123d883f7d18a678ce63bbfe4 (diff) | |
| download | catch3-0c7f96ba630a49e18e7b2fb0e5ed241b04a7898a.tar.gz | |
Update documentation not to reference master branch
Diffstat (limited to 'docs/tutorial.md')
| -rw-r--r-- | docs/tutorial.md | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/docs/tutorial.md b/docs/tutorial.md index 1f0b8ff2..45cb9919 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -3,7 +3,6 @@ **Contents**<br> [Getting Catch2](#getting-catch2)<br> -[Where to put it?](#where-to-put-it)<br> [Writing tests](#writing-tests)<br> [Test cases and sections](#test-cases-and-sections)<br> [BDD-Style](#bdd-style)<br> @@ -13,22 +12,32 @@ ## Getting Catch2 -The simplest way to get Catch2 is to download the latest [single header version](https://raw.githubusercontent.com/catchorg/Catch2/master/single_include/catch2/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 Catch2 is to download the latest +[amalgamated header](https://raw.githubusercontent.com/catchorg/Catch2/devel/extras/catch_amalgamated.hpp) +and [amalgamated source file](https://raw.githubusercontent.com/catchorg/Catch2/devel/extras/catch_amalgamated.cpp). -Alternative ways of getting Catch2 include using your system package -manager, or installing it using [its CMake package](cmake-integration.md#installing-catch2-from-git-repository). +These two files are the result of merging all headers, respectively +all source files, into one file. To use them, just drop them next to your +own project. Using Catch2 like this has a significant disadvantage in terms +of final compilation times, but it works well enough to get you started. -The full source for Catch2, including test projects, documentation, and other things, is hosted on GitHub. [http://catch-lib.net](http://catch-lib.net) will redirect you there. +Later, you should move towards using Catch2 as a proper library, preferably +via CMake. See our documentation on the [CMake integration](cmake-integration.md#top). -## Where to put it? +_If you have installed Catch2 from system package manager, or CMake +package, you need to include the header as `#include <catch2/catch.hpp>`_ -Catch2 is header only. All you need to do is drop the file somewhere reachable from your project - either in some central location you can set your header search path to find, or directly into your project tree itself! This is a particularly good option for other Open-Source projects that want to use Catch for their test suite. See [this blog entry for more on that](https://levelofindirection.com/blog/unit-testing-in-cpp-and-objective-c-just-got-ridiculously-easier-still.html). -The rest of this tutorial will assume that the Catch2 single-include header (or the include folder) is available unqualified - but you may need to prefix it with a folder name if necessary. +-------- + +The rest of this page is currently waiting for rewrite for the v3 +release. It might not be accurate in places, and likely doesn't mention +the proper header to include, or might refer to outdated functionality, +like the `CATCH_CONFIG_MAIN` macro. + +-------- -_If you have installed Catch2 from system package manager, or CMake -package, you need to include the header as `#include <catch2/catch.hpp>`_ ## Writing tests |