From f764ee3d30e441db93d4b48b61340eaba7ecfb2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 15 May 2020 15:57:27 +0200 Subject: [PATCH] Document that user can only provide main in TU with CONFIG_RUNNER Closes #1851 --- docs/own-main.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/own-main.md b/docs/own-main.md index 6a9b1aad..06ea243d 100644 --- a/docs/own-main.md +++ b/docs/own-main.md @@ -11,9 +11,9 @@ The easiest way to use Catch is to let it supply ```main()``` for you and handle This is achieved by writing ```#define CATCH_CONFIG_MAIN``` before the ```#include "catch.hpp"``` in *exactly one* source file. -Sometimes, though, you need to write your own version of main(). You can do this by writing ```#define CATCH_CONFIG_RUNNER``` instead. Now you are free to write ```main()``` as normal and call into Catch yourself manually. +Sometimes, though, you need to write your own version of main(). You can do this by writing ```#define CATCH_CONFIG_RUNNER``` instead. Now you are free to write ```main()``` as normal and call into Catch yourself manually. You now have a lot of flexibility - but here are three recipes to get your started: -You now have a lot of flexibility - but here are three recipes to get your started: +**Important note: you can only provide `main` in the same file you defined `CATCH_CONFIG_RUNNER`.** ## Let Catch take full control of args and config