Browse Source

TextToSpeechTest: move out the unsupported language tests to a separate method and check that the language does not get updated.

master
Reece H. Dunn 12 years ago
parent
commit
b30311a7d7

+ 11
- 1
android/eSpeakTests/src/com/reecedunn/espeak/test/TextToSpeechTest.java View File

} }
} }


public void testLanguages()
public void testUnsupportedLanguage()
{ {
assertThat(mEngine, is(notNullValue())); assertThat(mEngine, is(notNullValue()));

Locale initialLocale = mEngine.getLanguage();
assertThat(mEngine.isLanguageAvailable(new Locale("cel")), is(TextToSpeech.LANG_NOT_SUPPORTED)); 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()));


for (VoiceData.Voice data : VoiceData.voices) for (VoiceData.Voice data : VoiceData.voices)
{ {

Loading…
Cancel
Save