update to regression testing framework
Francois Gouget
fgouget at free.fr
Wed Apr 10 12:22:51 CDT 2002
On Wed, 10 Apr 2002, Paul Millar wrote:
> Hi,
>
> The attached patch changes the way the regression testing works slightly.
> The default behaviour should be the same, but there's some optional
> "enhancements":
>
> o If you set WINETEST_REPORT_SUCCESS environment variable to 1,
> successful tests are reported as well as unsuccessful ones.
I don't know if this is really useful but why not.
> o If you set WINETEST_CONTINUE_ON_FAIL environment variable to 1, "make
> test" will run all tests from all modules, rather than failing on the
> first failing module.
This looks like it is equivalent to make -k.
> o The commands "named_ok", "set_name" and "unset_name" now exist (in C
> and Perl). You can use these to specify a name for tests either
> individually (via named_ok) or for a region (via set_name and
> unset_name)
I'm not too sure about these:
-ok( ($atom >= 0xc000) && ($atom <= 0xffff) && !defined($wine::err) );
+named_ok( "Adding atom \"$name\" via GlobalAddAtomA()", ($atom >=
0xc000) && ($atom <= 0xffff) && !defined($wine::err) );
Did you know that you can also do:
ok( ($atom >= 0xc000) && ($atom <= 0xffff) && !defined($wine::err),
"could not find atom $name, atom=$atom, err=$wine::err" );
This seems pretty similar and works in perl and C. Also about the
following:
+set_name( "Checking GlobalAddAtom[AW](i) i < 0xbffff");
for ($i = 0x0001; ($i <= 0xbfff); $i += 27)
{
ok( GlobalAddAtomA($i) && !defined($wine::err) );
ok( GlobalAddAtomW($i) && !defined($wine::err) );
}
+unset_name();
would be better as:
named_tests( "Checking GlobalAddAtom[AW](i) i < 0xbffff") {
for ($i = 0x0001; ($i <= 0xbfff); $i += 27)
{
ok( GlobalAddAtomA($i) && !defined($wine::err) );
ok( GlobalAddAtomW($i) && !defined($wine::err) );
}
}
This way one would not accidentally forget to unset the name. But I am
not sure it adds that much to:
trace( "Checking GlobalAddAtom[AW](i) i < 0xbffff");
for ($i = 0x0001; ($i <= 0xbfff); $i += 27)
{
ok( GlobalAddAtomA($i) && !defined($wine::err) );
ok( GlobalAddAtomW($i) && !defined($wine::err) );
}
Traces are not printed by default but will be if you run the test as:
runtest -v ... instead of runtest -q ...
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
It really galls me that most of the computer power in the world
is wasted on screen savers.
Chris Caldwell from the GIMPS project
http://www.mersenne.org/prime.htm
More information about the wine-devel
mailing list