diff --git a/configure b/configure index 7b3b31dd75a..e19bf2ba3b5 100755 --- a/configure +++ b/configure @@ -15356,6 +15356,7 @@ wine_fn_config_dll appwiz.cpl enable_appwiz_cpl po wine_fn_config_dll atl enable_atl implib wine_fn_config_test dlls/atl/tests atl_test wine_fn_config_dll atl100 enable_atl100 implib +wine_fn_config_test dlls/atl100/tests atl100_test wine_fn_config_dll atl80 enable_atl80 wine_fn_config_dll authz enable_authz wine_fn_config_dll avicap32 enable_avicap32 implib diff --git a/configure.ac b/configure.ac index 3a07cbfedc6..003637601fb 100644 --- a/configure.ac +++ b/configure.ac @@ -2535,6 +2535,7 @@ WINE_CONFIG_DLL(appwiz.cpl,,[po]) WINE_CONFIG_DLL(atl,,[implib]) WINE_CONFIG_TEST(dlls/atl/tests) WINE_CONFIG_DLL(atl100,,[implib]) +WINE_CONFIG_TEST(dlls/atl100/tests) WINE_CONFIG_DLL(atl80) WINE_CONFIG_DLL(authz) WINE_CONFIG_DLL(avicap32,,[implib]) diff --git a/dlls/atl100/tests/Makefile.in b/dlls/atl100/tests/Makefile.in new file mode 100644 index 00000000000..4230bad7d32 --- /dev/null +++ b/dlls/atl100/tests/Makefile.in @@ -0,0 +1,8 @@ +TESTDLL = atl100.dll +IMPORTS = ole32 atl100 +EXTRADEFS = -D_ATL_VER=_ATL_VER_100 + +C_SRCS = \ + atl.c + +@MAKE_TEST_RULES@ diff --git a/dlls/atl100/tests/atl.c b/dlls/atl100/tests/atl.c new file mode 100644 index 00000000000..43d9bd55c3e --- /dev/null +++ b/dlls/atl100/tests/atl.c @@ -0,0 +1,63 @@ +/* + * Copyright 2012 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#define COBJMACROS + +#include + +#include + +static void test_winmodule(void) +{ + _ATL_WIN_MODULE winmod; + HRESULT hres; + + winmod.cbSize = 0xdeadbeef; + hres = AtlWinModuleInit(&winmod); + ok(hres == E_INVALIDARG, "AtlWinModuleInit failed: %08x\n", hres); + + winmod.cbSize = sizeof(winmod); + winmod.m_pCreateWndList = (void*)0xdeadbeef; + winmod.m_csWindowCreate.LockCount = 0xdeadbeef; + winmod.m_rgWindowClassAtoms.m_aT = (void*)0xdeadbeef; + winmod.m_rgWindowClassAtoms.m_nSize = 0xdeadbeef; + winmod.m_rgWindowClassAtoms.m_nAllocSize = 0xdeadbeef; + hres = AtlWinModuleInit(&winmod); + ok(hres == S_OK, "AtlWinModuleInit failed: %08x\n", hres); + ok(!winmod.m_pCreateWndList, "winmod.m_pCreateWndList = %p\n", winmod.m_pCreateWndList); + ok(winmod.m_csWindowCreate.LockCount == -1, "winmod.m_csWindowCreate.LockCount = %d\n", + winmod.m_csWindowCreate.LockCount); + ok(winmod.m_rgWindowClassAtoms.m_aT == (void*)0xdeadbeef, "winmod.m_rgWindowClassAtoms.m_aT = %p\n", + winmod.m_rgWindowClassAtoms.m_aT); + ok(winmod.m_rgWindowClassAtoms.m_nSize == 0xdeadbeef, "winmod.m_rgWindowClassAtoms.m_nSize = %d\n", + winmod.m_rgWindowClassAtoms.m_nSize); + ok(winmod.m_rgWindowClassAtoms.m_nAllocSize == 0xdeadbeef, "winmod.m_rgWindowClassAtoms.m_nAllocSize = %d\n", + winmod.m_rgWindowClassAtoms.m_nAllocSize); +} + +START_TEST(atl) +{ + CoInitialize(NULL); + + test_winmodule(); + + CoUninitialize(); +}