stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: svn commit: r395448 - in /incubator/stdcxx/trunk/tests: include/21.strings.h src/21.strings.cpp
Date Thu, 20 Apr 2006 16:02:30 GMT
Anton Pevtsov wrote:
> Martin, it is a great idea to move all "common places" from strings
> tests to the test driver.
> I think it is possible to have only main and method-specific test
> functions (i.e. code with method calls), and test cases arrays
> declaration in each test.

Yes, that's precisely the direction I'm heading with this :)

> Now I've implemented tests for find methods, substr, operator += and
> compare (they are not on svn, but they are ready). 
> I'll modify them using the 21.strings header, ok?

I meant to give you a heads up about the changes I committed last
night but ran out of time. Sorry about that. I started with just
the two tests to get a feel for how hard it would be without
spending too much time on it (since I'm expecting to be making
more changes) but modifying other tests along the same lines as
append and assign is a good idea, just as long as you are prepared
to make more changes as we move more boilerplate code into the new
header and .cpp file (as you suggest above).

> And I have several questions:
> 1) Does the TestCase structure contain enough members to test all
> methods? For some of them off1, size1, off2 and size2 are required
> simultaneously. Also the result may be an integer.

No, it doesn't, not yet. It will need to be augmented to take
this into account.

> 2) May be it would be useful to include the "const char* method_name"
> member into Test structure to eliminate additional code from the format
> method? For example, each test may declare its name as a static
> characters array in the beginning and initialize the method_name
> structure with pointer to it. Or even add const char* method_name
> directly into the StringMembers structure.

Yes, I have been thinking about what else should go in there.
Probably not the method_name (to avoid data bloat) but something
like it might be a good idea (e.g., the MemberFunction enum that
the formatter would map into the function name and signature).

> 3) The "#define _RWSTD_TEST_SRC" defintion seems to be missed in the
> 21.string.cpp, isn't it?

Yes, thanks. I'll fix it today.


View raw message