/********************************************************************
* COPYRIGHT:
- * Copyright (C) 2008 IBM, Inc. All Rights Reserved.
+ * Copyright (C) 2008-2012 IBM, Inc. All Rights Reserved.
*
********************************************************************/
#ifndef _STRSRCHPERF_H
#define _STRSRCHPERF_H
-#include "unicode/ubrk.h"
#include "unicode/usearch.h"
#include "unicode/uperf.h"
#include <stdlib.h>
}
virtual long getOperationsPerIteration() {
- return (long)(srcLen/pttrnLen);
+ return (long) srcLen;
}
StringSearchPerfFunction(StrSrchFn func, UStringSearch* search, const UChar* source,int32_t sourceLen, const UChar* pattern, int32_t patternLen) {
StringSearchPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status);
~StringSearchPerformanceTest();
virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = NULL);
-
UPerfFunction* Test_ICU_Forward_Search();
UPerfFunction* Test_ICU_Backward_Search();
};
+
void ICUForwardSearch(UStringSearch *srch, const UChar* source, int32_t sourceLen, const UChar* pattern, int32_t patternLen, UErrorCode* status) {
int32_t match;