Update the sample text tests for Android 6.0 (marshmallow).

This commit is contained in:
Reece H. Dunn
2015-10-08 20:31:33 +01:00
parent 90481713de
commit 784c5e9c2d
2 changed files with 12 additions and 37 deletions
@@ -325,7 +325,7 @@ public class SpeechSynthesisTest extends TextToSpeechTestCase
{
final Locale ianaLocale = new Locale(data.ianaLanguage, data.ianaCountry, data.variant);
context = "[iana:sample-text]";
assertThat(SpeechSynthesis.getSampleText(getContext(), ianaLocale), anyOf(equalTo(data.sampleText), equalTo(data.sampleTextAlt)));
assertThat(SpeechSynthesis.getSampleText(getContext(), ianaLocale), isIn(data.sampleText));
context = "[iana:resource-locale]";
assertThat(getContext().getResources().getAssets().getLocales(), is(currentLocales));
@@ -333,7 +333,7 @@ public class SpeechSynthesisTest extends TextToSpeechTestCase
{
final Locale javaLocale = new Locale(data.javaLanguage, data.javaCountry, data.variant);
context = "[java:sample-text]";
assertThat(SpeechSynthesis.getSampleText(getContext(), javaLocale), anyOf(equalTo(data.sampleText), equalTo(data.sampleTextAlt)));
assertThat(SpeechSynthesis.getSampleText(getContext(), javaLocale), isIn(data.sampleText));
context = "[java:resource-locale]";
assertThat(getContext().getResources().getAssets().getLocales(), is(currentLocales));
}