mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-05 22:53:38 +00:00
tests: initial language may be null
This commit is contained in:
@@ -32,9 +32,14 @@ public class TextToSpeechTest extends TextToSpeechTestCase
|
||||
|
||||
Locale initialLocale = getLanguage(getEngine());
|
||||
assertThat(getEngine().isLanguageAvailable(new Locale("cel")), isTtsLangCode(TextToSpeech.LANG_NOT_SUPPORTED));
|
||||
assertThat(getLanguage(getEngine()).getLanguage(), is(initialLocale.getLanguage()));
|
||||
assertThat(getLanguage(getEngine()).getCountry(), is(initialLocale.getCountry()));
|
||||
assertThat(getLanguage(getEngine()).getVariant(), is(initialLocale.getVariant()));
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
public void testLanguages()
|
||||
|
||||
Reference in New Issue
Block a user