mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:23:34 +00:00
[APITESTS:kernel32]
Be more specific about which last error we expect. svn path=/trunk/; revision=62419
This commit is contained in:
parent
73100dd557
commit
61d834485b
1 changed files with 8 additions and 8 deletions
|
@ -137,7 +137,7 @@ static void test_DefineDosDeviceA(void)
|
||||||
ok(Result, "Failed to subst drive\n");
|
ok(Result, "Failed to subst drive\n");
|
||||||
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
||||||
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
||||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n");
|
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Wrong last error. Expected %lu, got %lu\n", (DWORD)(ERROR_FILE_NOT_FOUND), GetLastError());
|
||||||
dwMaskCur = GetLogicalDrives();
|
dwMaskCur = GetLogicalDrives();
|
||||||
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
||||||
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
||||||
|
@ -168,7 +168,7 @@ static void test_DefineDosDeviceA(void)
|
||||||
ok(Result, "Failed to subst drive\n");
|
ok(Result, "Failed to subst drive\n");
|
||||||
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
||||||
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
||||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n");
|
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Wrong last error. Expected %lu, got %lu\n", (DWORD)(ERROR_FILE_NOT_FOUND), GetLastError());
|
||||||
dwMaskCur = GetLogicalDrives();
|
dwMaskCur = GetLogicalDrives();
|
||||||
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
||||||
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
||||||
|
@ -203,7 +203,7 @@ static void test_DefineDosDeviceA(void)
|
||||||
ok(Result, "Failed to subst drive\n");
|
ok(Result, "Failed to subst drive\n");
|
||||||
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
||||||
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
||||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n");
|
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Wrong last error. Expected %lu, got %lu\n", (DWORD)(ERROR_FILE_NOT_FOUND), GetLastError());
|
||||||
dwMaskCur = GetLogicalDrives();
|
dwMaskCur = GetLogicalDrives();
|
||||||
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
||||||
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
||||||
|
@ -266,7 +266,7 @@ static void test_DefineDosDeviceA(void)
|
||||||
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
||||||
hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data);
|
hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data);
|
||||||
ok(hnd == INVALID_HANDLE_VALUE, "Opened subst drive when it should fail\n");
|
ok(hnd == INVALID_HANDLE_VALUE, "Opened subst drive when it should fail\n");
|
||||||
ok(GetLastError() == ERROR_INVALID_NAME, "GetLastError() reports unexpected error code\n");
|
ok(GetLastError() == ERROR_INVALID_NAME, "Wrong last error. Expected %lu, got %lu\n", (DWORD)(ERROR_INVALID_NAME), GetLastError());
|
||||||
if (hnd) FindClose(hnd);
|
if (hnd) FindClose(hnd);
|
||||||
Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION, SUBST_DRIVE, NULL);
|
Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION, SUBST_DRIVE, NULL);
|
||||||
ok(Result, "Failed to remove subst drive using NULL Target name\n");
|
ok(Result, "Failed to remove subst drive using NULL Target name\n");
|
||||||
|
@ -313,7 +313,7 @@ static void test_DefineDosDeviceA(void)
|
||||||
ok(Result, "Failed to subst drive\n");
|
ok(Result, "Failed to subst drive\n");
|
||||||
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
||||||
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
||||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n");
|
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Wrong last error. Expected %lu, got %lu\n", (DWORD)(ERROR_FILE_NOT_FOUND), GetLastError());
|
||||||
dwMaskCur = GetLogicalDrives();
|
dwMaskCur = GetLogicalDrives();
|
||||||
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
||||||
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
||||||
|
@ -333,7 +333,7 @@ static void test_DefineDosDeviceA(void)
|
||||||
ok(Result, "Failed to subst drive\n");
|
ok(Result, "Failed to subst drive\n");
|
||||||
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
|
||||||
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n");
|
||||||
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n");
|
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Wrong last error. Expected %lu, got %lu\n", (DWORD)(ERROR_FILE_NOT_FOUND), GetLastError());
|
||||||
dwMaskCur = GetLogicalDrives();
|
dwMaskCur = GetLogicalDrives();
|
||||||
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n");
|
||||||
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n");
|
||||||
|
@ -362,7 +362,7 @@ static void test_QueryDosDeviceA(void)
|
||||||
ok(Result, "Failed to subst drive\n");
|
ok(Result, "Failed to subst drive\n");
|
||||||
Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, 0);
|
Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, 0);
|
||||||
ok(!Result, "Should fail as the buffer passed is supposed to be small\n");
|
ok(!Result, "Should fail as the buffer passed is supposed to be small\n");
|
||||||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() reports unexpected error code\n");
|
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Wrong last error. Expected %lu, got %lu\n", (DWORD)(ERROR_INSUFFICIENT_BUFFER), GetLastError());
|
||||||
Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH);
|
Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH);
|
||||||
ok(Result, "failed to get target path\n");
|
ok(Result, "failed to get target path\n");
|
||||||
ok(_strnicmp(Buffer, "\\??\\", 4) == 0, "The target returned does have correct prefix set\n");
|
ok(_strnicmp(Buffer, "\\??\\", 4) == 0, "The target returned does have correct prefix set\n");
|
||||||
|
@ -374,7 +374,7 @@ static void test_QueryDosDeviceA(void)
|
||||||
/* This will try to retrieve all existing MS-DOS device names */
|
/* This will try to retrieve all existing MS-DOS device names */
|
||||||
Result = QueryDosDeviceA(NULL, Buffer, 0);
|
Result = QueryDosDeviceA(NULL, Buffer, 0);
|
||||||
ok(!Result, "Should fail as the buffer passed is supposed to be small\n");
|
ok(!Result, "Should fail as the buffer passed is supposed to be small\n");
|
||||||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() reports unexpected error code\n");
|
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Wrong last error. Expected %lu, got %lu\n", (DWORD)(ERROR_INSUFFICIENT_BUFFER), GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(dosdev)
|
START_TEST(dosdev)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue