Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- configure | 1 + configure.ac | 1 + dlls/tapi32/tests/Makefile.in | 5 +++ dlls/tapi32/tests/tapi.c | 62 +++++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 dlls/tapi32/tests/Makefile.in create mode 100644 dlls/tapi32/tests/tapi.c
diff --git a/configure b/configure index 483efc02d3a9..bcc08e4412de 100755 --- a/configure +++ b/configure @@ -20844,6 +20844,7 @@ wine_fn_config_makefile dlls/system.drv16 enable_win16 wine_fn_config_makefile dlls/t2embed enable_t2embed wine_fn_config_makefile dlls/t2embed/tests enable_tests wine_fn_config_makefile dlls/tapi32 enable_tapi32 +wine_fn_config_makefile dlls/tapi32/tests enable_tests wine_fn_config_makefile dlls/taskschd enable_taskschd wine_fn_config_makefile dlls/taskschd/tests enable_tests wine_fn_config_makefile dlls/tdh enable_tdh diff --git a/configure.ac b/configure.ac index 64721e96449f..52e211c97983 100644 --- a/configure.ac +++ b/configure.ac @@ -3694,6 +3694,7 @@ WINE_CONFIG_MAKEFILE(dlls/system.drv16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/t2embed) WINE_CONFIG_MAKEFILE(dlls/t2embed/tests) WINE_CONFIG_MAKEFILE(dlls/tapi32) +WINE_CONFIG_MAKEFILE(dlls/tapi32/tests) WINE_CONFIG_MAKEFILE(dlls/taskschd) WINE_CONFIG_MAKEFILE(dlls/taskschd/tests) WINE_CONFIG_MAKEFILE(dlls/tdh) diff --git a/dlls/tapi32/tests/Makefile.in b/dlls/tapi32/tests/Makefile.in new file mode 100644 index 000000000000..126eed1c85ce --- /dev/null +++ b/dlls/tapi32/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = tapi32.dll +IMPORTS = tapi32 + +C_SRCS = \ + tapi.c diff --git a/dlls/tapi32/tests/tapi.c b/dlls/tapi32/tests/tapi.c new file mode 100644 index 000000000000..a232010438e7 --- /dev/null +++ b/dlls/tapi32/tests/tapi.c @@ -0,0 +1,62 @@ +/* + * TAPI32 API tests + * + * Copyright 2019 Vijay Kiran Kamuju + * + * 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 <stdarg.h> + +#include "tapi.h" + +#include "wine/test.h" + +static void CALLBACK line_callback(DWORD hDev, DWORD dwMsg, DWORD_PTR dwInst, DWORD_PTR param1, DWORD_PTR param2, DWORD_PTR param3) +{ +} + +static void test_lineInitialize(void) +{ + ULONG ret; + DWORD dev; + HLINEAPP lnApp; + + ret = lineInitialize(NULL, NULL, NULL, NULL, NULL); + todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %x.\n", ret); + + ret = lineInitialize(&lnApp, NULL, NULL, NULL, NULL); + todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %x.\n", ret); + + ret = lineInitialize(&lnApp, GetModuleHandleA(NULL), NULL, NULL, NULL); + todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %x.\n", ret); + + ret = lineInitialize(&lnApp, GetModuleHandleA(NULL), line_callback, NULL, NULL); + todo_wine ok(ret == LINEERR_INVALPOINTER, "Expected return value LINEERR_INVALPOINTER, got %x.\n", ret); + + ret = lineInitialize(&lnApp, GetModuleHandleA(NULL), line_callback, NULL, &dev); + ok(!ret, "unexpected return value, got %u.\n", ret); + + ret = lineShutdown(NULL); + todo_wine ok(ret == LINEERR_INVALAPPHANDLE, "Expected return value LINEERR_INVALAPPHANDLE, got %x.\n", ret); + + ret = lineShutdown(lnApp); + ok(!ret, "unexpected return value, got %u.\n", ret); +} + +START_TEST(line) +{ + test_lineInitialize(); +}
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=60294
Your paranoid android.
=== build (build log) ===
testlist.o:testlist.c:(.rdata+0x2f0): undefined reference to `func_tapi' collect2: error: ld returned 1 exit status Makefile:240: recipe for target 'tapi32_test.exe' failed Makefile:7781: recipe for target 'dlls/tapi32/tests' failed Task: The exe32 Wine crossbuild failed
=== debian10 (build log) ===
/usr/bin/i686-w64-mingw32-ld: testlist.cross.o:testlist.c:(.rdata+0x2f0): undefined reference to `func_tapi' collect2: error: ld returned 1 exit status /usr/bin/i686-w64-mingw32-ld: testlist.cross.o:testlist.c:(.rdata+0x2f0): undefined reference to `func_tapi' collect2: error: ld returned 1 exit status Task: The win32 build failed
=== debian10 (build log) ===
/usr/bin/x86_64-w64-mingw32-ld: testlist.cross.o:testlist.c:(.rdata+0x308): undefined reference to `func_tapi' collect2: error: ld returned 1 exit status /usr/bin/x86_64-w64-mingw32-ld: testlist.cross.o:testlist.c:(.rdata+0x308): undefined reference to `func_tapi' collect2: error: ld returned 1 exit status Task: The wow64 build failed
On 11/16/19 3:05 PM, Vijay Kiran Kamuju wrote:
+START_TEST(line) +{
- test_lineInitialize();
+}
That's not going to work. Please verify that it builds before resending.