/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2010, International Business Machines Corporation and
+ * Copyright (c) 1997-2011, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
U_NAMESPACE_USE
-#ifdef OS390
+#if U_PLATFORM == U_PF_OS390
// avoid collision with math.h/log()
-// this must be after including utypes.h so that OS390 is actually defined
+// this must be after including utypes.h so that U_PLATFORM is actually defined
#pragma map(IntlTest::log( const UnicodeString &message ),"logos390")
#endif
static float random();
/**
- * Ascertain the version of ICU. Useful for
- * time bomb testing
+ * Returns true if u_getVersion() < major.minor.
*/
- UBool isICUVersionAtLeast(const UVersionInfo x);
+ static UBool isICUVersionBefore(int major, int minor) {
+ return isICUVersionBefore(major, minor, 0);
+ }
+
+ /**
+ * Returns true if u_getVersion() < major.minor.milli.
+ */
+ static UBool isICUVersionBefore(int major, int minor, int milli);
+
+ /**
+ * Returns true if u_getVersion() >= major.minor.
+ */
+ static UBool isICUVersionAtLeast(int major, int minor) {
+ return isICUVersionAtLeast(major, minor, 0);
+ }
+
+ /**
+ * Returns true if u_getVersion() >= major.minor.milli.
+ */
+ static UBool isICUVersionAtLeast(int major, int minor, int milli) {
+ return !isICUVersionBefore(major, minor, milli);
+ }
enum { kMaxProps = 16 };