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: test for 21.string.copy
Date Sat, 25 Mar 2006 22:47:43 GMT
Anton Pevtsov wrote:
> The latest version of the test is attached. I plan to commit it to the
> svn, ok?

Actually, there are a few more simplifying improvements that I think
we still ought to make. First, we can use the third argument to copy
(pos) to distinguish between the two overloads. When pos is negative
(say, -1) the two argument overload will be invoked. Otherwise, the
test function will invoke the three-argument overload. That will
allow us to eliminate the (redunant) function tag CTag.

Second, in the test function, I would like to use rw_match() instead
of Traits::compare() to verify that the contents of the buffer match
the expected result. This will let us avoid widening the expected
result and enable us to display the offset of the first mismatched
character (if any) in the rw_assert() diagnostic message.

Lastly, in the test_cases array, I think the order of data should
match the order of function arguments (i.e., controlled sequence,
n, the second argument to copy, and pos, the third argument which
should be -1 for the test cases exercising the two-argument overload
of the member function).

Oh, and one minor nit :) If you could move the indented #ifndef
reprocessor directives to the left margin that would be great :)

Thanks!
Martin

Mime
View raw message