W dniu 16.07.2010 19:59, Reece Dunn pisze:
Use broken() to denote the administrator case --
ok(hr == S_OK || broken(hr == E_ACCESSDENIED) /* non-Admin user
*/, IGameExplorer_AddGame(...));
This means that E_ACCESSDENIED is a valid case on Windows, but not on Wine.
- Reece
Yes, I know how broken() works, but there are two problems with it:
First problem, is that this is not what I want to do. I did not wrote about it in previous mail, but I do a little more than only calling this procedure. In details, this routine writes some data into registry and after call I check these data. These data depends on the parameter I described before (installScope). The problem is that I can run these tests on Windows, manually selecting permission level (and they behave as I described before), and they behave as I expected (I described how this routine behaves on several cases). I hope that making it able to run on Windows will let me to be sure that data produced by my library are identical like this created by Windows' one.
Second problem is that I cannot simply compare result with some ACCESSDENIED error code, cause this routine simply does not return it. Instead, when the "access denied" occurs, it returns E_FAIL, as in almost every other problem. And I cannot do broken(hr==E_FAIL), because then test will be always passed on Windows, even if completely other problem occurs. So, even if I give up with checking data, broken() won't work here.