Am 08.08.2012 16:27, schrieb Dan Kegel: > Testing vcomp100 does work, but I shouldn't need to > do that until there's some vcomp100-specific code. > > msvcr90/tests just adds a manifest, and that works. > >
not sure why this works for msvcr90, maybe just for a minor version? anyway, always vcomp100.dll is installed directly without the need for a manifest, so i'd something like in my attachment (it doesn't work, just an example) -- Best Regards, André Hentschel
commit f046d54ee74e38228613d465377946339746e50e Author: André Hentschel <[email protected]> Date: Sun Aug 5 13:47:30 2012 +0200 vcomp dk diff --git a/configure.ac b/configure.ac index 4bd43d1..da06179 100644 --- a/configure.ac +++ b/configure.ac @@ -2946,7 +2946,8 @@ WINE_CONFIG_TEST(dlls/uxtheme/tests) WINE_CONFIG_DLL(vbscript) WINE_CONFIG_TEST(dlls/vbscript/tests) WINE_CONFIG_DLL(vcomp) -WINE_CONFIG_DLL(vcomp100) +WINE_CONFIG_DLL(vcomp100,,[implib]) +WINE_CONFIG_TEST(dlls/vcomp100/tests) WINE_CONFIG_DLL(vdhcp.vxd,enable_win16) WINE_CONFIG_DLL(vdmdbg,,[implib]) WINE_CONFIG_DLL(ver.dll16,enable_win16) diff --git a/dlls/vcomp100/tests/Makefile.in b/dlls/vcomp100/tests/Makefile.in new file mode 100644 index 0000000..51ccaba --- /dev/null +++ b/dlls/vcomp100/tests/Makefile.in @@ -0,0 +1,11 @@ +TESTDLL = vcomp100.dll +APPMODE = -mno-cygwin +IMPORTS = vcomp100 + +C_SRCS = \ + main.c + +RC_SRCS = \ + vcomp.rc + +@MAKE_TEST_RULES@ diff --git a/dlls/vcomp100/tests/main.c b/dlls/vcomp100/tests/main.c new file mode 100644 index 0000000..8c8f29e --- /dev/null +++ b/dlls/vcomp100/tests/main.c @@ -0,0 +1,93 @@ +/* + * Unit test suite for vcomp functions. + * + * Copyright 2012 Dan Kegel + * Copyright 2012 André Hentschel + * + * 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 "wine/test.h" + +static void (__cdecl *p_omp_set_num_threads)(int); +static int (__cdecl *p_omp_get_max_threads)(void); +static int (__cdecl *p_omp_get_num_threads)(void); +static int (__cdecl *p_omp_get_thread_num)(void); +static int (__cdecl *p_omp_get_num_procs)(void); +static int (__cdecl *p_omp_in_parallel)(void); + +#define SETNOFAIL(x,y) x = (void*)GetProcAddress(vcomp80,y) +#define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) +static BOOL init(void) +{ + HMODULE vcomp80; + + SetLastError(0xdeadbeef); + vcomp80 = LoadLibraryA("vcomp.dll"); + if (!vcomp80) { + win_skip("vcomp.dll not installed (got %d)\n", GetLastError()); + return FALSE; + } + + SET(p_omp_set_num_threads, "omp_set_num_threads"); + SET(p_omp_get_max_threads, "omp_get_max_threads"); + SET(p_omp_get_num_threads, "omp_get_num_threads"); + SET(p_omp_get_thread_num, "omp_get_thread_num"); + SET(p_omp_get_num_procs, "omp_get_num_procs"); + SET(p_omp_in_parallel, "omp_in_parallel"); + return TRUE; +} + +void test_omp_get_num_threads(void) +{ + int nt = p_omp_get_num_threads(); + ok(nt == 1, "omp_get_num_threads() outside parallel was %d, but should be 1\n", nt); +} + +void test_omp_get_max_threads(void) +{ + int mt = p_omp_get_max_threads(); + ok(mt >= 1, "omp_get_max_threads() was %d, but should be at least 1\n", mt); +} + +void test_omp_get_thread_num(void) +{ + int tnum; + tnum = p_omp_get_thread_num(); + ok(tnum == 0, "omp_get_thread_num() outside parallel was %d, but should be 0\n", tnum); +} + +void test_omp_get_num_procs(void) +{ + int nt = p_omp_get_num_procs(); + ok(nt == 1, "omp_get_num_procs() outside parallel was %d, but should be 1\n", nt); +} + +void test_omp_in_parallel(void) +{ + int ip = p_omp_in_parallel(); + ok(ip == 0, "omp_in_parallel() outside parallel was %d, but should be 0\n", ip); +} + +START_TEST(main) +{ + if(!init()) return; + + test_omp_get_num_threads(); + test_omp_get_max_threads(); + test_omp_get_thread_num(); + test_omp_get_num_procs(); + test_omp_in_parallel(); +} diff --git a/dlls/vcomp100/tests/vcomp.manifest b/dlls/vcomp100/tests/vcomp.manifest new file mode 100644 index 0000000..954faa8 --- /dev/null +++ b/dlls/vcomp100/tests/vcomp.manifest @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <assemblyIdentity + type="win32" + name="Wine.vcomp.Test" + version="1.0.0.0" + processorArchitecture="*" + /> +<description>Wine vcomp test suite</description> +<dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="microsoft.vc80.crt" + version="8.0.50727.762" + processorArchitecture="*" + publicKeyToken="1fc8b3b9a1e18e3b" + language="*" + /> +</dependentAssembly> +</dependency> +</assembly> diff --git a/dlls/vcomp100/tests/vcomp.rc b/dlls/vcomp100/tests/vcomp.rc new file mode 100644 index 0000000..4149174 --- /dev/null +++ b/dlls/vcomp100/tests/vcomp.rc @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2012 André Hentschel + * + * 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 "winuser.h" + +/* @makedep: vcomp.manifest */ +1 RT_MANIFEST vcomp.manifest
