mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
ICU-785 test setText(UChar *, -1)
X-SVN-Rev: 6758
This commit is contained in:
parent
5822031881
commit
6aab2a7c7c
1 changed files with 12 additions and 0 deletions
|
@ -767,6 +767,18 @@ BasicNormalizerTest::TestNormalizerAPI() {
|
|||
errln("error in Normalizer::setText(UChar *) or Normalizer::setMode()");
|
||||
}
|
||||
|
||||
// test setText(UChar *, length=-1)
|
||||
errorCode=U_ZERO_ERROR;
|
||||
|
||||
// NUL-terminate s
|
||||
s.append((UChar)0); // append NUL
|
||||
s.truncate(s.length()-1); // undo length change
|
||||
|
||||
copy.setText(s.getBuffer()+1, -1, errorCode);
|
||||
if(copy.endIndex()!=s.length()-1) {
|
||||
errln("error in Normalizer::setText(UChar *, -1)");
|
||||
}
|
||||
|
||||
// test setOption() and getOption()
|
||||
copy.setOption(0xaa0000, TRUE);
|
||||
copy.setOption(0x20000, FALSE);
|
||||
|
|
Loading…
Add table
Reference in a new issue