CUTE is a fast, light-weight, header-only unit testing framework for C++. It is also included in the Cevelop C++ IDE.
When used with older versions of C++ (e.g. before C++11) cute requires parts of the Boost libraries. With C++11 and later, CUTE requires only the presence of a standard compliant compiler and standard library.
For more information on cute visit: http://www.cute-test.com
To use this package in your projects, include it in your conanfile.txt:
[requires]
CUTE/2.2.0@fmorgner/stable
After adding the conan header paths to your build environment, you are set to start writing test.
Getting started using CUTE is fast and easy. The following is an example with a single failing test.
#include "cute/cute.h"
#include "cute/cute_runner.h"
#include "cute/ide_listener.h"
#include "cute/xml_listener.h"
void test_your_code()
{
ASSERTM("Start testing your code!", false);
}
int main(int argc, char * * argv)
{
auto suite = cute::suite{};
suite += CUTE(test_your_code);
auto xml = cute::xml_file_opener(argc, argv);
auto listener = cute::xml_listener<cute::ide_listener<>>{xml.out};
auto runner = cute::makeRunner(listener, argc, argv);
return !runner(suite, "Example suite");
}
This is a very basic example, of course you can do a lot more with CUTE. To learn more, visit: http://www.cute-test.com
I am not the creator of CUTE. The toolkit is being developed by Prof. Peter Sommerlad and the Institute for Software at the University of Applied Sciences Rapperswil (HSR) in Switzerland. The source code is released under the terms and conditions of the GNU Lesser General Public License version 3.