On Tue Aug 23 12:04:26 2022 +0000, Jacek Caban wrote:
A nice way to test generated files is to use it somehow. For header files, it's easy to achieve by writing a C file that #includes it, and maybe uses it in some interesting ways. For typelibs, it requires loading and analyzing or using them. We already have that in oleaut32 tests. The only thing we don't have is easy validating that data against midl, but, at least for typelibs, it could be done by extending existing tests. For testing parser success it's as easy as adding the interesting bits to some IDL file in tests, it's not a new ability that we'd gain from PE midl.exe. That leaves only parser failures and I don't find it a good enough justification, especially when there are other ways to achieve that.
It's not because including the C file works in a test or when used to build Wine that it's compatible with the one midl would generate. We compile all the tests with widl, so we only test that these files are usable in our tests, and only to the extend of how the tests and Wine code are using them.
We can and probably already have differences that makes midl generated headers incompatible with widl generated ones. We also don't test anything about the C++ generated code, which has been and may still be broken, and I don't think we will add C++ compilation support just for that.
I honestly find it quite hard to have to argue for adding more tests in Wine, especially to an area that has current none, and to which contributing has been historically very hard in large part because of the difficulty to foresee the effect of any change. If that's how it is I won't insist, but I'm also probably not going to be very eager to work on widl either.