mirror of
https://github.com/reactos/reactos.git
synced 2024-12-04 08:53:32 +08:00
[NTDLL_APITEST] Addendum to ae8c9a1f
: really test the "zero Length, non-zero MaximumLength" case. + add few simplifications.
This commit is contained in:
parent
afb14bff33
commit
ef2e1871b1
@ -34,7 +34,7 @@ START_TEST(RtlValidateUnicodeString)
|
||||
ok(Status == STATUS_INVALID_PARAMETER, "Status = 0x%lx\n", Status);
|
||||
|
||||
// With a non-NULL but empty buffer, and zero lengths.
|
||||
String.Buffer = L"";
|
||||
RtlInitEmptyUnicodeString(&String, L"", 0);
|
||||
Status = RtlValidateUnicodeString(0, &String);
|
||||
ok(Status == STATUS_SUCCESS, "Status = 0x%lx\n", Status);
|
||||
Status = RtlValidateUnicodeString(1, &String);
|
||||
@ -43,7 +43,7 @@ START_TEST(RtlValidateUnicodeString)
|
||||
ok(Status == STATUS_INVALID_PARAMETER, "Status = 0x%lx\n", Status);
|
||||
|
||||
// With a non-NULL but empty buffer, and zero Length, non-zero MaximumLength.
|
||||
String.Buffer = L"";
|
||||
RtlInitEmptyUnicodeString(&String, L"", sizeof(WCHAR));
|
||||
String.Length = 0;
|
||||
Status = RtlValidateUnicodeString(0, &String);
|
||||
ok(Status == STATUS_SUCCESS, "Status = 0x%lx\n", Status);
|
||||
@ -78,7 +78,8 @@ START_TEST(RtlValidateUnicodeString)
|
||||
Status = RtlValidateUnicodeString(0, &String);
|
||||
ok(Status == STATUS_INVALID_PARAMETER, "Status = 0x%lx\n", Status);
|
||||
|
||||
// NULL buffer, non-zero Length, zero MaximumLength.
|
||||
// NULL buffer, non-zero Length, zero MaximumLength
|
||||
// (tests also the case Length > MaximumLength that must fail).
|
||||
String = ValidString;
|
||||
String.Buffer = NULL;
|
||||
String.MaximumLength = 0;
|
||||
@ -98,7 +99,6 @@ START_TEST(RtlValidateUnicodeString)
|
||||
Status = RtlValidateUnicodeString(0, &String);
|
||||
ok(Status == STATUS_INVALID_PARAMETER, "Status = 0x%lx\n", Status);
|
||||
|
||||
String = ValidString;
|
||||
String.MaximumLength--; // MaximumLength was already >= 2 so it remains > 0.
|
||||
Status = RtlValidateUnicodeString(0, &String);
|
||||
ok(Status == STATUS_INVALID_PARAMETER, "Status = 0x%lx\n", Status);
|
||||
|
Loading…
Reference in New Issue
Block a user