diff --git a/docs/command-line.md b/docs/command-line.md index 35906934..56c34f22 100644 --- a/docs/command-line.md +++ b/docs/command-line.md @@ -1 +1,5 @@ -placeholder for command line \ No newline at end of file +placeholder for command line + +--- + +[Home](../README.md) \ No newline at end of file diff --git a/docs/own-main.md b/docs/own-main.md index 44b5b60b..473bc566 100644 --- a/docs/own-main.md +++ b/docs/own-main.md @@ -1 +1,5 @@ -placeholder for using your own main \ No newline at end of file +placeholder for using your own main + +--- + +[Home](../README.md) \ No newline at end of file diff --git a/docs/reference-index.md b/docs/reference-index.md index 0f3837d0..4336d265 100644 --- a/docs/reference-index.md +++ b/docs/reference-index.md @@ -1 +1,5 @@ -placeholder for reference index \ No newline at end of file +placeholder for reference index + +--- + +[Home](../README.md) \ No newline at end of file diff --git a/docs/tutorial.md b/docs/tutorial.md index df91cf8d..5d4df5a3 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -92,4 +92,9 @@ Although this was a simple test it's been enough to demonstrate a few things abo 4. We write our individual test assertions using the REQUIRE macro. Rather than a separate macro for each type of condition we express the condition naturally using C/C++ syntax. Behind the scenes a simple set of expression templates captures the left-hand-side and right-hand-side of the expression so we can display the values in our test report. As we'll see later there _are_ other assertion macros - but because of this technique the number of them is drastically reduced. ## Next steps -For more specific information see the [Reference pages](reference-index.md) \ No newline at end of file +For more specific information see the [Reference pages](reference-index.md) + + +--- + +[Home](../README.md) \ No newline at end of file diff --git a/docs/why-catch.md b/docs/why-catch.md index c0707821..4a686b1b 100644 --- a/docs/why-catch.md +++ b/docs/why-catch.md @@ -1 +1,40 @@ -placeholder for "why do we need yet another C++ test framework?" \ No newline at end of file +Good question. For C++ there are quite a number of established frameworks, including (but not limited to), [CppUnit](http://sourceforge.net/apps/mediawiki/cppunit/index.php?title=Main_Page), [Google Test](http://code.google.com/p/googletest/), [Boost.Test](http://www.boost.org/doc/libs/1_49_0/libs/test/doc/html/index.html), [Aeryn](https://launchpad.net/aeryn), [Cute](http://r2.ifs.hsr.ch/cute), [Fructose](http://fructose.sourceforge.net/) and [many, many more](http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C.2B.2B). Even for Objective-C there are a few, including OCUnit - which now comes bundled with XCode. + +So what does Catch bring to the party that differentiates it from these? Apart from a Catchy name, of course. + +## Key Features + +* Really easy to get started. Just download catch.hpp, #include it and you're away. +* No external dependencies. As long as you can compile C++98 and have a C++ standard library available. +* Write test cases as, self-registering, functions or methods. +* Divide test cases into sections, each of which is run in isolation (eliminates the need for fixtures!) +* Use BDD-style GIVEN-WHEN-THEN in place of test cases and sections. +* Only one core assertion macro for comparisons. Standard C/c++ operators are used for the comparison - yet the full expression is decomposed and lhs and rhs values are logged. + +## Other core features + +* Tests are named using free-form strings - no more couching names in legal identifiers. +* Tests can be tagged for easily running ad-hoc groups of tests. +* Failures can (optionally) break into the debugger on Windows and Mac. +* Output is through modular reporter objects. Basic textual and XML reporters are included. Custom reporters can easily be added. +* JUnit xml output is supported for integration with third-party tools, such as CI servers. +* A default main() function is provided (in a header), but you can supply your own for complete control (e.g. integration into your own test runner GUI). +* A command line parser is provided and can still be used if you choose to provided your own main() function. +* Catch can test itself. +* Alternative assertion macro(s) report failures but don't abort the test case +* Floating point tolerance comparisons are built in using an expressive Approx() syntax. +* Internal and friendly macros are isolated so name clashes can be managed +* Support for Matchers (early stages) + +## Objective-C-specific features + +* Automatically detects if you are using it from an Objective-C project +* Works with and without ARC with no additional configuration +* Implement test fixtures using Obj-C classes too (like OCUnit) +* Additional built in matchers that work with Obj-C types (e.g. string matchers) + +See the [tutorial](tutorial.md) to get more of a taste of using CATCH in practice + +--- + +[Home](../README.md) \ No newline at end of file