unit--
a simple and easy to use unit test aid for C++
|
|
Sample Usage
(view commented code)
#include "unit--.h"
testSuite(MySuite);
testCase(CompareCase, MySuite)
{
int x = 1;
int y = x + 2;
assertTrue(x < y);
}
|
Yes, that's all. There's no need to register your test case else where.
Simply compile your code and link it with unit--.cpp
Portability
unit-- is designed to be fully portable across different platforms and C++ compilers.
It should support all standard compatible compilers.
But not all compilers support the standard very well,
thus unit-- needs to be tested on different compilers.
unit-- has been tested with a number of compilers, including:
- Borland C++ 5.5
- g++3.4.2 on FreeBSD 5.4
- Intel C++ Compiler 9.0
- Metrowerks CodeWarrior 8.0 for Win32
- Microsoft Visual C++ 6.0 & 7.1
- MinGW g++ 3.4.2 on win32
- VisualAge C++ Pro 6 on AIX (1)
-
VisualAge's aggressive optimization options have the potential to alter
the semantics of a user's program. In such case, VACPP might be not fully
compliant to the standard, but with carefully chosen parameters, it is
supported. See FAQ.
if you run unit-- successfully with any other compiler(s) on any platform,
it would be appreciated if you post on the project's forum
Here is a list of existing posts:
Visual C++ 8.0