create process test (for review)

Francois Gouget fgouget at free.fr
Tue Apr 2 16:12:52 CST 2002


On Mon, 1 Apr 2002, Eric Pouech wrote:

> as already discussed a bit, here's a first shot at testing CreateProcess
> patch is made of two parts:
> - extension to existing C test framework to pass argc/argv to any test
> function
> - the test itself

   Just a minor point, but maybe you could replace:

    ok(cmpChildInt("StartupInfoA", "cb", startup.cb), NULL);

with

    ok(cmpChildInt("StartupInfoA", "cb", startup.cb), "StartupInfoA.cb");

or even:

#define okChildInt(section,key,expected) \
    do { \
        int res=GetPrivateProfileIntA(section,key,!expected,resfile); \
        ok(res==expected, section key ": got %d instead of %d", \
            res, expected); \
    } while (0)

...


    okChildInt("StartupInfoA", "cb", startup.cb);

The nice thing is that if something goes wrong, all the relevant
information is printed. I found that this makes it easier when
developping a test.

Same thing for cmpChildString, etc.

--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
           Demander si un ordinateur peut penser revient à demander
                          si un sous-marin peut nager.




More information about the wine-devel mailing list