On 18 January 2016 at 19:57, Aaryaman Vasishta
<jem456.vasishta(a)gmail.com> wrote:
> + char *file = NULL;
Why do you initialize this to NULL?
> + BOOL check;
> +
> +
> + hr = Direct3DRMCreate(&d3drm1);
The extra empty line is weird. Is that intentional?
> + file = create_bitmap(1, 1, TRUE);
> + hr = IDirect3DRM_LoadTexture(d3drm1, file, &texture1);
I think "file" is a bad name. I'd expect that to be a file handle or
descriptor, not a string.
> + ok(SUCCEEDED(hr), "Failed to load texture (hr = %x).\n", hr);
> + ok(SUCCEEDED(hr), "Cannot get IDirect3DRMTexture interface (hr = %x)\n", hr);
This looks like it was leftover from somewhere, but in either case it
doesn't test what the message says it's testing.
It's fairly harmless here, but %x is a bad format in most cases. E.g.,
is "1000" decimal 4096 or decimal 1000? Just use %#x. Ideally you'd
also use the same message format as the other D3D tests.
> + check = DeleteFileA(file);
> + ok(check, "Cannot delete image stored in %s (error = %d).\n", file, GetLastError());
> +}
You're leaking "file".