source: rtems/testsuites/libtests/malloc05/init.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2012.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.org/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <tmacros.h>
15#include "test_support.h"
16#include <rtems/malloc.h>
17
18const char rtems_test_name[] = "MALLOC 5";
19
20/* forward declarations to avoid warnings */
21rtems_task Init(rtems_task_argument argument);
22
23rtems_task Init(
24  rtems_task_argument argument
25)
26{
27  int                        sc;
28  rtems_malloc_statistics_t  stats;
29
30  TEST_BEGIN();
31
32  puts( "malloc_get_statistics( NULL ) - returns -1" );
33  sc = malloc_get_statistics( NULL );
34  rtems_test_assert( sc == -1 );
35
36  puts( "malloc_get_statistics( &stats ) - returns -0" );
37  sc = malloc_get_statistics( &stats );
38  rtems_test_assert( sc == 0 );
39
40  TEST_END();
41
42  rtems_test_exit(0);
43}
44
45/* configuration information */
46
47#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
48#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
49
50#define CONFIGURE_MAXIMUM_TASKS             1
51#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
52
53#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
54
55#define CONFIGURE_INIT
56
57#include <rtems/confdefs.h>
58/* end of file */
Note: See TracBrowser for help on using the repository browser.