mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-04 14:33:31 +00:00
TextToSpeechTest: move out the unsupported language tests to a separate method and check that the language does not get updated.
This commit is contained in:
@@ -74,10 +74,20 @@ public class TextToSpeechTest extends AndroidTestCase
|
||||
}
|
||||
}
|
||||
|
||||
public void testUnsupportedLanguage()
|
||||
{
|
||||
assertThat(mEngine, is(notNullValue()));
|
||||
|
||||
Locale initialLocale = mEngine.getLanguage();
|
||||
assertThat(mEngine.isLanguageAvailable(new Locale("cel")), is(TextToSpeech.LANG_NOT_SUPPORTED));
|
||||
assertThat(mEngine.getLanguage().getLanguage(), is(initialLocale.getLanguage()));
|
||||
assertThat(mEngine.getLanguage().getCountry(), is(initialLocale.getCountry()));
|
||||
assertThat(mEngine.getLanguage().getVariant(), is(initialLocale.getVariant()));
|
||||
}
|
||||
|
||||
public void testLanguages()
|
||||
{
|
||||
assertThat(mEngine, is(notNullValue()));
|
||||
assertThat(mEngine.isLanguageAvailable(new Locale("cel")), is(TextToSpeech.LANG_NOT_SUPPORTED));
|
||||
|
||||
for (VoiceData.Voice data : VoiceData.voices)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user