Test and fix Java to IANA language code mapping.

This commit is contained in:
Reece H. Dunn
2014-10-28 15:23:53 +00:00
parent f68efe7224
commit 6576742917
2 changed files with 19 additions and 12 deletions
@@ -171,6 +171,14 @@ public class SpeechSynthesisTest extends TextToSpeechTestCase
assertThat(synth.getBufferSizeInBytes(), is(22050));
}
public void testJavaToIanaLanguageCode()
{
for (VoiceData.Voice data : VoiceData.voices)
{
assertThat(SpeechSynthesis.getIanaLanguageCode(data.javaLanguage), is(data.ianaLanguage));
}
}
public void testAddedVoices()
{
getVoices(); // Ensure that the voice data has been populated.