From 742d22d13e589837c8703ebdd78843f339e11f60 Mon Sep 17 00:00:00 2001 From: Kirti Velankar Date: Sat, 30 Jan 2010 00:46:40 +0000 Subject: [PATCH] ICU-3931 Uncommented the invalid keywords test X-SVN-Rev: 27450 --- icu4c/source/test/intltest/selfmts.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/icu4c/source/test/intltest/selfmts.cpp b/icu4c/source/test/intltest/selfmts.cpp index 0668196756..0caf0581fb 100644 --- a/icu4c/source/test/intltest/selfmts.cpp +++ b/icu4c/source/test/intltest/selfmts.cpp @@ -115,7 +115,7 @@ void SelectFormatTest::selectFormatUnitTest(/*char *par*/) } } - logln("SelectFormat Unit Test : Creaing format object for Testing applying various patterns"); + logln("SelectFormat Unit Test : Creating format object for Testing applying various patterns"); status = U_ZERO_ERROR; selFmt = new SelectFormat( SIMPLE_PATTERN , status); //SelectFormat* selFmt1 = new SelectFormat( SIMPLE_PATTERN , status); @@ -151,7 +151,6 @@ void SelectFormatTest::selectFormatUnitTest(/*char *par*/) } } -/* //Test with an invalid keyword logln("SelectFormat Unit test: Testing format() with keyword method and with invalid keywords..."); status = U_ZERO_ERROR; @@ -161,18 +160,18 @@ void SelectFormatTest::selectFormatUnitTest(/*char *par*/) "-Keyword-_", //Starts with a hyphen "_Keyword-_", //Starts with a underscore "\\u00E9Keyword-_", //Starts with non-ASCII character - "Key*word-_" //Contains a sepial character not allowed - "*Keyword-_" //Starts with a sepial character not allowed + "Key*word-_", //Contains a sepial character not allowed + "*Keyword-_" //Starts with a sepial character not allowed }; selFmt = new SelectFormat( SIMPLE_PATTERN , status); - for (int i = 0; i< 6; i++ ){ + for (int32_t i = 0; i< 6; i++ ){ + status = U_ZERO_ERROR; selFmt->format( keywords[i], result , ignore , status); if (!U_FAILURE(status)) { errln("ERROR: SelectFormat Unit test failed in format() with keyWord and with an invalid keyword as : "+ keywords[i]); } } -*/ delete selFmt; }