public void TestT5615() { ULocale[] ulocales = BreakIterator.GetAvailableULocales(); int type = 0; ULocale loc = null; try { for (int i = 0; i < ulocales.Length; i++) { loc = ulocales[i]; for (type = 0; type < 5 /* 5 = BreakIterator.KIND_COUNT */; ++type) { BreakIterator brk = BreakIterator.GetBreakInstance(loc, type); if (brk == null) { Errln("ERR: Failed to create an instance type: " + type + " / locale: " + loc); } } } } catch (Exception e) { Errln("ERR: Failed to create an instance type: " + type + " / locale: " + loc + " / exception: " + e.ToString()); } }
public void TestGetAvailableLocales() { CultureInfo[] locList = BreakIterator.GetAvailableCultures(); if (locList.Length == 0) { Errln("getAvailableLocales() returned an empty list!"); } // I have no idea how to test this function... ULocale[] ulocList = BreakIterator.GetAvailableULocales(); if (ulocList.Length == 0) { Errln("getAvailableULocales() returned an empty list!"); } else { Logln("getAvailableULocales() returned " + ulocList.Length + " locales"); } }