Skip to content

tokreutz/sut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1f726e5 · Nov 17, 2013

History

14 Commits
Oct 6, 2013
Oct 6, 2013
Oct 8, 2013
Nov 17, 2013

Repository files navigation

Simple Unit Test

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.

Test Hello World

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()

Limitations

As the DESCRIBE macro contains a main function, only one can be used per executable test.

About

Minimalistic unit testing framework for c++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages