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
74ea2921
Commit
74ea2921
authored
Feb 28, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lz32/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a33ac68a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
25 deletions
+24
-25
Makefile.in
dlls/lz32/tests/Makefile.in
+0
-1
lzexpand_main.c
dlls/lz32/tests/lzexpand_main.c
+24
-24
No files found.
dlls/lz32/tests/Makefile.in
View file @
74ea2921
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
lz32.dll
IMPORTS
=
lz32
...
...
dlls/lz32/tests/lzexpand_main.c
View file @
74ea2921
...
...
@@ -74,7 +74,7 @@ static void full_file_path_name_in_a_CWD(const char *src, char *dst, BOOL expect
char
shortname
[
MAX_PATH
];
retval
=
GetCurrentDirectoryA
(
MAX_PATH
,
dst
);
ok
(
retval
>
0
,
"GetCurrentDirectoryA returned %
d, GLE=%
d
\n
"
,
ok
(
retval
>
0
,
"GetCurrentDirectoryA returned %
ld, GLE=%l
d
\n
"
,
retval
,
GetLastError
());
if
(
dst
[
retval
-
1
]
!=
'\\'
)
/* Append backslash only when it's missing */
...
...
@@ -84,7 +84,7 @@ static void full_file_path_name_in_a_CWD(const char *src, char *dst, BOOL expect
{
memcpy
(
shortname
,
dst
,
MAX_PATH
);
retval
=
GetShortPathNameA
(
shortname
,
dst
,
MAX_PATH
-
1
);
ok
(
retval
>
0
,
"GetShortPathNameA returned %
d for '%s', GLE=%
d
\n
"
,
ok
(
retval
>
0
,
"GetShortPathNameA returned %
ld for '%s', GLE=%l
d
\n
"
,
retval
,
dst
,
GetLastError
());
}
}
...
...
@@ -99,7 +99,7 @@ static void create_file(char *fname)
ok
(
file
>=
0
,
"LZOpenFileA failed to create '%s'
\n
"
,
fname
);
LZClose
(
file
);
retval
=
GetFileAttributesA
(
fname
);
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributesA('%s'): error %d
\n
"
,
ofs
.
szPathName
,
GetLastError
());
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributesA('%s'): error %
l
d
\n
"
,
ofs
.
szPathName
,
GetLastError
());
}
static
void
delete_file
(
char
*
fname
)
...
...
@@ -228,7 +228,7 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileA set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -247,7 +247,7 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileA set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -266,7 +266,7 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileA set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -285,7 +285,7 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileA set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -310,7 +310,7 @@ static void test_LZOpenFileA(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
LZClose
(
file
);
memset
(
&
test
,
0xA5
,
sizeof
(
test
));
...
...
@@ -329,7 +329,7 @@ static void test_LZOpenFileA(void)
LZClose
(
file
);
retval
=
GetFileAttributesA
(
filename_
);
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributesA: error %
d
\n
"
,
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributesA: error %
ld
\n
"
,
GetLastError
());
/* Check various opening options: */
...
...
@@ -424,7 +424,7 @@ static void test_LZRead(void)
file
=
CreateFileA
(
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
(
retok
,
"WriteFile: error %d
\n
"
,
GetLastError
());
ok
(
retok
,
"WriteFile: error %
l
d
\n
"
,
GetLastError
());
ok
(
ret
==
compressed_file_size
,
"Wrote wrong number of bytes with WriteFile?
\n
"
);
CloseHandle
(
file
);
...
...
@@ -447,7 +447,7 @@ static void test_LZRead(void)
LZClose
(
cfile
);
ret
=
DeleteFileA
(
filename_
);
ok
(
ret
,
"DeleteFileA: error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"DeleteFileA: error %
l
d
\n
"
,
GetLastError
());
}
static
void
test_LZCopy
(
void
)
...
...
@@ -461,9 +461,9 @@ static void test_LZCopy(void)
/* Create the compressed file. */
file
=
CreateFileA
(
filename_
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_NEW
,
0
,
0
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFileA: error %d
\n
"
,
GetLastError
());
"CreateFileA: error %
l
d
\n
"
,
GetLastError
());
retok
=
WriteFile
(
file
,
compressed_file
,
compressed_file_size
,
&
ret
,
0
);
ok
(
retok
,
"WriteFile error %d
\n
"
,
GetLastError
());
ok
(
retok
,
"WriteFile error %
l
d
\n
"
,
GetLastError
());
ok
(
ret
==
compressed_file_size
,
"Wrote wrong number of bytes
\n
"
);
CloseHandle
(
file
);
...
...
@@ -480,19 +480,19 @@ static void test_LZCopy(void)
file
=
CreateFileA
(
filename2
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFileA: error %d
\n
"
,
GetLastError
());
"CreateFileA: error %
l
d
\n
"
,
GetLastError
());
retok
=
ReadFile
(
file
,
buf
,
uncompressed_data_size
*
2
,
&
ret
,
0
);
ok
(
retok
&&
ret
==
uncompressed_data_size
,
"ReadFile: error %d
\n
"
,
GetLastError
());
ok
(
retok
&&
ret
==
uncompressed_data_size
,
"ReadFile: error %
l
d
\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
=
DeleteFileA
(
filename_
);
ok
(
ret
,
"DeleteFileA: error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"DeleteFileA: error %
l
d
\n
"
,
GetLastError
());
ret
=
DeleteFileA
(
filename2
);
ok
(
ret
,
"DeleteFileA: error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"DeleteFileA: error %
l
d
\n
"
,
GetLastError
());
}
static
void
create_fileW
(
WCHAR
*
fnameW
)
...
...
@@ -505,7 +505,7 @@ static void create_fileW(WCHAR *fnameW)
ok
(
file
>=
0
,
"LZOpenFileW failed on creation
\n
"
);
LZClose
(
file
);
retval
=
GetFileAttributesW
(
fnameW
);
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributesW('%s'): error %d
\n
"
,
ofs
.
szPathName
,
GetLastError
());
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributesW('%s'): error %
l
d
\n
"
,
ofs
.
szPathName
,
GetLastError
());
}
static
void
delete_fileW
(
WCHAR
*
fnameW
)
...
...
@@ -628,7 +628,7 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileW succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileW set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -647,7 +647,7 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileW succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileW set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -666,7 +666,7 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileW succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileW set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -685,7 +685,7 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileW succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileW set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -712,7 +712,7 @@ static void test_LZOpenFileW(void)
return
;
}
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
"GetLastError() returns %
l
d
\n
"
,
GetLastError
());
ok
(
file
==
LZERROR_BADINHANDLE
,
"LZOpenFileW succeeded on nonexistent file
\n
"
);
LZClose
(
file
);
...
...
@@ -732,7 +732,7 @@ static void test_LZOpenFileW(void)
LZClose
(
file
);
retval
=
GetFileAttributesW
(
filenameW_
);
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributes: error %
d
\n
"
,
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributes: error %
ld
\n
"
,
GetLastError
());
/* Check various opening options: */
...
...
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