tstNoCrt-1.cpp revision 0d29917b06b4c43098779dd7d38260e16f8702b0
/* $Id$ */
/** @file
* innotek Portable Runtime Testcase - Testcase for the No-CRT assembly bits.
*/
/*
* Copyright (C) 2008 innotek GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <iprt/initterm.h>
#ifdef RT_WITHOUT_NOCRT_WRAPPERS
# error "Build error."
#endif
/*******************************************************************************
* Global Variables *
*******************************************************************************/
static unsigned g_cErrors = 0;
{
while (cb--)
}
{
while (cb--)
{
{
g_cErrors++;
/* nandemonai */;
off--;
if (off)
RTPrintf("tstNoCrt-1: %s: %p:%p - %02x instead of %02x\n",
else
RTPrintf("tstNoCrt-1: %s: %p - %02x instead of %02x\n",
}
/* next*/
pb++;
}
}
#if 0 /* enable this to test the testcase. */
# define RT_NOCRT(a) a
#endif
int main()
{
/*
* Prologue.
*/
RTR3Init();
RTPrintf("tstNoCrt-1: TESTING...\n");
/*
* Sanity.
*/
/*
* memmove.
*/
RTPrintf("tstNoCrt-1: memmove\n");
{
{
/* forward */
char sz[32];
{
}
else
/* backward */
{
}
else
}
}
/*
* Summary.
*/
if (!g_cErrors)
RTPrintf("tstNoCrt-1: SUCCESS\n");
else
return !!g_cErrors;
}