mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 18:25:57 +00:00
ICU-4362 Fix usearch object creation.
X-SVN-Rev: 23838
This commit is contained in:
parent
5f3f1610b5
commit
6e708fb95a
3 changed files with 2 additions and 82 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -54,7 +54,6 @@ icu4c/source/samples/ucnv/data02.bin -text
|
|||
icu4c/source/test/compat/tzone.pl -text
|
||||
icu4c/source/test/perf/Makefile.in -text
|
||||
icu4c/source/test/perf/README -text
|
||||
icu4c/source/test/perf/strsrchperf/Makefile.in -text
|
||||
icu4c/source/test/perf/strsrchperf/StrSrchPerf_r.pl -text
|
||||
icu4c/source/test/perf/strsrchperf/strsrchperf.cpp -text
|
||||
icu4c/source/test/perf/strsrchperf/strsrchperf.h -text
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
## Makefile.in for ICU - test/perf/strsrchperf
|
||||
## Copyright (c) 2008, International Business Machines Corporation and
|
||||
## others. All Rights Reserved.
|
||||
|
||||
## Source directory information
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
top_builddir = ../../..
|
||||
|
||||
include $(top_builddir)/icudefs.mk
|
||||
|
||||
## Build directory information
|
||||
subdir = test/perf/strsrchperf
|
||||
|
||||
## Extra files to remove for 'make clean'
|
||||
CLEANFILES = *~ $(DEPS)
|
||||
|
||||
## Target information
|
||||
TARGET = strsrchperf
|
||||
|
||||
CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/tools/ctestfw
|
||||
LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)
|
||||
|
||||
OBJECTS = strsrchperf.o
|
||||
|
||||
DEPS = $(OBJECTS:.o=.d)
|
||||
|
||||
## List of phony targets
|
||||
.PHONY : all all-local install install-local clean clean-local \
|
||||
distclean distclean-local dist dist-local check check-local
|
||||
|
||||
## Clear suffix list
|
||||
.SUFFIXES :
|
||||
|
||||
## List of standard targets
|
||||
all: all-local
|
||||
install: install-local
|
||||
clean: clean-local
|
||||
distclean : distclean-local
|
||||
dist: dist-local
|
||||
check: all check-local
|
||||
|
||||
all-local: $(TARGET)
|
||||
|
||||
install-local:
|
||||
|
||||
dist-local:
|
||||
|
||||
clean-local:
|
||||
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
|
||||
$(RMV) $(OBJECTS) $(TARGET)
|
||||
|
||||
distclean-local: clean-local
|
||||
$(RMV) Makefile
|
||||
|
||||
check-local: all-local
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(TARGET) : $(OBJECTS)
|
||||
$(LINK.cc) -o $@ $^ $(LIBS)
|
||||
$(POST_BUILD_STEP)
|
||||
|
||||
invoke:
|
||||
ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
|
||||
|
||||
ifeq (,$(MAKECMDGOALS))
|
||||
-include $(DEPS)
|
||||
else
|
||||
ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
|
||||
ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
|
||||
-include $(DEPS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
@ -29,7 +29,7 @@ StringSearchPerformanceTest::StringSearchPerformanceTest(int32_t argc, const cha
|
|||
fprintf(stderr, "FAILED to create pattern for searching. Error: %s\n", u_errorName(status));
|
||||
return;
|
||||
}
|
||||
start = ubrk_preceding(brk, 100);
|
||||
start = ubrk_preceding(brk, 1000);
|
||||
end = ubrk_following(brk, start);
|
||||
pttrnLen = end - start;
|
||||
UChar* temp = (UChar*)malloc(sizeof(UChar)*(pttrnLen));
|
||||
|
@ -40,7 +40,7 @@ StringSearchPerformanceTest::StringSearchPerformanceTest(int32_t argc, const cha
|
|||
ubrk_close(brk);
|
||||
|
||||
/* Create the StringSearch object to be use in performance test. */
|
||||
srch = usearch_open(src, srcLen, pttrn, pttrnLen, locale, NULL, &status);
|
||||
srch = usearch_open(pttrn, pttrnLen, src, srcLen, locale, NULL, &status);
|
||||
if(U_FAILURE(status)){
|
||||
fprintf(stderr, "FAILED to create UPerfTest object. Error: %s\n", u_errorName(status));
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue