ICU-4515 in C++, define U_INLINE=inline
X-SVN-Rev: 17967
This commit is contained in:
parent
4f2a64c207
commit
2cb4b09625
@ -260,7 +260,11 @@ typedef unsigned int uint32_t;
|
||||
/*===========================================================================*/
|
||||
|
||||
#ifndef U_INLINE
|
||||
#define U_INLINE @U_INLINE@
|
||||
# ifdef __cplusplus
|
||||
# define U_INLINE inline
|
||||
# else
|
||||
# define U_INLINE @U_INLINE@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define U_ALIGN_CODE(n)
|
||||
|
@ -259,7 +259,11 @@ typedef unsigned int uint32_t;
|
||||
/*===========================================================================*/
|
||||
|
||||
#ifndef U_INLINE
|
||||
#define U_INLINE __inline
|
||||
# ifdef __cplusplus
|
||||
# define U_INLINE inline
|
||||
# else
|
||||
# define U_INLINE __inline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_M_IX86)
|
||||
|
@ -363,7 +363,11 @@ typedef int32_t UChar32;
|
||||
#endif
|
||||
|
||||
#ifndef U_INLINE
|
||||
# define U_INLINE
|
||||
# ifdef XP_CPLUSPLUS
|
||||
# define U_INLINE inline
|
||||
# else
|
||||
# define U_INLINE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "unicode/urename.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2004, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2005, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
@ -21,7 +21,8 @@ PUtilTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /
|
||||
CASE(2, testPositiveInfinity)
|
||||
CASE(3, testNegativeInfinity)
|
||||
CASE(4, testZero)
|
||||
// CASE(5, testIEEEremainder)
|
||||
CASE(5, testU_INLINE)
|
||||
// CASE(, testIEEEremainder)
|
||||
|
||||
default: name = ""; break; //needed to end loop
|
||||
}
|
||||
@ -548,3 +549,14 @@ PUtilTest::NaNNE(void)
|
||||
}
|
||||
}
|
||||
|
||||
U_INLINE int32_t inlineTriple(int32_t x) {
|
||||
return 3*x;
|
||||
}
|
||||
|
||||
// "code" coverage test for Jitterbug 4515 RFE: in C++, use U_INLINE=inline
|
||||
void
|
||||
PUtilTest::testU_INLINE() {
|
||||
if(inlineTriple(2)!=6 || inlineTriple(-55)!=-165) {
|
||||
errln("inlineTriple() failed");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2004, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2005, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
@ -30,6 +30,7 @@ private:
|
||||
void testPositiveInfinity(void);
|
||||
void testNegativeInfinity(void);
|
||||
void testZero(void);
|
||||
void testU_INLINE();
|
||||
|
||||
// subtests of testNaN
|
||||
void testIsNaN(void);
|
||||
|
Loading…
Reference in New Issue
Block a user