"Dmitry" == Dmitry Timoshkov dmitry@baikal.ru writes:
Dmitry> Hello. Please use this patch instead of the previous one. I'll Dmitry> try to find some time and figure out how to write regression Dmitry> test for this functions.
Please let us know if you find some sensible way to test filesystem functions. What I do now is - export some filesystem tree with SMB(NCP) - import it in Vmware with some drive letter - use the same drive letter in the wine-config for the same filesystem tree
I don't think this solution is very sensible for a more generalized test...
Bye
"Uwe Bonnes" bon@elektron.ikp.physik.tu-darmstadt.de wrote:
Please let us know if you find some sensible way to test filesystem functions. What I do now is
- export some filesystem tree with SMB(NCP)
- import it in Vmware with some drive letter
- use the same drive letter in the wine-config for the same filesystem tree
I don't think this solution is very sensible for a more generalized test...
Well, I thought about very simple test case like this one (in C):
#include <assert.h> #include <string.h> #include <windows.h>
int main(void) { UINT len, len_with_null; char buf[MAX_PATH];
strcpy(buf, "foo"); len_with_null = GetSystemDirectory(buf, 1); assert(strcmp(buf, "foo") == 0);
strcpy(buf, "foo"); len = GetSystemDirectory(buf, len_with_null - 1); assert(len == len_with_null);
strcpy(buf, "foo"); len = GetSystemDirectory(buf, len_with_null); assert(strcmp(buf, "foo") != 0); assert(len == strlen(buf)); assert(len == (len_with_null - 1));
return 0; }
If anybody could provide some hints how to integrate it into the winetest system, I and other people will certainly appreciate it.
"Dmitry" == Dmitry Timoshkov dmitry@baikal.ru writes:
Dmitry> If anybody could provide some hints how to integrate it into the Dmitry> winetest system, I and other people will certainly appreciate Dmitry> it.
GetSystemDirectory seems easier then other filesystemn functions, as you know exactly what to get. Other functions, like GetLongPathname has zillions of possible combinations of dots, slashes and backslashes that complicates things enormous. I think only by comparing test output produced with Wine and Win32 we can see whether Wine behaves right.
Bye
"Uwe Bonnes" bon@elektron.ikp.physik.tu-darmstadt.de wrote:
GetSystemDirectory seems easier then other filesystemn functions, as you know exactly what to get. Other functions, like GetLongPathname has zillions of possible combinations of dots, slashes and backslashes that complicates things enormous. I think only by comparing test output produced with Wine and Win32 we can see whether Wine behaves right.
Exactly. Why just to not hardcode values retrieved from the running the test under Windows and compare them in the test run? To simplify things it should be possible to merge GetLongPathName with CreateFile and CreateDirectory in the single test case. That would give us completely predictable results.
--- Dmitry Timoshkov dmitry@baikal.ru wrote:
Well, I thought about very simple test case like this one (in C):
[...]
If anybody could provide some hints how to integrate it into the winetest system, I and other people will certainly appreciate it.
Dmitry, I changed the your test to use the C testing framework I posted today. The test is attached.
Alexandre, can we start to submit unit tests to CVS?
Thanks, Andriy Palamarchuk
__________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/
"Andriy Palamarchuk" apa3a@yahoo.com wrote:
Dmitry, I changed the your test to use the C testing framework I posted today. The test is attached.
It looks good to me, but we should not forget to test both unicode and ANSI versions of functions. There are two approaches to accomplish this task: 1. Have two separate tests for A and W functions. 2. Have single test without using A or W suffix and choose appropriate test by [not] defining UNICODE before including windows.h.
Does anybody have other suggestions or ideas?
--- Dmitry Timoshkov dmitry@baikal.ru wrote:
Well, I thought about very simple test case like this one (in C):
[...]
If anybody could provide some hints how to integrate it into the winetest system, I and other people will certainly appreciate it.
Dmitry, I changed the your test to use the C testing framework I posted today. The test is attached.
Alexandre, can we start to submit unit tests to CVS?
Thanks, Andriy Palamarchuk
__________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/
__________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/
Andriy Palamarchuk apa3a@yahoo.com writes:
Dmitry, I changed the your test to use the C testing framework I posted today. The test is attached.
Alexandre, can we start to submit unit tests to CVS?
I haven't really finished the stuff I want to do for the C framework, so I won't apply the tests right away; but there shouldn't be major changes, mostly makefiles stuff, so you can submit them now and I'll put them in when I get things working.