C testing framework. ASCII/Unicode portable version

Dimitrie O. Paun dimi at cs.toronto.edu
Tue Jan 22 09:39:50 CST 2002


On Mon, 21 Jan 2002, Andriy Palamarchuk 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.

Cool.

I have a number of observations:
  -- we should rename wt_helper.h to something like
     wine/tests.h
  -- maybe we should not use main as the main funtion,
     but rather something like 'test'. This way we can
     provide the main and have another level of 
     indirection which can be put to good use.
     (like we should not need the explicit end_tests())
  -- 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 put
     a bunch of tests in the same executable.
  -- wt_helper.h should include tchar.h, and redefine
     _T to call a function to transform the string to
     Unicode if need be. This way we get rid of the
     compiler requirement.
  -- I still think my teststr() idea is worth doing.
     Do you want an implementation?
  -- if TCHAR is not available, we should
     typedef _TCHAR TCHAR
     in wine/tests.h
  -- Why do you do:
     _T(__FILE__)
     Files are ASCII, no need to _T them.

More comments later :)     

--
Dimi.





More information about the wine-devel mailing list