C testing framework. ASCII/Unicode portable version
apa3a at yahoo.com
Tue Jan 22 10:24:33 CST 2002
--- "Dimitrie O. Paun" <dimi at cs.toronto.edu> wrote:
> I have a number of observations:
> -- we should rename wt_helper.h to something like
I'm open for suggestions. I used this name to avoid
name clashes with Perl winetest framework. BTW, wt =
I'd prefer more recognizable name than "test.h".
> -- maybe we should not use main as the main
> but rather something like 'test'. This way we
> provide the main and have another level of
> indirection which can be put to good use.
> (like we should not need the explicit
> -- another thing we can do is to have the tests in
> functions named testXXX. This way we can use nm
> to generate the main function, and so we can
> a bunch of tests in the same executable.
Whether we'll use these ideas depends on architecture
of the whole testing process.
> -- wt_helper.h should include tchar.h, and
> _T to call a function to transform the string
> Unicode if need be. This way we get rid of the
> compiler requirement.
Using function instead of macro won't work in all the
cases, e.g. in this one:
_TCHAR buf = _T("foo")
> -- I still think my teststr() idea is worth doing.
> Do you want an implementation?
I like the idea, but do not need such Unicode strings
generator for my test :-) Can you implement it with a
small real test which shows advantages of teststr()?
> -- if TCHAR is not available, we should
> typedef _TCHAR TCHAR
> in wine/tests.h
Yes, we'll be able to do this. I came across opposite
situation. Cygwin has TCHAR, but not _TCHAR. Already
submitted bug report to cygwin project.
AFAICS TCHAR and _TCHAR have almost the same
MBCS Survival Guide at
"For ANSI conformance, the "official" type is _TCHAR.
In practice, either TCHAR or _TCHAR is acceptable."
> -- Why do you do:
> Files are ASCII, no need to _T them.
__FILE__is a macro which is expanded to file name. I
use _T with it for simplicity - to have the same
ASCII/Unicode mode processing for everything.
Otherwise I'd have to explicitely call ASCII functions
for file names processing, probably do A->W
> More comments later :)
Look forward :-)
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
More information about the wine-devel