On Fri, Apr 3, 2015 at 2:10 AM, Stefan D��singer <stefandoesinger@gmail.com> wrote:-----BEGIN PGP SIGNED MESSAGE-----I've tried this and it works too. I'll use this on the patch try, and along with it also keep vtable_todo as some tests won't work on wine until they're fixed.
Hash: SHA1
Am 2015-04-02 um 18:36 schrieb Aaryaman Vasishta:
>�� �� �� REFIID iid;
>�� �� �� REFIID refcount_iid;
> +�� �� REFIID vtable_iid;
>�� �� �� HRESULT hr;
>�� �� �� BOOL refcount_todo;
> +�� �� BOOL vtable_equal;
> +�� �� BOOL vtable_todo;
>�� };
I think this is more complicated than it needs to be. All you should
need is the vtable_iid field. Then, in the inner loop do something like
if (IsEqualGUID(tests[i].vtable_iid, tests[j].vtable_iid))
�� �� ok(iface1 == iface2, ...);
else
�� �� ok(iface1 != iface2, ...);
I may be missing something though.��
If you want to compare two Win32 BOOLs for equality you have to be careful:
BOOL a = 1;
BOOL b = 2;
if (a)
�� ��printf("this is true.\n");
if (b)
�� ��printf("this is also true.\n");
if (a == b)
�� ��printf("oops, this is false.\n");
For something like that you can use
if (!a == !b)
�� �� printf("yay, this is true!\n");
IsEqualGUID(a, b) is defined as !memcmp(a, b, sizeof(GUID)), so
IsEqualGUID() == (ptr1 == ptr2) should be OK though.
I'll keep this in mind the next time I come across it. Thank You!jam