Nikolay Sivov : oleaut32/tests: Basic test for invalid arguments in LoadTypeLib/LoadTypeLibEx.
Alexandre Julliard
julliard at winehq.org
Wed Jun 7 16:24:08 CDT 2017
Module: wine
Branch: master
Commit: 19b944d49c28d1d8bb285621dc923cc5e7aef707
URL: http://source.winehq.org/git/wine.git/?a=commit;h=19b944d49c28d1d8bb285621dc923cc5e7aef707
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Jun 7 00:29:38 2017 +0300
oleaut32/tests: Basic test for invalid arguments in LoadTypeLib/LoadTypeLibEx.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/oleaut32/tests/typelib.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c
index 6d0585a..d8ff310 100644
--- a/dlls/oleaut32/tests/typelib.c
+++ b/dlls/oleaut32/tests/typelib.c
@@ -4996,6 +4996,22 @@ static void test_LoadTypeLib(void)
hres = LoadTypeLib(kernel32_dllW, &tl);
ok(hres == TYPE_E_CANTLOADLIBRARY, "LoadTypeLib returned: %08x, expected TYPE_E_CANTLOADLIBRARY\n", hres);
+
+ hres = LoadTypeLib(NULL, NULL);
+ ok(hres == E_INVALIDARG, "Got %#x.\n", hres);
+
+ tl = (void *)0xdeadbeef;
+ hres = LoadTypeLib(NULL, &tl);
+ ok(hres == E_INVALIDARG, "Got %#x.\n", hres);
+ ok(tl == (void *)0xdeadbeef, "Got %p.\n", tl);
+
+ hres = LoadTypeLibEx(NULL, REGKIND_NONE, NULL);
+ ok(hres == E_INVALIDARG, "Got %#x.\n", hres);
+
+ tl = (void *)0xdeadbeef;
+ hres = LoadTypeLibEx(NULL, REGKIND_NONE, &tl);
+ ok(hres == E_INVALIDARG, "Got %#x.\n", hres);
+ ok(tl == (void *)0xdeadbeef, "Got %p.\n", tl);
}
static void test_SetVarHelpContext(void)
More information about the wine-cvs
mailing list