stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Pevtsov" <Ant...@moscow.vdiweb.com>
Subject RE: svn commit: r412249 - in /incubator/stdcxx/trunk/tests: include/21.strings.h src/21.strings.cpp
Date Wed, 07 Jun 2006 15:37:11 GMT
Martin, I suggest to move the common to all range overlodas for
different methods code to the 21.strings.h
I think we may have RangeBase class with begin methods and virtual
operator ().
Here are the changes to the tests which use this approach:
http://people.apache.org/~antonp/stdcxx06072006/

The rest of the code in classes which exrcise range methods look similar
too. So it is possible to join them and use the func_id to determine
which of the string methods should be called.
What do you think about this?


Thanks,
Anton Pevtsov

-----Original Message-----
From: Martin Sebor [mailto:sebor@roguewave.com] 
Sent: Wednesday, June 07, 2006 05:52
To: stdcxx-dev@incubator.apache.org
Subject: Re: svn commit: r412249 - in /incubator/stdcxx/trunk/tests:
include/21.strings.h src/21.strings.cpp


sebor@apache.org wrote:
> Author: sebor
> Date: Tue Jun  6 18:45:17 2006
> New Revision: 412249

Anton, as heads up, I believe this change will have the effect of
running all the tests that exercise the range member templates in a loop
iterating over all the IteratorIds hardwired into the driver. We'll need
to implement the same kind of dispatch as I did in 21.string.replace.cpp
to prevent it. I have run out of time today but I'll do it tomorrow
unless you beat me to it.

As usual, comments, suggestions, etc. are welcome :)

Martin

> 
> URL: http://svn.apache.org/viewvc?rev=412249&view=rev
> Log:
> 2006-06-06  Martin Sebor  <sebor@roguewave.com>
> 
> 	* 21.strings.h (IteratorId): New member type of StringIds.
> 	(StringFunc): Added a new data member.
> 	* 21.strings.cpp (_rw_iter_names): New.
> 	(_rw_opt_char_types, ...): Sized based on the corresponding
> 	_rw_xxx_names arrays.
> 	(_rw_sigcat): Used _rw_iter_names in function signatures and
> 	command line option names.
> 	(_rw_argno): Renamed from _rw_uses_alloc and generalized.
> 	(_rw_setvars): Simplified the setting of environment variables
> 	by using the %{paramater!:word} extended directive.
> 	(_rw_run_cases): New helper.
> 	(_rw_run_test): Iterated over all IteratorId's and called
> 	_rw_run_cases.
> 	(_rw_add_toggles): New helper.
> 	(_rw_run_test): Called _rw_add_toggles, installed option
> 	handlers for iterator specializations of member templates.
> 
> Modified:
>     incubator/stdcxx/trunk/tests/include/21.strings.h
>     incubator/stdcxx/trunk/tests/src/21.strings.cpp

Mime
View raw message