2011-07-26 07:40:19 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS kernel-mode tests
|
|
|
|
* LICENSE: GPLv2+ - See COPYING in the top level directory
|
|
|
|
* PURPOSE: Kernel-Mode Test Suite Runtime library memory functions test
|
|
|
|
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
|
|
|
|
*/
|
|
|
|
|
2011-08-01 21:53:52 +00:00
|
|
|
#define KMT_EMULATE_KERNEL
|
2011-07-26 07:40:19 +00:00
|
|
|
#include <kmt_test.h>
|
|
|
|
|
|
|
|
START_TEST(RtlMemory)
|
|
|
|
{
|
|
|
|
UCHAR Buffer[512];
|
|
|
|
KIRQL Irql;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
KeRaiseIrql(HIGH_LEVEL, &Irql);
|
|
|
|
|
|
|
|
RtlFillMemory(Buffer, sizeof Buffer / 2, 0x55);
|
|
|
|
RtlFillMemory(Buffer + sizeof Buffer / 2, sizeof Buffer / 2, 0xAA);
|
|
|
|
for (i = 0; i < sizeof Buffer / 2; ++i)
|
|
|
|
ok_eq_uint(Buffer[i], 0x55);
|
|
|
|
for (i = sizeof Buffer / 2; i < sizeof Buffer; ++i)
|
|
|
|
ok_eq_uint(Buffer[i], 0xAA);
|
|
|
|
|
|
|
|
KeLowerIrql(Irql);
|
|
|
|
}
|