Hello,

here is a patch that contains some changes which are necessary for
Borland Builder:

=> added a few SVN ignore rules for Borland files
=> added a UNITTEST_BORLAND define in Config.h
=> changed all calls to Test(...) constructor in Test-subclasses to
explicitly mention the namespace UnitTest::Test(...)
=> added a call to _control87(MCW_EM, MCW_EM) in src/tests/Main.cpp to
prevent crashes on NaN-floating point options
=> disabled the CrashingTestsAreReportedAsFailures test (like is
already done for UNITTEST_MINGW)
=> add project files : .bpf, .bpr, .bpg

I assume those changes from Test(...) to UnitTest::Test(...) might be
usefull for other compilers too. I think it's the more correct way to
do.

The _control87(MCW_EM, MCW_EM) line is probably the most
controversial. Currently it's in the test executable, because if it's
in the unittest library, this might change the behaviour of the
floating point unit of the CPU for any executable that is linked with
it. It should probably be #ifdef UNITTEST_BORLAND though. See here for
more details: http://www.virtualdub.org/blog/pivot/entry.php?id=53

Some remaining issues here:
==> I don't know if there's much we can do about the
CrashingTestsAreReportedAsFailures test. If I don't take it out,
CodeGuard complains.

==> If I disable CodeGuard, I get problems in the
TimeConstraintsFailsWithSlowTest, in the destructor of TimeConstraint,
on the destructor of local variable MemoryOutStream stream. When I
enable CodeGuard, things are OK. Might be related to using STL inside
destructors or something. See also here:
http://www.gamedev.net/community/forums/topic.aspx?topic_id=486700

==> If I select to use custom streams, then I get complaints about
strstr() function which is called in a lot of the CHECK() macro's, but
not defined. This is solved if I explicitly make it std::strstr
instead. (this change is not included yet in my patch)

==> When I use the custom streams and fix the std::strstr issue above,
I get 1 failing test :
UnitTest++\src\tests\TestMemoryOutStream.cpp(139): error: Failure in
WritingFloatLongerThanCapacityFitsInNewBuffer: Expected
aaaa123456.000000f but was aaaa123455.995904f
FAILURE: 1 out of 183 tests failed (1 failures).
Test time: 0.10 seconds.
The hex codes these values correspond to (already corrected for
byte-swap) are : F1472000 vs F1471FFF, so this seems a floating point
anomaly.


All in all, some problems, maybe some things to look at closer in
UnitTest++, but it seems to work now.


Kind regards,

Pieter-Jan

Attachment: support_bcb.diff
Description: Binary data

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
unittest-cpp-devel mailing list
unittest-cpp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel

Reply via email to