]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/uassert.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 ******************************************************************************
6 * Copyright (C) 2002-2011, International Business Machines
7 * Corporation and others. All Rights Reserved.
9 ******************************************************************************
13 * Contains the U_ASSERT and UPRV_UNREACHABLE macros
15 ******************************************************************************
20 /* utypes.h is included to get the proper define for uint8_t */
21 #include "unicode/utypes.h"
27 * By default, U_ASSERT just wraps the C library assert macro.
28 * By changing the definition here, the assert behavior for ICU can be changed
29 * without affecting other non - ICU uses of the C library assert().
33 # define U_ASSERT(exp) assert(exp)
35 # define U_ASSERT(exp)
39 * \def UPRV_UNREACHABLE
40 * This macro is used to unconditionally abort if unreachable code is ever executed.
43 #if defined(UPRV_UNREACHABLE)
44 // Use the predefined value.
46 # define UPRV_UNREACHABLE abort()