Re: urlmon: CreateUri should return E_INVALIDARG for NULL args.

2010-05-13 Thread Thomas Mullaly
On Thu, May 13, 2010 at 3:41 AM, Paul Vriens wrote:
>
> I don't think these comments are needed as the same is shown in the tests
> below (I was actually triggered by the wrong spelling of 'receives' btw).
>

Whoops. I always manage to misspell receive somehow...

I'll submit a new patch here shortly.

-- 
Thomas Mullaly
thomas.mull...@gmail.com



Re: urlmon: CreateUri should return E_INVALIDARG for NULL args.

2010-05-13 Thread Paul Vriens

On 05/13/2010 04:49 AM, Thomas Mullaly wrote:

@@ -75,6 +77,22 @@ static void test_CreateUri_InvalidFlags(void) {
  }
  }

+/*
+ * CreateUri returns E_INVALIDARG if the IUri it recieves is NULL.
+ * CreateUri returns E_INVALIDARG if the uri string is NULL and sets the IUri 
to NULL.
+ */


I don't think these comments are needed as the same is shown in the 
tests below (I was actually triggered by the wrong spelling of 
'receives' btw).



+static void test_CreateUri_InvalidArgs(void) {
+HRESULT hr;
+IUri*uri = (void*) 0xdeadbeef;
+
+hr = pCreateUri(http_urlW, 0, 0, NULL);
+ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 
0x%08x\n", hr, E_INVALIDARG);
+
+hr = pCreateUri(NULL, 0, 0,&uri);
+ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 
0x%08x\n", hr, E_INVALIDARG);
+ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p 
instead\n", uri);
+}


--
Cheers,

Paul.