stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Zhong" <>
Subject RE: rewrite of 22.locale.ctype test
Date Fri, 06 Apr 2007 21:13:54 GMT
Narrow uses widen as input to test on with each different locales. I
assume tolower does the same.  I think separating narrow.widen into two
separate test is not the most efficient method.

Yu (Scott) Zhong

-----Original Message-----
From: Martin Sebor [] 
Sent: Friday, April 06, 2007 1:54 PM
Subject: Re: rewrite of 22.locale.ctype test

Scott Zhong wrote:
> As I had discuss with you Martin, rewrite the 22.locale.ctype test
> 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
> 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