| 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: custrtst.c | 8 * file name: custrtst.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: 2002oct09 | 13 * created on: 2002oct09 |
| 14 * created by: Markus W. Scherer | 14 * created by: Markus W. Scherer |
| (...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 --length; | 1153 --length; |
| 1154 } | 1154 } |
| 1155 | 1155 |
| 1156 /* test u_strHasMoreChar32Than() with NUL-termination (length=-1) */ | 1156 /* test u_strHasMoreChar32Than() with NUL-termination (length=-1) */ |
| 1157 length=UPRV_LENGTHOF(string); | 1157 length=UPRV_LENGTHOF(string); |
| 1158 u_memcpy(buffer, string, length); | 1158 u_memcpy(buffer, string, length); |
| 1159 while(length>=0) { | 1159 while(length>=0) { |
| 1160 buffer[length]=0; | 1160 buffer[length]=0; |
| 1161 for(i=0; i<=length; ++i) { | 1161 for(i=0; i<=length; ++i) { |
| 1162 for(number=-1; number<=((length-i)+2); ++number) { | 1162 for(number=-1; number<=((length-i)+2); ++number) { |
| 1163 _testStrHasMoreChar32Than(string+i, i, -1, number); | 1163 _testStrHasMoreChar32Than(buffer+i, i, -1, number); |
| 1164 } | 1164 } |
| 1165 } | 1165 } |
| 1166 --length; | 1166 --length; |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 /* test u_strHasMoreChar32Than() with NULL string (bad input) */ | 1169 /* test u_strHasMoreChar32Than() with NULL string (bad input) */ |
| 1170 for(length=-1; length<=1; ++length) { | 1170 for(length=-1; length<=1; ++length) { |
| 1171 for(i=0; i<=length; ++i) { | 1171 for(i=0; i<=length; ++i) { |
| 1172 for(number=-2; number<=2; ++number) { | 1172 for(number=-2; number<=2; ++number) { |
| 1173 _testStrHasMoreChar32Than(NULL, 0, length, number); | 1173 _testStrHasMoreChar32Than(NULL, 0, length, number); |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 uiter_setUTF16BE(&iter2, bytes, -1); | 1502 uiter_setUTF16BE(&iter2, bytes, -1); |
| 1503 compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF16BEIterator_1"); | 1503 compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF16BEIterator_1"); |
| 1504 | 1504 |
| 1505 /* try again after moving the bytes up one, and with length=-1 */ | 1505 /* try again after moving the bytes up one, and with length=-1 */ |
| 1506 memmove(bytes+1, bytes, length+2); | 1506 memmove(bytes+1, bytes, length+2); |
| 1507 uiter_setUTF16BE(&iter2, bytes+1, -1); | 1507 uiter_setUTF16BE(&iter2, bytes+1, -1); |
| 1508 compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF16BEIteratorMoved1"); | 1508 compareIterators(&iter1, "UTF16Iterator", &iter2, "UTF16BEIteratorMoved1"); |
| 1509 | 1509 |
| 1510 /* ### TODO test other iterators: CharacterIterator, Replaceable */ | 1510 /* ### TODO test other iterators: CharacterIterator, Replaceable */ |
| 1511 } | 1511 } |
| OLD | NEW |