summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/malloctest/init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-08 19:15:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-08 19:15:04 +0000
commit4b6c378fabdafeecfd63904db765a514cb55d800 (patch)
tree76e3d8aabec58c546cbd5ac087a4ef218197dce8 /testsuites/libtests/malloctest/init.c
parent2009-07-08 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-4b6c378fabdafeecfd63904db765a514cb55d800.tar.bz2
2009-07-08 Joel Sherrill <joel.sherrill@OARcorp.com>
* malloctest/init.c, malloctest/malloctest.scn: Add error cases for _Protected_heap_Get_information().
Diffstat (limited to 'testsuites/libtests/malloctest/init.c')
-rw-r--r--testsuites/libtests/malloctest/init.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c
index 34c1cf5265..f5792a6d25 100644
--- a/testsuites/libtests/malloctest/init.c
+++ b/testsuites/libtests/malloctest/init.c
@@ -11,7 +11,7 @@
*
* Output parameters: NONE
*
- * COPYRIGHT (c) 1989-2008.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -235,7 +235,21 @@ void test_heap_info(void)
sc = malloc_info( &the_info );
rtems_test_assert( sc == 0 );
rtems_test_assert( s1 == the_info.Free.largest );
+}
+
+void test_protected_heap_info(void)
+{
+ Heap_Control heap;
+ Heap_Information_block info;
+ bool rc;
+
+ puts( "_Protected_heap_Get_information - NULL heap" );
+ rc = _Protected_heap_Get_information( NULL, &info );
+ rtems_test_assert( rc == false );
+ puts( "_Protected_heap_Get_information - NULL info" );
+ rc = _Protected_heap_Get_information( &heap, NULL );
+ rtems_test_assert( rc == false );
}
/*
@@ -304,6 +318,7 @@ rtems_task Init(
test_heap_cases_1();
test_heap_extend();
test_heap_info();
+ test_protected_heap_info();
test_posix_memalign();