ICU-785 test setText(UChar *, -1)

X-SVN-Rev: 6758
This commit is contained in:
Markus Scherer 2001-11-11 00:53:28 +00:00
parent 5822031881
commit 6aab2a7c7c

View file

@ -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);