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

Side by Side Diff: source/test/letest/letest.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « source/test/letest/gendata.vcxproj.filters ('k') | source/test/letest/letest.vcxproj » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ******************************************************************************* 2 *******************************************************************************
3 * 3 *
4 * Copyright (C) 1999-2014, International Business Machines 4 * Copyright (C) 1999-2014, International Business Machines
5 * Corporation and others. All Rights Reserved. 5 * Corporation and others. All Rights Reserved.
6 * 6 *
7 ******************************************************************************* 7 *******************************************************************************
8 * file name: letest.cpp 8 * file name: letest.cpp
9 * 9 *
10 * created on: 11/06/2000 10 * created on: 11/06/2000
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 log_info("If you see errors, they may be due to the version of the font you're using.\n"); 408 log_info("If you see errors, they may be due to the version of the font you're using.\n");
409 } 409 }
410 } 410 }
411 411
412 /* Returns the path to icu/source/test/testdata/ */ 412 /* Returns the path to icu/source/test/testdata/ */
413 const char *getSourceTestData() { 413 const char *getSourceTestData() {
414 const char *srcDataDir = NULL; 414 const char *srcDataDir = NULL;
415 #ifdef U_TOPSRCDIR 415 #ifdef U_TOPSRCDIR
416 srcDataDir = U_TOPSRCDIR U_FILE_SEP_STRING "test" U_FILE_SEP_STRING "testdat a" U_FILE_SEP_STRING; 416 srcDataDir = U_TOPSRCDIR U_FILE_SEP_STRING "test" U_FILE_SEP_STRING "testdat a" U_FILE_SEP_STRING;
417 #else 417 #else
418 srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_STRI NG"testdata"U_FILE_SEP_STRING; 418 srcDataDir = ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING "test" U_FILE_SEP _STRING "testdata" U_FILE_SEP_STRING;
419 FILE *f = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING"test"U_FILE_SEP_S TRING"testdata"U_FILE_SEP_STRING"rbbitst.txt", "r"); 419 FILE *f = fopen(".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING "test" U_FILE_ SEP_STRING "testdata" U_FILE_SEP_STRING "rbbitst.txt", "r");
420 420
421 if (f != NULL) { 421 if (f != NULL) {
422 /* We're in icu/source/test/letest/ */ 422 /* We're in icu/source/test/letest/ */
423 fclose(f); 423 fclose(f);
424 } else { 424 } else {
425 /* We're in icu/source/test/letest/(Debug|Release) */ 425 /* We're in icu/source/test/letest/(Debug|Release) */
426 srcDataDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FILE_SEP_ST RING"test"U_FILE_SEP_STRING"testdata"U_FILE_SEP_STRING; 426 srcDataDir = ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING ".." U_FILE_ SEP_STRING "test"
427 U_FILE_SEP_STRING "testdata" U_FILE_SEP_STRING;
427 } 428 }
428 #endif 429 #endif
429 430
430 return srcDataDir; 431 return srcDataDir;
431 } 432 }
432 433
433 const char *getPath(char buffer[2048], const char *filename) { 434 const char *getPath(char buffer[2048], const char *filename) {
434 const char *testDataDirectory = getSourceTestData(); 435 const char *testDataDirectory = getSourceTestData();
435 436
436 strcpy(buffer, testDataDirectory); 437 strcpy(buffer, testDataDirectory);
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 1022
1022 if (pBackSlash != NULL) { 1023 if (pBackSlash != NULL) {
1023 /* We found and truncated three names from the path. 1024 /* We found and truncated three names from the path.
1024 * Now append "source\data" and set the environment 1025 * Now append "source\data" and set the environment
1025 */ 1026 */
1026 strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING); 1027 strcpy(pBackSlash, U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING);
1027 dataOutDir = p; 1028 dataOutDir = p;
1028 } 1029 }
1029 else { 1030 else {
1030 /* __FILE__ on MSVC7 does not contain the directory */ 1031 /* __FILE__ on MSVC7 does not contain the directory */
1031 FILE *file = fopen(".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U_FILE_SEP_STRING "Makefile.in", "r"); 1032 FILE *file = fopen(".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING "da ta" U_FILE_SEP_STRING "Makefile.in", "r");
1032 if (file) { 1033 if (file) {
1033 fclose(file); 1034 fclose(file);
1034 dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING "data" U _FILE_SEP_STRING "out" U_FILE_SEP_STRING; 1035 dataOutDir = ".." U_FILE_SEP_STRING ".." U_FILE_SEP_STRING "data " U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
1035 } 1036 }
1036 else { 1037 else {
1037 dataOutDir = ".."U_FILE_SEP_STRING".."U_FILE_SEP_STRING".."U_FIL E_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING; 1038 dataOutDir = ".." U_FILE_SEP_STRING".." U_FILE_SEP_STRING".." U_ FILE_SEP_STRING "data" U_FILE_SEP_STRING "out" U_FILE_SEP_STRING;
1038 } 1039 }
1039 } 1040 }
1040 } 1041 }
1041 #endif 1042 #endif
1042 1043
1043 return dataOutDir; 1044 return dataOutDir;
1044 } 1045 }
1045 1046
1046 /* ctest_setICU_DATA - if the ICU_DATA environment variable is not already 1047 /* ctest_setICU_DATA - if the ICU_DATA environment variable is not already
1047 * set, try to deduce the directory in which ICU was built , 1048 * set, try to deduce the directory in which ICU was built ,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 diffTime = (int32_t)(endTime - startTime); 1123 diffTime = (int32_t)(endTime - startTime);
1123 printf("Elapsed Time: %02d:%02d:%02d.%03d\n", 1124 printf("Elapsed Time: %02d:%02d:%02d.%03d\n",
1124 (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR), 1125 (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR),
1125 (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE), 1126 (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE),
1126 (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND), 1127 (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND),
1127 (int)(diffTime%U_MILLIS_PER_SECOND)); 1128 (int)(diffTime%U_MILLIS_PER_SECOND));
1128 1129
1129 return nerrors; 1130 return nerrors;
1130 } 1131 }
1131 1132
OLDNEW
« no previous file with comments | « source/test/letest/gendata.vcxproj.filters ('k') | source/test/letest/letest.vcxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698