From 9c16796676e1523ac68d83a5754b4f4ad2652f72 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 3 Apr 2002 00:02:31 +0000 Subject: [PATCH] ICU-1686 test for uchariter X-SVN-Rev: 8350 --- icu4c/source/test/intltest/citrtest.cpp | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/icu4c/source/test/intltest/citrtest.cpp b/icu4c/source/test/intltest/citrtest.cpp index ddb30c0ecdc..f12cd57e353 100644 --- a/icu4c/source/test/intltest/citrtest.cpp +++ b/icu4c/source/test/intltest/citrtest.cpp @@ -751,4 +751,38 @@ void CharIterTest::TestUCharIterator() { ) { errln("error: UCharIterator(character iterator).move sets/returns wrong index"); } + + + if(cIter.getIndex(&cIter, (enum UCharIteratorOrigin)-1) != -1) + { + errln("error: UCharIterator(char iter).getIndex did not return error value"); + } + + if(cIter.move(&cIter, 0, (enum UCharIteratorOrigin)-1) != -1) + { + errln("error: UCharIterator(char iter).move did not return error value"); + } + + + if(rIter.getIndex(&rIter, (enum UCharIteratorOrigin)-1) != -1) + { + errln("error: UCharIterator(repl iter).getIndex did not return error value"); + } + + if(rIter.move(&rIter, 0, (enum UCharIteratorOrigin)-1) != -1) + { + errln("error: UCharIterator(repl iter).move did not return error value"); + } + + + if(sIter.getIndex(&sIter, (enum UCharIteratorOrigin)-1) != -1) + { + errln("error: UCharIterator(string iter).getIndex did not return error value"); + } + + if(sIter.move(&sIter, 0, (enum UCharIteratorOrigin)-1) != -1) + { + errln("error: UCharIterator(string iter).move did not return error value"); + } + }