Lines Matching refs:SelectFormat
30 if (exec) logln("TestSuite SelectFormat");
40 * Unit tests of SelectFormat class.
95 SelectFormat* selFmt = new SelectFormat( SIMPLE_PATTERN , status);
97 dataerrln("ERROR: SelectFormat Unit Test constructor failed in unit tests.- exitting");
101 // ======= Test SelectFormat pattern syntax.
102 logln("SelectFormat Unit Test : Testing SelectFormat pattern syntax.");
109 errln("\nERROR: Unexpected result - SelectFormat Unit Test failed to detect syntax error with pattern: "+checkSyntaxData[i]);
128 logln("SelectFormat Unit Test : Creating format object for Testing applying various patterns");
130 selFmt = new SelectFormat( SIMPLE_PATTERN , status);
131 //SelectFormat* selFmt1 = new SelectFormat( SIMPLE_PATTERN , status);
133 errln("ERROR: SelectFormat Unit Test constructor failed in unit tests.- exitting");
138 logln("SelectFormat Unit test: Testing applyPattern() and format() ...");
146 errln("ERROR: SelectFormat Unit Test failed to apply pattern- "+patternTestData[i] );
155 errln("ERROR: SelectFormat Unit test failed in format() with argument: "+ formatArgs[j] + " and error is " + u_errorName(status) );
158 errln("ERROR: SelectFormat Unit test failed in format() with unexpected result\n with argument: "+ formatArgs[j] + "\n result obtained: " + result + "\n and expected is: " + expFormatResult[i][j] );
166 logln("SelectFormat Unit test: Testing format() with keyword method and with invalid keywords...");
183 selFmt = new SelectFormat( SIMPLE_PATTERN , status);
188 errln("ERROR: SelectFormat Unit test failed in format() with keyWord and with an invalid keyword as : "+
197 * Test various generic API methods of SelectFormat for Basic API usage.
205 SelectFormat* selFmt[3] = { NULL, NULL, NULL };
208 logln("SelectFormat API test: Testing SelectFormat constructors ...");
213 selFmt[0]= new SelectFormat(SIMPLE_PATTERN, status[0]);
215 errln("ERROR: SelectFormat API test constructor with pattern and status failed! with %s\n", u_errorName(status[0]));
220 logln("SelectFormat API test: Testing copy constructor and == operator ...");
221 SelectFormat fmt = *selFmt[0];
222 SelectFormat* dupPFmt = new SelectFormat(fmt);
224 errln("ERROR: SelectFormat API test Failed in copy constructor or == operator!");
229 logln("SelectFormat API test: Testing clone and == operator ...");
231 selFmt[1] = (SelectFormat*)selFmt[0]->clone();
234 errln("ERROR: SelectFormat API test clone test failed!");
237 errln("ERROR: SelectFormat API test clone test failed with NULL!");
246 logln("SelectFormat API test: Testing assignment operator and == operator ...");
247 selFmt[2]= new SelectFormat(SIMPLE_PATTERN, status[2]);
252 errln("ERROR: SelectFormat API test assignment operator test failed!");
258 errln("ERROR: SelectFormat constructor failed in assignment operator!");
264 logln("SelectFormat API test: Testing getStaticClassID() and getStaticClassID() ...");
266 SelectFormat* selFmt1 = new SelectFormat( SIMPLE_PATTERN , status1);
268 errln("ERROR: SelectFormat constructor failed in staticClassID test! Exitting");
273 if(selFmt1->getDynamicClassID() !=SelectFormat::getStaticClassID()) {
274 errln("ERROR: SelectFormat API test getDynamicClassID() didn't return the expected value");
278 logln("SelectFormat API test: Testing applyPattern() and toPattern() ...");
283 errln("ERROR: SelectFormat API test failed in applyPattern() with pattern: "+ pattern);
288 errln("ERROR: SelectFormat API test failed in toPattern() with unexpected result with pattern: "+ pattern);
293 logln("SelectFormat API test: Testing format() with keyword method ...");
301 errln("ERROR: SelectFormat API test failed in format() with keyWord: "+ keyWord);
305 errln("ERROR: SelectFormat API test failed in format() with unexpected result with keyWord: "+ keyWord);
309 logln("SelectFormat API test: Testing format() with Formattable obj method ...");
316 errln("ERROR: SelectFormat API test failed in format() with Formattable");
320 errln("ERROR: SelectFormat API test failed in format() with unexpected result with Formattable");