aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-07-31 22:18:26 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-31 22:18:26 +0000
commitcfc80fd3045794dcc82f67dcf7e9bfe0b50cbaac (patch)
tree552708022329a01e9fd7efdaa9d1a84791b9f41c /tests/src
parenta6c7396edfb4d764315b7339382e9adbbd1c41b9 (diff)
parentccfef1083a860ae4cce0ce59b6fcaa20db3fdbf5 (diff)
downloadlatinime-cfc80fd3045794dcc82f67dcf7e9bfe0b50cbaac.tar.gz
latinime-cfc80fd3045794dcc82f67dcf7e9bfe0b50cbaac.tar.xz
latinime-cfc80fd3045794dcc82f67dcf7e9bfe0b50cbaac.zip
Merge "Update language to comply with Android’s inclusive language guidance" am: b01f678ca8 am: 6fc67acb39 am: 94047a03d9 am: ccfef1083a
Original change: https://android-review.googlesource.com/c/platform/packages/inputmethods/LatinIME/+/1371237 Change-Id: I5356f0a29c0a2a0240222dce6d1b4277b0cd22fe
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java24
-rw-r--r--tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java2
2 files changed, 13 insertions, 13 deletions
diff --git a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
index 68f041589..bc9881bde 100644
--- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
+++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java
@@ -118,15 +118,15 @@ public class UserHistoryDictionaryTests {
private void doTestRandomWords(final String testAccount) {
Log.d(TAG, "This test can be used for profiling.");
Log.d(TAG, "Usage: please set UserHistoryDictionary.PROFILE_SAVE_RESTORE to true.");
- final Locale dummyLocale = UserHistoryDictionaryTestsHelper.getDummyLocale("random_words");
+ final Locale fakeLocale = UserHistoryDictionaryTestsHelper.getFakeLocale("random_words");
final String dictName = UserHistoryDictionary.getUserHistoryDictName(
- UserHistoryDictionary.NAME, dummyLocale,
+ UserHistoryDictionary.NAME, fakeLocale,
null /* dictFile */,
testAccount /* account */);
final File dictFile = ExpandableBinaryDictionary.getDictFile(
getContext(), dictName, null /* dictFile */);
final UserHistoryDictionary dict = PersonalizationHelper.getUserHistoryDictionary(
- getContext(), dummyLocale, testAccount);
+ getContext(), fakeLocale, testAccount);
clearHistory(dict);
final int numberOfWords = 1000;
@@ -169,15 +169,15 @@ public class UserHistoryDictionaryTests {
// Create filename suffixes for this test.
for (int i = 0; i < numberOfLanguages; i++) {
- final Locale dummyLocale =
- UserHistoryDictionaryTestsHelper.getDummyLocale("switching_languages" + i);
+ final Locale fakeLocale =
+ UserHistoryDictionaryTestsHelper.getFakeLocale("switching_languages" + i);
final String dictName = UserHistoryDictionary.getUserHistoryDictName(
- UserHistoryDictionary.NAME, dummyLocale, null /* dictFile */,
+ UserHistoryDictionary.NAME, fakeLocale, null /* dictFile */,
testAccount /* account */);
dictFiles[i] = ExpandableBinaryDictionary.getDictFile(
getContext(), dictName, null /* dictFile */);
dicts[i] = PersonalizationHelper.getUserHistoryDictionary(getContext(),
- dummyLocale, testAccount);
+ fakeLocale, testAccount);
clearHistory(dicts[i]);
}
@@ -214,19 +214,19 @@ public class UserHistoryDictionaryTests {
}
private void doTestAddManyWords(final String testAccount) {
- final Locale dummyLocale =
- UserHistoryDictionaryTestsHelper.getDummyLocale("many_random_words");
+ final Locale fakeLocale =
+ UserHistoryDictionaryTestsHelper.getFakeLocale("many_random_words");
final String dictName = UserHistoryDictionary.getUserHistoryDictName(
- UserHistoryDictionary.NAME, dummyLocale, null /* dictFile */, testAccount);
+ UserHistoryDictionary.NAME, fakeLocale, null /* dictFile */, testAccount);
final File dictFile = ExpandableBinaryDictionary.getDictFile(
getContext(), dictName, null /* dictFile */);
final int numberOfWords = 10000;
final Random random = new Random(123456);
final UserHistoryDictionary dict = PersonalizationHelper.getUserHistoryDictionary(
- getContext(), dummyLocale, testAccount);
+ getContext(), fakeLocale, testAccount);
clearHistory(dict);
assertTrue(UserHistoryDictionaryTestsHelper.addAndWriteRandomWords(dict,
numberOfWords, random, true /* checksContents */, mCurrentTime));
assertDictionaryExists(dict, dictFile);
}
-} \ No newline at end of file
+}
diff --git a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java
index d3ea2705b..73d7e7339 100644
--- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java
+++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java
@@ -110,7 +110,7 @@ public class UserHistoryDictionaryTestsHelper {
/**
* Creates unique test locale for using within tests.
*/
- public static Locale getDummyLocale(final String name) {
+ public static Locale getFakeLocale(final String name) {
return new Locale(TEST_LOCALE_PREFIX + name + System.currentTimeMillis());
}