Migration from 0.5.0 to 0.6.x

Home Page
Documentation

// previous usage with unit--0.5.0

#include "unit--.h"

testSuite(MySuite);

testCase(CompareCase, MySuite);
void test()
{
    int x = 1;
    int y = x + 2;
    assertTrue(x < y);
}
endCase(CompareCase);
|\
| \
|  \
|  /
| /
|/
|\
| \
|  \
|  /
| /
|/
// current usage with unit--0.6.x

#include "unit--.h"

testSuite(MySuite);

testCase(CompareCase, MySuite)
{
    int x = 1;
    int y = x + 2;
    assertTrue(x < y);
}

Migration step by step (0.5.0 --> 0.6.x)

  1. replace unit--.h & unit--.cpp with new version
  2. search and erase "void test()" and possibly preceding semicolon
  3. search and erase "endCase(" and anything follows in the same line, or regexp "endCase([a-zA-Z_][0-9a-zA-Z_]*);?"

unit--, the unit test aid for C++ SourceForge.net Logo