Module: wine Branch: master Commit: a2ae7a2b3d603cdd8e613ed15fc1bbc5c7520e7a URL: http://source.winehq.org/git/wine.git/?a=commit;h=a2ae7a2b3d603cdd8e613ed15f...
Author: Reece Dunn msclrhd@gmail.com Date: Mon Mar 1 22:21:40 2010 +0000
hlink/tests: Add more tests to show a difference in string and moniker hlinks.
---
dlls/hlink/tests/hlink.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/hlink/tests/hlink.c b/dlls/hlink/tests/hlink.c index 1802196..30b06f0 100644 --- a/dlls/hlink/tests/hlink.c +++ b/dlls/hlink/tests/hlink.c @@ -135,6 +135,13 @@ static void test_reference(void) ok(r == S_OK, "failed\n"); CoTaskMemFree(str);
+ r = IHlink_GetStringReference(lnk, -1, NULL, NULL); + ok(r == S_OK, "failed, r=%08x\n", r); + + r = IHlink_GetStringReference(lnk, -1, NULL, &str); + ok(r == S_OK, "failed, r=%08x\n", r); + ok(str == NULL, "string should be null\n"); + r = IHlink_GetStringReference(lnk, HLINKGETREF_DEFAULT, &str, NULL); ok(r == S_OK, "failed\n"); ok(!lstrcmpW(str, url2), "url wrong\n"); @@ -1212,6 +1219,18 @@ static void test_HlinkGetSetStringReference(void) CoTaskMemFree(fnd_tgt); CoTaskMemFree(fnd_loc);
+ hres = IHlink_GetStringReference(link, -1, &fnd_tgt, NULL); + todo_wine ok(hres == E_FAIL, "IHlink_GetStringReference should have failed " + "with E_FAIL (0x%08x), instead: 0x%08x\n", E_FAIL, hres); + CoTaskMemFree(fnd_tgt); + + hres = IHlink_GetStringReference(link, -1, NULL, NULL); + ok(hres == S_OK, "failed, hres=%08x\n", hres); + + hres = IHlink_GetStringReference(link, -1, NULL, &fnd_loc); + ok(hres == S_OK, "failed, hres=%08x\n", hres); + CoTaskMemFree(fnd_loc); + hres = IHlink_GetStringReference(link, -1, &fnd_tgt, &fnd_loc); todo_wine ok(hres == E_FAIL, "IHlink_GetStringReference should have failed " "with E_FAIL (0x%08x), instead: 0x%08x\n", E_FAIL, hres);