"Joshua Thielen" thielen@netprince.net wrote:
Anyhoo, please let me know what you think - are the tests sufficient, too much, not written properly? etc.
First of all, thank you very much Joshua! Really great work!
A couple of comments though:
/* * Special case: NULL lpReturnedString with size > 0 * This causes an application error in win2k. Let's make wine better :) */ IMO it's not very good idea to make some tests succeed under Wine, which clearly crashes under win2k. That would play some bad role in the case of the back porting Wine code to Windows, since some code, internal to Wine, could rely on that forbidden API behaviour.
I also have the following failures under win2k:
Number of bytes read do not match FAIL: c:\result.ini does not match compare1.ini Number of bytes read do not match FAIL: c:\result.ini does not match compare2.ini
Dmitry, thank you for your comments!
IMO it's not very good idea to make some tests succeed under Wine, which clearly crashes under win2k. That would play some bad role in the case of the back porting Wine code to Windows, since some code, internal to Wine, could rely on that forbidden API behaviour.
Ok. I thought that these test cases might be a problem and I wasn't sure what to do with them. I had originally commented these tests out, and then I decided to put them back in.
What do you think about cases 10 and 11 in WritePrivateProfileSection where the section name is [Strange 2]? If this section name is added twice, windows does not replace the section as is expected but instead adds a duplicate [Strange 2] section. I thought this case was interesting, but I wasn't sure if it should be tested in wine.
I also have the following failures under win2k:
Number of bytes read do not match FAIL: c:\result.ini does not match compare1.ini Number of bytes read do not match FAIL: c:\result.ini does not match compare2.ini
I originally wrote the test in windows, but I'm afraid something might have changed when I ported it from windows to wine test code. How do you compile and run the tests under windows?
If you like, you can comment out the lines with DeleteFileA("c:\result.ini") and then comment out either test_WritePrivateProfileString or test_WritePrivateProfileSection from the START_TEST function to see the result.ini that is supposed to match compare1.ini or compare2.ini, respectively.
After looking at the code again (with rested eyes), I think that I might be missing some tests that I intended to put in and I definitely have a few typos. If you see anything else that needs to be added or changed, please let me know.
Thanks again,
Josh
__________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
"Joshua Thielen" joshua_thielen@yahoo.com wrote:
What do you think about cases 10 and 11 in WritePrivateProfileSection where the section name is [Strange 2]? If this section name is added twice, windows does not replace the section as is expected but instead adds a duplicate [Strange 2] section. I thought this case was interesting, but I wasn't sure if it should be tested in wine.
I think your approach is completely valid. Wine regression tests should contain as much as possible various wild tests. You know, Windows applications are very unpredictable beasts :-) due to missing or misleading API documentation.
I also have the following failures under win2k:
Number of bytes read do not match FAIL: c:\result.ini does not match compare1.ini Number of bytes read do not match FAIL: c:\result.ini does not match compare2.ini
I originally wrote the test in windows, but I'm afraid something might have changed when I ported it from windows to wine test code. How do you compile and run the tests under windows?
Using the attached patch. Since I was working on some other tests, I borrowed some code snippets from Wine test suite to not depend on the Wine testing environment and make my tests easily adjustable for Wine.
What I miss in the current Wine test framework are: a) tests, expected to fail under some circumstances b) portable use of structured exception handling to test the cases which might or should crash.
If you like, you can comment out the lines with DeleteFileA("c:\result.ini") and then comment out either test_WritePrivateProfileString or test_WritePrivateProfileSection from the START_TEST function to see the result.ini that is supposed to match compare1.ini or compare2.ini, respectively.
Yes, I cursory looked at them, but haven't enough time yet to find the source of problem.
After looking at the code again (with rested eyes), I think that I might be missing some tests that I intended to put in and I definitely have a few typos. If you see anything else that needs to be added or changed, please let me know.
Sure, when I'll find some more time.