/*
**********************************************************************
-* Copyright (C) 2007, International Business Machines
+* Copyright (C) 2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: unisetperf.cpp
#include "unicode/uniset.h"
#include "unicode/unistr.h"
#include "uoptions.h"
-
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#include "cmemory.h" // for UPRV_LENGTHOF
// Command-line options specific to unisetperf.
// Options do not have abbreviations: Force readable command lines.
class UnicodeSetPerformanceTest : public UPerfTest {
public:
UnicodeSetPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status)
- : UPerfTest(argc, argv, options, LENGTHOF(options), unisetperf_usage, status),
+ : UPerfTest(argc, argv, options, UPRV_LENGTHOF(options), unisetperf_usage, status),
utf8(NULL), utf8Length(0), countInputCodePoints(0), spanCount(0) {
if (U_SUCCESS(status)) {
UnicodeString pattern=UnicodeString(options[SET_PATTERN].value, -1, US_INV).unescape();