+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
****************************************************************************
- * Copyright (c) 1997-2013, International Business Machines Corporation and *
+ * Copyright (c) 1997-2014, International Business Machines Corporation and *
* others. All Rights Reserved. *
****************************************************************************
*/
#include "unicode/ucal.h"
#include "cintltst.h"
+#include "cmemory.h"
#include <stdlib.h>
#include <time.h>
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
-
#define LOOP_COUNT 10000
static void TestAPI(void);
static void initRandom(int64_t min, int64_t max)
{
- uint64_t interval = max - min;
+ uint64_t interval = (uint64_t)max - (uint64_t)min;
ranMin = min;
ranMax = max;
ucal_close(cal);
return;
}
- for(i = 0; i < LENGTHOF(dotNetDateTimeTicks); ++i) {
+ for(i = 0; i < UPRV_LENGTHOF(dotNetDateTimeTicks); ++i) {
/* Test conversion from .Net/Universal time to ICU time. */
dt = dotNetDateTimeTicks + i;
millis = utmscale_toInt64(dt->ticks, UDTS_ICU4C_TIME, &errorCode);