Christian Costa <
titan.costa@gmail.com> writes:
> + SetLastError(0xdeadbeef);
> + n = MapWindowPoints(wnd, NULL, NULL, 0);
> + err = GetLastError();
> + ok(n == ((window_rect.top << 16) | window_rect.left), "Got %x (%d, %d), expected %x (%d, %d)\n",
> + n, (n << 16) >> 16, n >> 16, window_rect.left, window_rect.top, (window_rect.top << 16) | window_rect.left);
> + ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);
> +
> + SetLastError(0xdeadbeef);
> + n = MapWindowPoints(NULL, wnd, NULL, 0);
> + err = GetLastError();
> + ok(n == ((-window_rect.top << 16) | (-window_rect.left & 0xffff)), "Got %x (%d, %d), expected %x (%d, %d)\n",
> + n, (n << 16) >> 16, n >> 16, (-window_rect.top << 16) | (-window_rect.left & 0xffff), -window_rect.left, -window_rect.top);
> + ok(err == 0xdeadbeef, "Got %x, expected %x\n", err, 0xdeadbeef);
Testing last error on success is not useful. Also please use MAKELONG