incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r396754 - /incubator/stdcxx/trunk/tests/strings/21.string.append.cpp
Date Tue, 25 Apr 2006 01:47:18 GMT
sebor@apache.org wrote:
> Author: sebor
> Date: Mon Apr 24 18:32:10 2006
> New Revision: 396754
> 
> URL: http://svn.apache.org/viewcvs?rev=396754&view=rev
> Log:
> 2006-04-24  Martin Sebor  <sebor@roguewave.com>
> 
> 	* 21.string.append.cpp (exceptions): Added elements and renamed
> 	from exp_exceptions for clarity.
> 	(test_exceptions): Merged the body of the function into the
> 	test_append function and removed the declaration of the former.
> 	(test_append_range): Constified locals wherever appropriate
> 	and introduced new helper variables to simplify expressions.
> 	(test_append): Exercised both the function exception safety
> 	and the behavior of the function under normal conditions.

Hey Anton, this change eliminates code duplication between the
test_exceptions() and test_append() functions. Could you please
incorporate it into all new tests? Also, when you have a chance,
it would be good to go back to the existing tests and do the same
thing there as well.

Btw., after this change the test fails 6 assertions, all on line
336, one for each specialization of the test template (see below).
I'm having trouble understanding that test case. What is the
meaning of the expected result (the TestCase::res member) being
null? (I don't think the case was being handled in the test prior
to the change which is why I suspect the test had been passing.)

# ASSERTION (S7) (4 lines):
# TEXT: line 609. std::string ({ 'x' <repeats 4095 times> }).append 
(*this, 0, 0) expected (null), length 3, got { 'x' <repeats 4095 times> 
}, length 4095
# CLAUSE: lib.string.append
# LINE: 336

Martin

PS Btw., shouldn't this test fail for the same reason as the
replace test does, i.e., because of STDCXX-170:
http://issues.apache.org/jira/browse/STDCXX-170

Mime
View raw message