Author: dchapyshev Date: Sun Sep 4 23:15:08 2016 New Revision: 72581
URL: http://svn.reactos.org/svn/reactos?rev=72581&view=rev Log: [KMTEST] - Add null-pointer test for RtlIsValidOemCharacter
Modified: trunk/rostests/kmtests/rtl/RtlIsValidOemCharacter.c
Modified: trunk/rostests/kmtests/rtl/RtlIsValidOemCharacter.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/rtl/RtlIsValidOemC... ============================================================================== --- trunk/rostests/kmtests/rtl/RtlIsValidOemCharacter.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/rtl/RtlIsValidOemCharacter.c [iso-8859-1] Sun Sep 4 23:15:08 2016 @@ -16,6 +16,7 @@ WCHAR tmp; BOOLEAN res; INT i; + NTSTATUS Status = STATUS_SUCCESS;
res = RtlIsValidOemCharacter(&unicode_null); ok(res != FALSE, "UNICODE_NULL is valid char\n"); @@ -49,5 +50,18 @@ ok(res == FALSE, "Expected fail. '%C' [%d] is NOT valid char\n", InvalidChars[i], i); ok(tmp == RtlUpcaseUnicodeChar(InvalidChars[i]), "Expected upcase char for '%C' [%d]\n", InvalidChars[i], i); } + + _SEH2_TRY + { + RtlIsValidOemCharacter(NULL); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + /* Get the exception code */ + Status = _SEH2_GetExceptionCode(); + } + _SEH2_END; + + ok(!NT_SUCCESS(Status), "Exception is expected but it did not occur\n"); }