C testing framework. ASCII/Unicode portable version

Dmitry Timoshkov dmitry at baikal.ru
Mon Jan 21 21:43:12 CST 2002


"Andriy Palamarchuk" <apa3a at yahoo.com> wrote:

> Attached version of the C testing framework, which is
> implemented with using TCHAR.H macros, so it is
> portable between ASCII and Unicode platforms. Also
> implemented test which can be used to test ASCII and
> Unicode API.

You probably want to know that in order to use TCHAR.H
you need either gcc >= 2.96, or mess with converting
4-byte unicode strings to 2-byte and vice versa. I would
prefer to avoid the whole bunch of confusion with all that
mess and use straight CHAR and WCHAR types. Yes, it will
mean to have separate tests for ANSI and Unicode and will
require slightly more work to type
WCHAR str[] = {'u','n','i','c','o','d','e',0};
instead of a simple
WCHAR str[] = L"unicode";

Please take into account the fact that everyone, who uses TCHAR,
actually needs to think twice in any case. TCHAR makes it only
harder to understand, what really happens.

-- 
Dmitry.







More information about the wine-devel mailing list