Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: source/test/perf/strsrchperf/strsrchperf.h

Issue 2435373002: Delete source/test (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/test/perf/strsrchperf/StrSrchPerf_r.pl ('k') | source/test/perf/strsrchperf/strsrchperf.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/perf/strsrchperf/strsrchperf.h
diff --git a/source/test/perf/strsrchperf/strsrchperf.h b/source/test/perf/strsrchperf/strsrchperf.h
deleted file mode 100644
index a68ab3a1b06486b5a88cf8296db847e067fec0b3..0000000000000000000000000000000000000000
--- a/source/test/perf/strsrchperf/strsrchperf.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/********************************************************************
- * COPYRIGHT:
- * Copyright (C) 2008-2012 IBM, Inc. All Rights Reserved.
- *
- ********************************************************************/
-#ifndef _STRSRCHPERF_H
-#define _STRSRCHPERF_H
-
-#include "unicode/usearch.h"
-#include "unicode/uperf.h"
-#include <stdlib.h>
-#include <stdio.h>
-
-typedef void (*StrSrchFn)(UStringSearch* srch, const UChar* src,int32_t srcLen, const UChar* pttrn, int32_t pttrnLen, UErrorCode* status);
-
-class StringSearchPerfFunction : public UPerfFunction {
-private:
- StrSrchFn fn;
- const UChar* src;
- int32_t srcLen;
- const UChar* pttrn;
- int32_t pttrnLen;
- UStringSearch* srch;
-
-public:
- virtual void call(UErrorCode* status) {
- (*fn)(srch, src, srcLen, pttrn, pttrnLen, status);
- }
-
- virtual long getOperationsPerIteration() {
- return (long) srcLen;
- }
-
- StringSearchPerfFunction(StrSrchFn func, UStringSearch* search, const UChar* source,int32_t sourceLen, const UChar* pattern, int32_t patternLen) {
- fn = func;
- src = source;
- srcLen = sourceLen;
- pttrn = pattern;
- pttrnLen = patternLen;
- srch = search;
- }
-};
-
-class StringSearchPerformanceTest : public UPerfTest {
-private:
- const UChar* src;
- int32_t srcLen;
- UChar* pttrn;
- int32_t pttrnLen;
- UStringSearch* srch;
-
-public:
- 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;
-
- match = usearch_first(srch, status);
- while (match != USEARCH_DONE) {
- match = usearch_next(srch, status);
- }
-}
-
-void ICUBackwardSearch(UStringSearch *srch, const UChar* source, int32_t sourceLen, const UChar* pattern, int32_t patternLen, UErrorCode* status) {
- int32_t match;
-
- match = usearch_last(srch, status);
- while (match != USEARCH_DONE) {
- match = usearch_previous(srch, status);
- }
-}
-
-#endif /* _STRSRCHPERF_H */
« no previous file with comments | « source/test/perf/strsrchperf/StrSrchPerf_r.pl ('k') | source/test/perf/strsrchperf/strsrchperf.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698