parent
654b0a9c16
commit
732475dd24
|
@ -90,8 +90,9 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
|
||||||
final String locale = "testRandomWords";
|
final String locale = "testRandomWords";
|
||||||
final String fileName = "UserHistoryDictionary." + locale + ".dict";
|
final String fileName = "UserHistoryDictionary." + locale + ".dict";
|
||||||
dictFile = new File(getContext().getFilesDir(), fileName);
|
dictFile = new File(getContext().getFilesDir(), fileName);
|
||||||
final UserHistoryDictionary dict = UserHistoryDictionary.getInstance(getContext(),
|
final UserHistoryDictionary dict =
|
||||||
locale, mPrefs);
|
PersonalizationDictionaryHelper.getUserHistoryDictionary(
|
||||||
|
getContext(), locale, mPrefs);
|
||||||
dict.isTest = true;
|
dict.isTest = true;
|
||||||
|
|
||||||
addToDict(dict, words);
|
addToDict(dict, words);
|
||||||
|
@ -141,8 +142,9 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
|
||||||
for (int i = 0; i < numberOfLanguageSwitching; i++) {
|
for (int i = 0; i < numberOfLanguageSwitching; i++) {
|
||||||
final int index = i % numberOfLanguages;
|
final int index = i % numberOfLanguages;
|
||||||
// Switch languages to locales[index].
|
// Switch languages to locales[index].
|
||||||
final UserHistoryDictionary dict = UserHistoryDictionary.getInstance(getContext(),
|
final UserHistoryDictionary dict =
|
||||||
locales[index], mPrefs);
|
PersonalizationDictionaryHelper.getUserHistoryDictionary(
|
||||||
|
getContext(), locales[index], mPrefs);
|
||||||
final List<String> words = generateWords(
|
final List<String> words = generateWords(
|
||||||
numberOfWordsIntertedForEachLanguageSwitch, random);
|
numberOfWordsIntertedForEachLanguageSwitch, random);
|
||||||
// Add random words to the user history dictionary.
|
// Add random words to the user history dictionary.
|
||||||
|
|
Loading…
Reference in New Issue