unittest-cpp/tests/Main.cpp
Alexis Denis bcf039ecce Build clean and passes all the tests except three using CMake.
cd builds
cmake -G"Borland Makefiles" ..
make
Two of the tests fail because of unhandled floating point exceptions (throws when doing calculations using Nan). This was fixed by ignoring floating point exceptions.
One test fails because std::string is not implemented properly in Borland C++ 5. This test is bypassed if using the Borland compiler. It does mean though that MemoryOutStream.Clear() doesn't work. A more permanent fix might be needed. I noticed a separate implementation of MemoryOutStream for VC6 that doesn't use std::string. Maybe we can use that one instead.
2016-11-21 16:24:54 -06:00

16 lines
458 B
C++

#include "UnitTest++/UnitTestPP.h"
#ifdef __BORLANDC__
#include <vcl.h>
#include <math.h>
#include <float.h>
#endif
int main(int, char const *[])
{
#ifdef __BORLANDC__
// This is to allow the check test to pass when using Nan (invalid float numbers), otherwise, they throw an exception
// and the test fails (CheckCloseWithNaNFails and CheckCloseWithNaNAgainstItselfFails)
_control87(MCW_EM, MCW_EM);
#endif
return UnitTest::RunAllTests();
}