1ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/* 2ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru****************************************************************************** 3ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* 483a171d1a62abf406f7f44ae671823d5ec20db7dCraig Cornelius* Copyright (C) 2002-2011, International Business Machines 5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* Corporation and others. All Rights Reserved. 6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* 7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru****************************************************************************** 8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* 9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* File uassert.h 10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* 11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* Contains U_ASSERT macro 12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* 13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* By default, U_ASSERT just wraps the C library assert macro. 14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* By changing the definition here, the assert behavior for ICU can be changed 15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* without affecting other non-ICU uses of the C library assert(). 16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* 17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru****************************************************************************** 18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*/ 19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#ifndef U_ASSERT_H 21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#define U_ASSERT_H 22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/* utypes.h is included to get the proper define for uint8_t */ 23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/utypes.h" 2483a171d1a62abf406f7f44ae671823d5ec20db7dCraig Cornelius#if U_DEBUG 2583a171d1a62abf406f7f44ae671823d5ec20db7dCraig Cornelius# include <assert.h> 2683a171d1a62abf406f7f44ae671823d5ec20db7dCraig Cornelius# define U_ASSERT(exp) assert(exp) 27ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#else 2883a171d1a62abf406f7f44ae671823d5ec20db7dCraig Cornelius# define U_ASSERT(exp) 29ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif 30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif 31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 33