Hi,
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 */)".
No!
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".
Regards, Jörg Höhle
Le vendredi 08 avril 2011 13:05:18, Joerg-Cyril.Hoehle@t-systems.com a écrit :
It means tests never fail on native, which renders the test useless.
That's exactly my point. I started writing a mail to describe just what you said, with the extra data that on wine, test will verify something decided upon test writing. It just won't be compared to any windows version.
I'm (somehow) glad to hear it's not the only test which has problems with just NT.
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'll check what error this triggers on NT, and fallback on the code you wrote above. As I don't have access to an NT machine, I sent an account request for the test bot.
Regards,