mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-11 00:26:08 +00:00
TextToSpeechTest: always test getLanguage.
This changes the getLanguage helper to return the result from getLanguage on all platform versions, disabling the deprecated message on API 21 and above.
This commit is contained in:
@@ -33,13 +33,10 @@ public class TextToSpeechTest extends TextToSpeechTestCase
|
||||
Locale initialLocale = getLanguage(getEngine());
|
||||
assertThat(getEngine().isLanguageAvailable(new Locale("cel")), isTtsLangCode(TextToSpeech.LANG_NOT_SUPPORTED));
|
||||
Locale language = getLanguage(getEngine());
|
||||
if (language != null) {
|
||||
assertThat(getLanguage(getEngine()).getLanguage(), is(initialLocale.getLanguage()));
|
||||
assertThat(getLanguage(getEngine()).getCountry(), is(initialLocale.getCountry()));
|
||||
assertThat(getLanguage(getEngine()).getVariant(), is(initialLocale.getVariant()));
|
||||
} else {
|
||||
assertThat(initialLocale, is(nullValue()));
|
||||
}
|
||||
|
||||
assertThat(getLanguage(getEngine()).getLanguage(), is(initialLocale.getLanguage()));
|
||||
assertThat(getLanguage(getEngine()).getCountry(), is(initialLocale.getCountry()));
|
||||
assertThat(getLanguage(getEngine()).getVariant(), is(initialLocale.getVariant()));
|
||||
}
|
||||
|
||||
public void testLanguages()
|
||||
|
||||
Reference in New Issue
Block a user