Revision 921ad290bd1f3319f4e1dcf0726d2b3c6ccd1bc8 authored by Anton Rapetov on 09 March 2016, 12:52:37 UTC, committed by Anton Rapetov on 09 March 2016, 14:50:20 UTC
REGISTER_TEST_CASE accepts only raw pointer to free function, Sometimes it is convenient to generate several test_cases based on same function but with different data. For example: if one has bunch of inputs for which tested library should produse certain outputs. In other word if one whants to write something like: for(const auto &testData : testDataList) { REGISTER_TEST_CASE(std::bind(&testCase, testData), "test_case_" + testData.name); } In this case raw pointers doesn't work. So REGISTER_TEST_CASE should support std::function. This support should be enabled only if compiler supports C++11. For that purpose CATCH_CONFIG_CPP11_STD_FUNCTION define should be added.
1 parent 6581858
File | Mode | Size |
---|---|---|
docs | ||
include | ||
projects | ||
scripts | ||
single_include | ||
.gitattributes | -rw-r--r-- | 301 bytes |
.gitignore | -rw-r--r-- | 390 bytes |
.travis.yml | -rw-r--r-- | 3.8 KB |
LICENSE_1_0.txt | -rw-r--r-- | 1.3 KB |
README.md | -rw-r--r-- | 1.1 KB |
catch-logo-small.png | -rw-r--r-- | 50.3 KB |
Computing file changes ...