[2/3] scrrun: Implement IDictionary RemoveAll
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Fri Oct 5 04:31:57 CDT 2012
Hi,
Changelog:
scrrun: Implement IDictionary RemoveAll
Best Regards
Alistair Leslie-Hughes
-------------- next part --------------
>From 44caf21decf6e3f9ceb2ed0b2887e14989d3c12f Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Fri, 5 Oct 2012 11:29:55 +1000
Subject: [PATCH] Implement IDictionary RemoveAll
To: wine-patches <wine-patches at winehq.org>
---
dlls/scrrun/dictionary.c | 6 ++++--
dlls/scrrun/tests/dictionary.c | 7 +++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c
index 3e892ee..fbd007e 100644
--- a/dlls/scrrun/dictionary.c
+++ b/dlls/scrrun/dictionary.c
@@ -327,9 +327,11 @@ static HRESULT WINAPI dictionary_RemoveAll(IDictionary *iface)
{
dictionary *This = impl_from_IDictionary(iface);
- FIXME("(%p)->()\n", This);
+ TRACE("(%p)->()\n", This);
- return E_NOTIMPL;
+ remove_all_items(This);
+
+ return S_OK;
}
static HRESULT WINAPI dictionary_put_CompareMode(IDictionary *iface, CompareMethod pcomp)
diff --git a/dlls/scrrun/tests/dictionary.c b/dlls/scrrun/tests/dictionary.c
index 7df76e9..d32d8a1 100644
--- a/dlls/scrrun/tests/dictionary.c
+++ b/dlls/scrrun/tests/dictionary.c
@@ -96,6 +96,13 @@ static void test_interfaces(void)
ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
ok(count == 1, "got %d, expected 1\n", count);
+ hr = IDictionary_RemoveAll(dict);
+ ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+
+ hr = IDictionary_get_Count(dict, &count);
+ ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(count == 0, "got %d, expected 0\n", count);
+
IDictionary_Release(dict);
IDispatch_Release(disp);
}
--
1.7.9.5
More information about the wine-patches
mailing list