https://git.reactos.org/?p=reactos.git;a=commitdiff;h=180207c516c72e11896ea…
commit 180207c516c72e11896eae0d4cd405b758adae69
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Mon Jan 30 19:44:48 2023 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Tue Jan 31 18:39:21 2023 +0100
[WIN32KNT_APITEST] Fix test for NtUserEnumDisplaySettings
---
.../apitests/win32nt/ntuser/NtUserEnumDisplaySettings.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/rostests/apitests/win32nt/ntuser/NtUserEnumDisplaySettings.c
b/modules/rostests/apitests/win32nt/ntuser/NtUserEnumDisplaySettings.c
index 0e8e0a4b7dc..5a954489145 100644
--- a/modules/rostests/apitests/win32nt/ntuser/NtUserEnumDisplaySettings.c
+++ b/modules/rostests/apitests/win32nt/ntuser/NtUserEnumDisplaySettings.c
@@ -76,19 +76,21 @@ START_TEST(NtUserEnumDisplaySettings)
Status = NtUserEnumDisplaySettings(NULL, 8, (DEVMODEW*)&data, 0);
TEST(Status == STATUS_SUCCESS);
- Status = NtUserEnumDisplaySettings(NULL, 247, (DEVMODEW*)&data, 0);
- TEST(Status == STATUS_SUCCESS);
- Status = NtUserEnumDisplaySettings(NULL, 248, (DEVMODEW*)&data, 0);
+ /* iModeNum out of range */
+ Status = NtUserEnumDisplaySettings(NULL, 5000, (DEVMODEW*)&data, 0);
TEST(Status == STATUS_INVALID_PARAMETER_2);
+ /* Secret values? */
Status = NtUserEnumDisplaySettings(NULL, -1, (DEVMODEW*)&data, 0);
TEST(Status == STATUS_SUCCESS);
Status = NtUserEnumDisplaySettings(NULL, -2, (DEVMODEW*)&data, 0);
TEST(Status == STATUS_SUCCESS);
+
+ /* What's going on here? */
Status = NtUserEnumDisplaySettings(NULL, -3, (DEVMODEW*)&data, 0);
- TEST(Status == STATUS_SUCCESS);
+ ok_ntstatus(Status, STATUS_INVALID_PARAMETER_3);
Status = NtUserEnumDisplaySettings(NULL, -4, (DEVMODEW*)&data, 0);
- TEST(Status == STATUS_INVALID_PARAMETER_2);
+ ok_ntstatus(Status, STATUS_INVALID_PARAMETER_2);
Status = NtUserEnumDisplaySettings(&usDeviceName, ENUM_CURRENT_SETTINGS,
(DEVMODEW*)&data, 0);
TEST(Status == STATUS_INVALID_PARAMETER_1);