mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-27 00:28:49 +03:00
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.
16 lines
458 B
C++
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();
|
|
}
|