stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: rewrite of 22.locale.ctype test
Date Fri, 06 Apr 2007 19:53:42 GMT
Scott Zhong wrote:
> As I had discuss with you Martin, rewrite the 22.locale.ctype test into
> smaller subtests with both char and wchar_t:

I'm not sure exactly what the difference is between test_is() and
test_is_ch() but the names are close enough that the tests should
probably be done in the same program. (The names of the tests are
chosen to match clauses in the standard wherever such clauses

> 22.locale.ctype.toupper.tolower
> 22.locale.ctype.narrow.widen
> 22.locale.ctype.scan

This looks reasonable, except that I would also split up toupper
and tolower, and narrow and widen into tests of their own. Each
test can exercise both char and wchar_t as we usually do (look
at the string tests for examples). There should be a command
line option to enable/disable each specialization.

If there's a lot of code that all the tests end up having in
common it should go in a common header (perhaps rw_ctype.h)
and source file (e.g., tests/src/ctype.cpp).

> Or would you like to further separate char and wchar_t into two separate
> test? E.g. and

This wouldn't be a bad idea if we were starting to write a new
test suite but since none of our other tests is structured this
way I wouldn't do it for ctype either.


View raw message