tstRTMemPool.cpp revision 5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync/* $Id$ */
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync/** @file
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * IPRT Testcase - MemPool.
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync */
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync/*
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * Copyright (C) 2009 Sun Microsystems, Inc.
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync *
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * available from http://www.virtualbox.org. This file is free software;
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * you can redistribute it and/or modify it under the terms of the GNU
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * General Public License (GPL) as published by the Free Software
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync *
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * The contents of this file may alternatively be used under the terms
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * of the Common Development and Distribution License Version 1.0
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * VirtualBox OSE distribution, in which case the provisions of the
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * CDDL are applicable instead of those of the GPL.
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync *
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * You may elect to license modified versions of this file under the
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * terms and conditions of either the GPL or the CDDL or both.
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync *
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * additional information or have any questions.
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync */
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync/*******************************************************************************
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync* Header Files *
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync*******************************************************************************/
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync#include <iprt/mempool.h>
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync#include <iprt/err.h>
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync#include <iprt/initterm.h>
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync#include <iprt/stdarg.h>
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync#include <iprt/string.h>
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync#include <iprt/test.h>
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsyncint main()
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync{
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync int rc = RTR3Init();
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync if (RT_FAILURE(rc))
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync return 1;
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync RTTEST hTest;
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync rc = RTTestCreate("tstRTMemPool", &hTest);
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync if (RT_FAILURE(rc))
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync return 1;
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync RTTestBanner(hTest);
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync /*
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * Smoke tests using first the default and then a custom pool.
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync */
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync /*
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync * Summary.
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync */
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync return RTTestSummaryAndDestroy(hTest);
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync}
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync
5ff501b3f5f8ba5172a6d8ad1a2a99b103a5d058vboxsync