1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

msvcp140: Fix _Winerror_map test failures.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2021-11-19 13:26:25 +01:00 committed by Alexandre Julliard
parent afc0d31d3e
commit c90d72588e
2 changed files with 4 additions and 3 deletions

View File

@ -1270,6 +1270,7 @@ static void test__Winerror_map(void)
static struct {
int winerr, doserr;
BOOL broken;
int broken_doserr;
} tests[] = {
{ERROR_INVALID_FUNCTION, ENOSYS}, {ERROR_FILE_NOT_FOUND, ENOENT},
{ERROR_PATH_NOT_FOUND, ENOENT}, {ERROR_TOO_MANY_OPEN_FILES, EMFILE},
@ -1285,7 +1286,7 @@ static void test__Winerror_map(void)
{ERROR_FILE_EXISTS, EEXIST}, {ERROR_CANNOT_MAKE, EACCES},
{ERROR_INVALID_PARAMETER, EINVAL, TRUE}, {ERROR_OPEN_FAILED, EIO},
{ERROR_BUFFER_OVERFLOW, ENAMETOOLONG}, {ERROR_DISK_FULL, ENOSPC},
{ERROR_INVALID_NAME, EINVAL}, {ERROR_NEGATIVE_SEEK, EINVAL},
{ERROR_INVALID_NAME, ENOENT, TRUE, EINVAL}, {ERROR_NEGATIVE_SEEK, EINVAL},
{ERROR_BUSY_DRIVE, EBUSY}, {ERROR_DIR_NOT_EMPTY, ENOTEMPTY},
{ERROR_BUSY, EBUSY}, {ERROR_ALREADY_EXISTS, EEXIST},
{ERROR_LOCKED, ENOLCK}, {ERROR_DIRECTORY, EINVAL},
@ -1313,7 +1314,7 @@ static void test__Winerror_map(void)
for(i=0; i<ARRAY_SIZE(tests); i++)
{
ret = p__Winerror_map(tests[i].winerr);
ok(ret == tests[i].doserr || broken(tests[i].broken && !ret),
ok(ret == tests[i].doserr || broken(tests[i].broken && ret == tests[i].broken_doserr),
"_Winerror_map(%d) returned %d, expected %d\n",
tests[i].winerr, ret, tests[i].doserr);
}

View File

@ -216,7 +216,7 @@ static const struct {
{ERROR_FILE_EXISTS, EEXIST}, {ERROR_CANNOT_MAKE, EACCES},
{ERROR_INVALID_PARAMETER, EINVAL}, {ERROR_OPEN_FAILED, EIO},
{ERROR_BUFFER_OVERFLOW, ENAMETOOLONG}, {ERROR_DISK_FULL, ENOSPC},
{ERROR_INVALID_NAME, EINVAL}, {ERROR_NEGATIVE_SEEK, EINVAL},
{ERROR_INVALID_NAME, ENOENT}, {ERROR_NEGATIVE_SEEK, EINVAL},
{ERROR_BUSY_DRIVE, EBUSY}, {ERROR_DIR_NOT_EMPTY, ENOTEMPTY},
{ERROR_BUSY, EBUSY}, {ERROR_ALREADY_EXISTS, EEXIST},
{ERROR_LOCKED, ENOLCK}, {ERROR_DIRECTORY, EINVAL},