]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/ucdtest.cpp
ICU-6.2.13.tar.gz
[apple/icu.git] / icuSources / test / intltest / ucdtest.cpp
index 89614feb48473234cc2a17977b7929d4470c453c..714437f7ce6fbc04ee6080301c675a029e9a5e00 100644 (file)
@@ -1,12 +1,13 @@
 /********************************************************************
  * COPYRIGHT: 
- * Copyright (c) 1997-2003, International Business Machines Corporation and
+ * Copyright (c) 1997-2004, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 
 #include "unicode/ustring.h"
 #include "unicode/uchar.h"
 #include "unicode/uniset.h"
+#include "unicode/putil.h"
 #include "cstring.h"
 #include "uparse.h"
 #include "ucdtest.h"
@@ -95,7 +96,7 @@ derivedCorePropsIndex[]={
     UCHAR_GRAPHEME_BASE
 };
 
-U_CAPI void U_CALLCONV
+U_CFUNC void U_CALLCONV
 derivedCorePropsLineFn(void *context,
                         char *fields[][2], int32_t /* fieldCount */,
                         UErrorCode *pErrorCode)
@@ -135,18 +136,10 @@ void UnicodeTest::TestAdditionalProperties() {
     char newPath[256];
     char backupPath[256];
     char *fields[2][2];
-    int32_t length;
     UErrorCode errorCode=U_ZERO_ERROR;
 
     /* Look inside ICU_DATA first */
-    strcpy(newPath, u_getDataDirectory());
-
-    // remove trailing "out/"
-    length=uprv_strlen(newPath);
-    if(length>=4 && uprv_strcmp(newPath+length-4, "out" U_FILE_SEP_STRING)==0) {
-        newPath[length-4]=0;
-    }
-
+    strcpy(newPath, pathToDataDirectory());
     strcat(newPath, "unidata" U_FILE_SEP_STRING "DerivedCoreProperties.txt");
 
     // As a fallback, try to guess where the source data was located