SpeechSynthesis: fix the getSampleText behaviour when passed Java-style locale codes.

This commit is contained in:
Reece H. Dunn
2012-12-18 15:39:00 +00:00
parent 2a3a1a0a81
commit dc4f85865d
3 changed files with 104 additions and 5 deletions
@@ -321,6 +321,12 @@ public class SpeechSynthesisTest extends AndroidTestCase
{
final Locale ianaLocale = new Locale(data.ianaLanguage, data.ianaCountry, data.variant);
assertThat(SpeechSynthesis.getSampleText(getContext(), ianaLocale), is(data.sampleText));
if (!data.javaLanguage.equals(""))
{
final Locale javaLocale = new Locale(data.javaLanguage, data.javaCountry, data.variant);
assertThat(SpeechSynthesis.getSampleText(getContext(), javaLocale), is(data.sampleText));
}
}
catch (AssertionError e)
{