-#ifdef U_USE_CHOICE_FORMAT_DEPRECATES
- double* d_a = (double *)uprv_malloc(2 * sizeof(double));
- if (!d_a) { it_errln("*** allocation error."); return; }
- d_a[0] = 1.0; d_a[1] = 2.0;
-
- UnicodeString* s_a = new UnicodeString[2];
- if (!s_a) { it_errln("*** allocation error."); return; }
- s_a[0] = "first"; s_a[1] = "second";
-
- form_pat.adoptChoices( d_a, s_a, 2 );
- form_pat.toPattern( res1 );
- it_out << "ChoiceFormat adoptChoices toPattern: " << res1 << endl;
- if (res1 == "1.0#first|2.0#second") {
- it_logln("ChoiceFormat adoptChoices tested");
- }else{
- it_errln("*** ChoiceFormat adoptChoices result!");
- }
-#endif
-