ntdll: Remove more path trailing chars.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Fri Apr 8 06:05:18 CDT 2011


Juan Lang wrote:
>Vincent Pelletier wrote:
>> Those tests are boolean, so I doubt an "ok(pass || fail /* NT4 */)" makes any
>> sense.
>> I saw that it is discouraged (forbidden ?) to depend on OS version in tests,
>> so I will avoid that path unless asked to follow it.
>You'd want to use "ok(pass || broken(fail /* NT4 */)".


Juan, while you generally give excellent advice, please think again
about that one suggestion.  It means tests never fail on native,
which renders the test useless.

What I've been doing several times is to write a detector and have
the tests expect the specific NT/non-NT value.
static BOOL TrueButNT = TRUE;

Don't query OS version!  Instead, the first test that sees the
difference in behaviour does this:

ok(rc == DO || broken(rc == DONT /* NT */), "bla\n");
TrueButNT = (rc==DONT) ? FALSE : TRUE;

All later tests use
ok(rc == TrueButNT, "bla2\n");

It even works with todo_wine.  Any other means to detect NT *that is
relevant for your test* is fine, i.e. don't query the DLL version or
use some function outside of your test domain.
Typical detectors are different GetLastError() values.

I call this "coherence testing".

	Jörg Höhle

More information about the wine-devel mailing list