Quit using try catch in addAndWriteRandomWords.

Change-Id: I1f3137bacf02bf6bad03a9a99fa56346ff0cd763
main
Keisuke Kuroyanagi 2014-09-22 17:11:26 +09:00
parent b12c174c2f
commit 504017e6dd
1 changed files with 3 additions and 7 deletions

View File

@ -213,13 +213,9 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
final int numberOfWords = 1000; final int numberOfWords = 1000;
final Random random = new Random(123456); final Random random = new Random(123456);
clearHistory(dict);
try { addAndWriteRandomWords(dict, numberOfWords, random, true /* checksContents */);
clearHistory(dict); checkExistenceAndRemoveDictFile(dict, dictFile);
addAndWriteRandomWords(dict, numberOfWords, random, true /* checksContents */);
} finally {
checkExistenceAndRemoveDictFile(dict, dictFile);
}
} }
public void testStressTestForSwitchingLanguagesAndAddingWords() { public void testStressTestForSwitchingLanguagesAndAddingWords() {