OLD | NEW |
1 /* | 1 /* |
2 ****************************************************************************** | 2 ****************************************************************************** |
3 * | 3 * |
4 * Copyright (C) 2002-2014, International Business Machines | 4 * Copyright (C) 2002-2015, International Business Machines |
5 * Corporation and others. All Rights Reserved. | 5 * Corporation and others. All Rights Reserved. |
6 * | 6 * |
7 ****************************************************************************** | 7 ****************************************************************************** |
8 * file name: bocu1tst.c | 8 * file name: bocu1tst.c |
9 * encoding: US-ASCII | 9 * encoding: US-ASCII |
10 * tab size: 8 (not used) | 10 * tab size: 8 (not used) |
11 * indentation:4 | 11 * indentation:4 |
12 * | 12 * |
13 * created on: 2002may27 | 13 * created on: 2002may27 |
14 * created by: Markus W. Scherer | 14 * created by: Markus W. Scherer |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 TestBOCU1(void) { | 976 TestBOCU1(void) { |
977 UChar *text; | 977 UChar *text; |
978 int32_t i, length; | 978 int32_t i, length; |
979 | 979 |
980 UConverter *bocu1; | 980 UConverter *bocu1; |
981 UErrorCode errorCode; | 981 UErrorCode errorCode; |
982 | 982 |
983 errorCode=U_ZERO_ERROR; | 983 errorCode=U_ZERO_ERROR; |
984 bocu1=ucnv_open("BOCU-1", &errorCode); | 984 bocu1=ucnv_open("BOCU-1", &errorCode); |
985 if(U_FAILURE(errorCode)) { | 985 if(U_FAILURE(errorCode)) { |
986 log_err("error: unable to open BOCU-1 converter: %s\n", u_errorName(erro
rCode)); | 986 log_data_err("error: unable to open BOCU-1 converter: %s\n", u_errorName
(errorCode)); |
987 return; | 987 return; |
988 } | 988 } |
989 | 989 |
990 text = malloc(DEFAULT_BUFFER_SIZE * sizeof(UChar)); | 990 text = malloc(DEFAULT_BUFFER_SIZE * sizeof(UChar)); |
991 | 991 |
992 /* text 1: each of strings[] once */ | 992 /* text 1: each of strings[] once */ |
993 length=0; | 993 length=0; |
994 for(i=0; i<UPRV_LENGTHOF(strings); ++i) { | 994 for(i=0; i<UPRV_LENGTHOF(strings); ++i) { |
995 u_memcpy(text+length, strings[i].s, strings[i].length); | 995 u_memcpy(text+length, strings[i].s, strings[i].length); |
996 length+=strings[i].length; | 996 length+=strings[i].length; |
(...skipping 25 matching lines...) Expand all Loading... |
1022 free(text); | 1022 free(text); |
1023 } | 1023 } |
1024 | 1024 |
1025 U_CFUNC void addBOCU1Tests(TestNode** root); | 1025 U_CFUNC void addBOCU1Tests(TestNode** root); |
1026 | 1026 |
1027 U_CFUNC void | 1027 U_CFUNC void |
1028 addBOCU1Tests(TestNode** root) { | 1028 addBOCU1Tests(TestNode** root) { |
1029 addTest(root, TestBOCU1RefDiff, "tsconv/bocu1tst/TestBOCU1RefDiff"); | 1029 addTest(root, TestBOCU1RefDiff, "tsconv/bocu1tst/TestBOCU1RefDiff"); |
1030 addTest(root, TestBOCU1, "tsconv/bocu1tst/TestBOCU1"); | 1030 addTest(root, TestBOCU1, "tsconv/bocu1tst/TestBOCU1"); |
1031 } | 1031 } |
OLD | NEW |