aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod
diff options
context:
space:
mode:
authorSeigo Nonaka <nona@google.com>2020-07-22 20:56:25 -0700
committerSeigo Nonaka <nona@google.com>2020-07-31 11:28:59 -0700
commit0c549e742426431ba9fdcca57d0724224bf13ae2 (patch)
tree37982b235622b3fb46257f1d910fb01bf3b914f8 /tests/src/com/android/inputmethod
parent9490b1b92f06c83d9d596833ef4d38de10b8ef4b (diff)
downloadlatinime-0c549e742426431ba9fdcca57d0724224bf13ae2.tar.gz
latinime-0c549e742426431ba9fdcca57d0724224bf13ae2.tar.xz
latinime-0c549e742426431ba9fdcca57d0724224bf13ae2.zip
Update language to comply with Android’s inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference Bug: 161896447 Test: tapas LatinIME && m Change-Id: Ic06f948c023a091e1532db826a78dd01031d7205
Diffstat (limited to 'tests/src/com/android/inputmethod')
-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());
}