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 // -------------------------------------------------------------------------*/
13 #include "sjme/except.h"
18 * Tests failing of the exception handler.
22 SJME_TEST_DECLARE(testExceptFail
)
25 volatile sjme_exceptTrace
* trace
;
31 exceptTraceE_sjme
= 666;
32 SJME_EXCEPT_WITH(trace
):
33 SJME_EXCEPT_TOSS(SJME_ERROR_TOP_NOT_LONG
);
35 /* Should hopefully not be reached. */
36 sjme_unit_fail(test
, "Should not be reached here?");
39 sjme_unit_equalI(test
, exceptTraceE_sjme
, SJME_ERROR_TOP_NOT_LONG
,
40 "Error code was not set?");
42 /* Success otherwise. */
43 SJME_EXCEPT_DONE(SJME_TEST_RESULT_PASS
);