Liviu Nicoara wrote:
I have attached the converted test in subject line.
Great, thanks! I made a few changes and committed it here: http://svn.apache.org/viewcvs.cgi?rev=375703&view=rev
The explanatory pieces of text accompanying the assertions are in certain [few] cases kind of silly.
You mean the "Expected value..." stuff? Well, yes. That's probably one of the reasons why the original test used plain assert() rather than something more sophisticated. All that matters here is that the test pass. A single failure is just as bad and the whole test failing since it indicates an inconsistency in the container, and in that case the actual values the iterator returns probably won't make any sense anyway. I didn't see the test yesterday when you asked what to do with the assertions otherwise I could have saved you the time adding all this stuff. Sorry about that. One more comment below: [...]
#ifndef _RWSTD_NO_REPLACEABLE_NEW_DELETE // disabled for compilers that can't reliably replace the operators // replace operators new and delete with versions that invalidate // storage to detect problems due to deque iterators accessing // uninitialized pointers # define DEFINE_REPLACEMENT_NEW_AND_DELETE
This doesn't do anything. We need to #include <rw_new.h> to get the replacement operators.
#endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE
Martin