1 /* -*- Mode: C; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // -------------------------------------------------------------------------*/
11 #include "sjme/alloc.h"
16 * Tests cleanup of the allocation pool.
20 SJME_TEST_DECLARE(testAllocPoolCleanup
)
25 sjme_alloc_pool
* pool
;
26 sjme_alloc_link
* link
;
28 /* Allocate data on the stack so it gets cleared. */
30 chunk
= sjme_alloca(chunkLen
);
32 return sjme_unit_skip(test
, "Could not alloca(%d).",
35 /* Initialize the pool. */
37 if (sjme_error_is(sjme_alloc_poolInitStatic(&pool
,
38 chunk
, chunkLen
)) || pool
== NULL
)
39 return sjme_unit_fail(test
, "Could not initialize static pool?");
41 sjme_todo("Implement %s", __func__
);
42 return SJME_TEST_RESULT_FAIL
;