=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: shell32/tests: Add a test for binding a different AutoComplete object to the same edit control.

Alexandre Julliard julliard at winehq.org
Thu Aug 30 16:34:42 CDT 2018


Module: wine
Branch: master
Commit: 6f3e83f7fc66fa3a66a0acdc990aaab572a8d283
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6f3e83f7fc66fa3a66a0acdc990aaab572a8d283

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Mon Aug 27 20:10:47 2018 +0300

shell32/tests: Add a test for binding a different AutoComplete object to the same edit control.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/tests/autocomplete.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dlls/shell32/tests/autocomplete.c b/dlls/shell32/tests/autocomplete.c
index 1c51e51..3c8de88 100644
--- a/dlls/shell32/tests/autocomplete.c
+++ b/dlls/shell32/tests/autocomplete.c
@@ -141,7 +141,7 @@ if (0)
 static IAutoComplete *test_init(void)
 {
     HRESULT r;
-    IAutoComplete *ac;
+    IAutoComplete *ac, *ac2;
     IUnknown *acSource;
     LONG_PTR user_data;
 
@@ -176,6 +176,15 @@ static IAutoComplete *test_init(void)
     user_data = GetWindowLongPtrA(hEdit, GWLP_USERDATA);
     ok(user_data == 0, "Expected the edit control user data to be zero\n");
 
+    /* bind a different object to the same edit control */
+    r = CoCreateInstance(&CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER,
+                         &IID_IAutoComplete, (LPVOID*)&ac2);
+    ok(r == S_OK, "no IID_IAutoComplete (0x%08x)\n", r);
+
+    r = IAutoComplete_Init(ac2, hEdit, acSource, NULL, NULL);
+    ok(r == S_OK, "Init returned 0x%08x\n", r);
+    IAutoComplete_Release(ac2);
+
     IUnknown_Release(acSource);
 
     return ac;




More information about the wine-cvs mailing list