Minimalistic unit testing framework for c++. Inspired by the remarkably simple minunit. This is a header only library that depends only on minor parts of the c++11 standard library, and is thus easily incorporated into any smaller project written in c++11 or above.
The test executable will return the number of failed tests, so is can be combined with CTest if CMake is used as build enviroment.
Any feedback and pull requests for improvements are welcome.
A simple hello world example:
// foo.cpp
#include "sut.h"
DESCRIBE("World")
{
IT("should be fair to assume that the world still works",
{
S_ASSERT(1 == 1, "wat?");
});
}
END()
As the DESCRIBE macro contains a main function, only one can be used per executable test.