[NTDLL_APITEST] Write some tests for NtSetDefaultLocale

This commit is contained in:
George Bișoc 2023-11-12 11:39:04 +01:00
parent 6438b85605
commit 1d8ce79080
No known key found for this signature in database
GPG key ID: 688C4FBE25D7DEF6
3 changed files with 46 additions and 0 deletions

View file

@ -47,6 +47,7 @@ list(APPEND SOURCE
NtQueryVolumeInformationFile.c
NtReadFile.c
NtSaveKey.c
NtSetDefaultLocale.c
NtSetInformationFile.c
NtSetInformationProcess.c
NtSetInformationThread.c

View file

@ -0,0 +1,43 @@
/*
* PROJECT: ReactOS API tests
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Tests for the NtSetDefaultLocale API
* COPYRIGHT: Copyright 2023 George Bișoc <george.bisoc@reactos.org>
*/
#include "precomp.h"
START_TEST(NtSetDefaultLocale)
{
NTSTATUS Status;
Status = NtSetDefaultLocale(TRUE, 0xffffffff);
ok_ntstatus(Status, STATUS_INVALID_PARAMETER);
Status = NtSetDefaultLocale(TRUE, 0xfffffffe);
ok_ntstatus(Status, STATUS_INVALID_PARAMETER);
Status = NtSetDefaultLocale(TRUE, 0x7fffffff);
ok_ntstatus(Status, STATUS_INVALID_PARAMETER);
Status = NtSetDefaultLocale(TRUE, 0x7ffffffe);
ok_ntstatus(Status, STATUS_INVALID_PARAMETER);
Status = NtSetDefaultLocale(TRUE, 0x80000000);
ok_ntstatus(Status, STATUS_INVALID_PARAMETER);
Status = NtSetDefaultLocale(TRUE, 0x80000001);
ok_ntstatus(Status, STATUS_INVALID_PARAMETER);
Status = NtSetDefaultLocale(TRUE, 0x10000);
ok_ntstatus(Status, STATUS_INVALID_PARAMETER);
Status = NtSetDefaultLocale(TRUE, 1);
ok_ntstatus(Status, STATUS_OBJECT_NAME_NOT_FOUND);
Status = NtSetDefaultLocale(TRUE, 0x0C);
ok_ntstatus(Status, STATUS_OBJECT_NAME_NOT_FOUND);
Status = NtSetDefaultLocale(TRUE, 0x1000);
ok_ntstatus(Status, STATUS_OBJECT_NAME_NOT_FOUND);
}

View file

@ -43,6 +43,7 @@ extern void func_NtQueryValueKey(void);
extern void func_NtQueryVolumeInformationFile(void);
extern void func_NtReadFile(void);
extern void func_NtSaveKey(void);
extern void func_NtSetDefaultLocale(void);
extern void func_NtSetInformationFile(void);
extern void func_NtSetInformationProcess(void);
extern void func_NtSetInformationThread(void);
@ -142,6 +143,7 @@ const struct test winetest_testlist[] =
{ "NtQueryVolumeInformationFile", func_NtQueryVolumeInformationFile },
{ "NtReadFile", func_NtReadFile },
{ "NtSaveKey", func_NtSaveKey},
{ "NtSetDefaultLocale", func_NtSetDefaultLocale },
{ "NtSetInformationFile", func_NtSetInformationFile },
{ "NtSetInformationProcess", func_NtSetInformationProcess },
{ "NtSetInformationThread", func_NtSetInformationThread },