From 70bc9f39f10fd6e426813d2ff806f6c05c390297 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 25 May 2005 09:54:51 +0000 Subject: [PATCH] Removed STANDALONE ifdefs. --- dlls/kernel/tests/mailslot.c | 8 ------ dlls/kernel/tests/pipe.c | 20 ++----------- dlls/lzexpand/tests/lzexpand_main.c | 44 ++++++++--------------------- 3 files changed, 14 insertions(+), 58 deletions(-) diff --git a/dlls/kernel/tests/mailslot.c b/dlls/kernel/tests/mailslot.c index 92066d0d69f..8f8087564f4 100644 --- a/dlls/kernel/tests/mailslot.c +++ b/dlls/kernel/tests/mailslot.c @@ -25,15 +25,7 @@ #include #include -#ifndef STANDALONE #include "wine/test.h" -#else -#define START_TEST(name) main(int argc, char **argv) - -#define ok(cond,str) do{ if(!(cond)) printf("line %d: %s\n",__LINE__,str); }while (0) -#define todo_wine - -#endif static const char szmspath[] = "\\\\.\\mailslot\\wine_mailslot_test"; diff --git a/dlls/kernel/tests/pipe.c b/dlls/kernel/tests/pipe.c index abdec09b633..d9366dc6832 100644 --- a/dlls/kernel/tests/pipe.c +++ b/dlls/kernel/tests/pipe.c @@ -26,27 +26,11 @@ #include #include #include - -#ifndef STANDALONE -#include "wine/test.h" -#else -#include -#define START_TEST(name) main(int argc, char **argv) -#define ok(condition, msg) \ - do { \ - if(!(condition)) \ - { \ - fprintf(stderr,"failed at %d\n",__LINE__); \ - exit(0); \ - } \ - } while(0) - -#define todo_wine -#endif - #include #include +#include "wine/test.h" + #define PIPENAME "\\\\.\\PiPe\\tests_pipe.c" #define NB_SERVER_LOOPS 8 diff --git a/dlls/lzexpand/tests/lzexpand_main.c b/dlls/lzexpand/tests/lzexpand_main.c index a365be6dc98..049f5ea0dc6 100644 --- a/dlls/lzexpand/tests/lzexpand_main.c +++ b/dlls/lzexpand/tests/lzexpand_main.c @@ -22,31 +22,11 @@ #include #include #include - -#ifndef STANDALONE -#include "wine/test.h" -#define ok2 ok -#else -/* To build outside Wine tree, compile with cl -DSTANDALONE -D_X86_ lzexpand_main.c lz32.lib */ -#include -#include -#define START_TEST(name) main(int argc, char **argv) -#define ok(condition, msg) \ - do { if(!(condition)) { \ - fprintf(stderr,"failed at %d, msg:" msg "\n",__LINE__); \ - exit(1); \ - } } while(0) -#define ok2(condition, msg, arg) \ - do { if(!(condition)) { \ - fprintf(stderr,"failed at %d, msg:" msg "\n",__LINE__, arg); \ - exit(1); \ - } } while(0) -#define todo_wine -#endif - #include #include +#include "wine/test.h" + static char filename_[] = "testfile.xx_"; #if 0 static char filename[] = "testfile.xxx"; @@ -91,7 +71,7 @@ static void test_lzopenfile(void) ok(file >= 0, "LZOpenFile failed on creation\n"); LZClose(file); retval = GetFileAttributes(filename_); - ok2(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %ld\n", + ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %ld\n", GetLastError()); /* Check various opening options. */ @@ -146,7 +126,7 @@ static void test_lzread(void) file = CreateFile(filename_, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0); ok(file != INVALID_HANDLE_VALUE, "Could not create test file\n"); retok = WriteFile(file, compressed_file, compressed_file_size, &ret, 0); - ok2( retok, "WriteFile: error %ld\n", GetLastError()); + ok( retok, "WriteFile: error %ld\n", GetLastError()); ok(ret == compressed_file_size, "Wrote wrong number of bytes with WriteFile?\n"); CloseHandle(file); @@ -169,7 +149,7 @@ static void test_lzread(void) LZClose(cfile); ret = DeleteFile(filename_); - ok2(ret, "DeleteFile: error %ld\n", GetLastError()); + ok(ret, "DeleteFile: error %ld\n", GetLastError()); } static void test_lzcopy(void) @@ -182,17 +162,17 @@ static void test_lzcopy(void) /* Create the compressed file. */ file = CreateFile(filename_, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0); - ok2(file != INVALID_HANDLE_VALUE, + ok(file != INVALID_HANDLE_VALUE, "CreateFile: error %ld\n", GetLastError()); retok = WriteFile(file, compressed_file, compressed_file_size, &ret, 0); - ok2( retok, "WriteFile error %ld\n", GetLastError()); + ok( retok, "WriteFile error %ld\n", GetLastError()); ok(ret == compressed_file_size, "Wrote wrong number of bytes\n"); CloseHandle(file); source = LZOpenFile(filename_, &stest, OF_READ); ok(source >= 0, "LZOpenFile failed on compressed file\n"); dest = LZOpenFile(filename2, &dtest, OF_CREATE); - ok2(dest >= 0, "LZOpenFile failed on creating new file %d\n", dest); + ok(dest >= 0, "LZOpenFile failed on creating new file %d\n", dest); ret = LZCopy(source, dest); ok(ret > 0, "LZCopy error\n"); @@ -202,20 +182,20 @@ static void test_lzcopy(void) file = CreateFile(filename2, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - ok2(file != INVALID_HANDLE_VALUE, + ok(file != INVALID_HANDLE_VALUE, "CreateFile: error %ld\n", GetLastError()); retok = ReadFile(file, buf, uncompressed_data_size*2, &ret, 0); - ok2( retok && ret == uncompressed_data_size, "ReadFile: error %ld\n", GetLastError()); + ok( retok && ret == uncompressed_data_size, "ReadFile: error %ld\n", GetLastError()); /* Compare what we read with what we think we should read. */ ok(!memcmp(buf, uncompressed_data, uncompressed_data_size), "buffer contents mismatch\n"); CloseHandle(file); ret = DeleteFile(filename_); - ok2(ret, "DeleteFile: error %ld\n", GetLastError()); + ok(ret, "DeleteFile: error %ld\n", GetLastError()); ret = DeleteFile(filename2); - ok2(ret, "DeleteFile: error %ld\n", GetLastError()); + ok(ret, "DeleteFile: error %ld\n", GetLastError()); } START_TEST(lzexpand_main)