The following patch to dlls/gdi/tests/metafile.c
revision 1.3 date: 2004/12/09 11:37:59; author: julliard; state: Exp; lines: +236 -0 Walt Ogburn reuben@ugcs.caltech.edu Added some tests for win-format metafiles.
introduces the following warning:
metafile.c:381: warning: `test_mf_PatternBrush' defined but not used
Should we put #ifdefs around the definition, or enable the following code in the main test function?
/* Crashes under wine: */ /* test_mf_PatternBrush(); */
Another option would be not to make this function static.
Gerald
Le jeu 09/12/2004 à 14:03, Gerald Pfeifer a écrit :
The following patch to dlls/gdi/tests/metafile.c
revision 1.3 date: 2004/12/09 11:37:59; author: julliard; state: Exp; lines: +236 -0 Walt Ogburn reuben@ugcs.caltech.edu Added some tests for win-format metafiles.
introduces the following warning:
metafile.c:381: warning: `test_mf_PatternBrush' defined but not used
Should we put #ifdefs around the definition, or enable the following code in the main test function?
/* Crashes under wine: */ /* test_mf_PatternBrush(); */
Another option would be not to make this function static.
Making it not crash is even better. If we just silence it, it'll get forgotten and won't even be tested on Windows. Truning it into todo_wine() doesn't look practical because of the crash...
IIRC, there are 3 other tests (can't recall in which dll exactly offhand) which are defined but never actually used. I think they are in user32 or gdi.
Vincent
Hi Gerald,
It's commented out because the test currently crashes under Wine. I submitted one patch earlier, but the metafile records weren't the same as the correct Windows values and it didn't get committed. Now that there's a test I'll work on another patch.
- Walter
On Thu, 9 Dec 2004, Gerald Pfeifer wrote:
The following patch to dlls/gdi/tests/metafile.c
revision 1.3 date: 2004/12/09 11:37:59; author: julliard; state: Exp; lines: +236 -0 Walt Ogburn reuben@ugcs.caltech.edu Added some tests for win-format metafiles.
introduces the following warning:
metafile.c:381: warning: `test_mf_PatternBrush' defined but not used
Should we put #ifdefs around the definition, or enable the following code in the main test function?
/* Crashes under wine: */ /* test_mf_PatternBrush(); */
Another option would be not to make this function static.
Gerald
On Thu, 9 Dec 2004, Walt Ogburn wrote:
It's commented out because the test currently crashes under Wine. I submitted one patch earlier, but the metafile records weren't the same as the correct Windows values and it didn't get committed. Now that there's a test I'll work on another patch.
Cool, thanks.
There was also the question on similar warnings, and indeed the following three have remained unaddressed for probably more than half a year:
rtlstr.c:552: warning: `test_RtlUpcaseUnicodeChar' defined but not used rtlstr.c:578: warning: `test_RtlUpcaseUnicodeString' defined but not used rtlstr.c:629: warning: `test_RtlDowncaseUnicodeString' defined but not used
Gerald
On Thu, 9 Dec 2004, Walt Ogburn wrote:
Hi Gerald,
It's commented out because the test currently crashes under Wine. I submitted one patch earlier, but the metafile records weren't the same as the correct Windows values and it didn't get committed. Now that there's a test I'll work on another patch.
Should we have a 'skip_wine()' that would skip the enclosed tests altogether if the platform is Wine?
This way we could at least make sure that the test passes on all Windows platforms which is to compare to the current situation where the test author is probably the only one to have run the test and he probably did not have access to all Windows platforms. skip_wine()' would also provide something to grep for rather than the various workarounds used currently.
One might argue that this would encourage writing tests without fixing Wine but I would argue that the current situation encourages not putting such tests in Wine at all which is even worse.
Francois Gouget fgouget@free.fr writes:
Should we have a 'skip_wine()' that would skip the enclosed tests altogether if the platform is Wine?
This way we could at least make sure that the test passes on all Windows platforms which is to compare to the current situation where the test author is probably the only one to have run the test and he probably did not have access to all Windows platforms. skip_wine()' would also provide something to grep for rather than the various workarounds used currently.
I don't think there are enough cases to make this necessary. Making all tests behave properly can be tricky which is why we have todo_wine, but it's fairly easy to fix the code to at least avoid crashing, so IMO there's no need to a special infrastructure to handle that.