winapi: new tool winapi_test for generating tests

Patrik Stridvall ps at leissner.se
Thu Sep 26 10:55:04 CDT 2002


As we discussed so time ago it would be
nice to have automatically generated tests for testing
things like packing of data structures.

So here a a new tools winapi_test that can do that.
OK. It is a little kludgy but its is a start.

My new C parser tries to calculate the correct packing
so it is also a test that the new C parser is correct.

However in order for this test to be rely useful the
C testing framework need to be ported to Windows.
I'm unsure of the status of this.

Anyway, the packing test that is generates is controlled
by the file tools/winapi/test.dat. I have currently
only added a test for some structures in winbase.h
that belongs to kernel.

So what do you think?

If you approved the patch will add tests for the other
DLLs in a similar manner.

PS. Should the generated tests be prefixed generated_
as I have done or should we perhaps have a new directory
generated or do you prefer it some other way?

--8<---

*** tests

* dlls/kernel/tests/.cvsignore,
  dlls/kernel/tests/Makefile.in,
  dlls/kernel/tests/generated_pack.c:
Added new autogenerated test for data structure packing.

*** winapi

* tools/winapi/Makefile.in,
  tools/winapi/c_parser.pm,
  tools/winapi/c_type.pm,
  tools/winapi/tests.dat,
  tools/winapi/tests.pm,
  tools/winapi/winapi.pm,
  tools/winapi/winapi_cleanup,
  tools/winapi/winapi_extract,
  tools/winapi/winapi_test,
  tools/winapi/winapi_test_options.pm,
  tools/winapi_check/modules.pm,
  tools/winapi_check/winapi_function.pm:
- Added a new tool winapi_test for generating tests.
- Added a data structure packing test to winapi_test.
- Reorganized and optimized a few things.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winapi.tar
Type: application/octet-stream
Size: 20480 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20020926/7eca9360/winapi.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winapi.diff
Type: application/octet-stream
Size: 16271 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20020926/7eca9360/winapi-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tests.diff
Type: application/octet-stream
Size: 948 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20020926/7eca9360/tests.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tests.tar
Type: application/octet-stream
Size: 61440 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20020926/7eca9360/tests-0001.obj


More information about the wine-patches mailing list