Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
70bc9f39
Commit
70bc9f39
authored
May 25, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed STANDALONE ifdefs.
parent
fb3f17ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
58 deletions
+14
-58
mailslot.c
dlls/kernel/tests/mailslot.c
+0
-8
pipe.c
dlls/kernel/tests/pipe.c
+2
-18
lzexpand_main.c
dlls/lzexpand/tests/lzexpand_main.c
+12
-32
No files found.
dlls/kernel/tests/mailslot.c
View file @
70bc9f39
...
...
@@ -25,15 +25,7 @@
#include <windef.h>
#include <winbase.h>
#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"
;
...
...
dlls/kernel/tests/pipe.c
View file @
70bc9f39
...
...
@@ -26,27 +26,11 @@
#include <windef.h>
#include <winbase.h>
#include <winsock.h>
#ifndef STANDALONE
#include "wine/test.h"
#else
#include <assert.h>
#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 <wtypes.h>
#include <winerror.h>
#include "wine/test.h"
#define PIPENAME "\\\\.\\PiPe\\tests_pipe.c"
#define NB_SERVER_LOOPS 8
...
...
dlls/lzexpand/tests/lzexpand_main.c
View file @
70bc9f39
...
...
@@ -22,31 +22,11 @@
#include <windef.h>
#include <winbase.h>
#include <stdlib.h>
#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 <assert.h>
#include <stdio.h>
#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 <winerror.h>
#include <lzexpand.h>
#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_
);
ok
2
(
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
);
ok
2
(
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_
);
ok
2
(
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
);
ok
2
(
file
!=
INVALID_HANDLE_VALUE
,
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFile: error %ld
\n
"
,
GetLastError
());
retok
=
WriteFile
(
file
,
compressed_file
,
compressed_file_size
,
&
ret
,
0
);
ok
2
(
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
);
ok
2
(
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
);
ok
2
(
file
!=
INVALID_HANDLE_VALUE
,
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFile: error %ld
\n
"
,
GetLastError
());
retok
=
ReadFile
(
file
,
buf
,
uncompressed_data_size
*
2
,
&
ret
,
0
);
ok
2
(
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_
);
ok
2
(
ret
,
"DeleteFile: error %ld
\n
"
,
GetLastError
());
ok
(
ret
,
"DeleteFile: error %ld
\n
"
,
GetLastError
());
ret
=
DeleteFile
(
filename2
);
ok
2
(
ret
,
"DeleteFile: error %ld
\n
"
,
GetLastError
());
ok
(
ret
,
"DeleteFile: error %ld
\n
"
,
GetLastError
());
}
START_TEST
(
lzexpand_main
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment