mrzechonek / tut-framework

C++ Template Unit Test Framework
http://mrzechonek.github.io/tut-framework
Other
50 stars 41 forks source link
c-plus-plus unit-testing

tut-framework

Build Status

TUT is a small and portable unit test framework for C++.

TUT tests are easy to read and maintain. Here’s the simplest test file possible:

#include <tut/tut.hpp>

namespace tut
{
    struct basic{};
    typedef test_group<basic> factory;
    typedef factory::object object;
}

namespace
{
    tut::factory tf("basic test");
}

namespace tut
{
    template<>
    template<>
    void object::test<1>()
    {
        ensure_equals("2+2=?", 2+2, 4);
    }
}