aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java2
-rw-r--r--tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java4
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java4
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java2
-rw-r--r--tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java24
-rw-r--r--tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java4
6 files changed, 20 insertions, 20 deletions
diff --git a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
index a0544d62a..e3fb30dbb 100644
--- a/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
+++ b/tests/src/com/android/inputmethod/compat/SuggestionSpanUtilsTest.java
@@ -51,7 +51,7 @@ public class SuggestionSpanUtilsTest {
}
/**
- * Helper method to create a dummy {@link SuggestedWordInfo}.
+ * Helper method to create a placeholder {@link SuggestedWordInfo}.
*
* @param kindAndFlags the kind and flags to be used to create {@link SuggestedWordInfo}.
* @param word the word to be used to create {@link SuggestedWordInfo}.
diff --git a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
index 92bff0e2e..b41c7013c 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestedWordsTests.java
@@ -36,7 +36,7 @@ import java.util.Locale;
public class SuggestedWordsTests {
/**
- * Helper method to create a dummy {@link SuggestedWordInfo} with specifying
+ * Helper method to create a placeholder {@link SuggestedWordInfo} with specifying
* {@link SuggestedWordInfo#KIND_TYPED}.
*
* @param word the word to be used to create {@link SuggestedWordInfo}.
@@ -53,7 +53,7 @@ public class SuggestedWordsTests {
}
/**
- * Helper method to create a dummy {@link SuggestedWordInfo} with specifying
+ * Helper method to create a placeholder {@link SuggestedWordInfo} with specifying
* {@link SuggestedWordInfo#KIND_CORRECTION}.
*
* @param word the word to be used to create {@link SuggestedWordInfo}.
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
index bd5136583..2ae5bf5c1 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
@@ -446,7 +446,7 @@ public class BinaryDictEncoderUtils {
}
/**
- * Sanity-checking method.
+ * Validity-checking method.
*
* This method checks a list of PtNode arrays for juxtaposition, that is, it will do
* nothing if each node array's cached address is actually the previous node array's address
@@ -664,7 +664,7 @@ public class BinaryDictEncoderUtils {
+ "of the node : " + dictEncoder.getPosition() + " <> "
+ ptNode.mCachedAddressAfterUpdate);
}
- // Sanity checks.
+ // Validity checks.
if (DBG && ptNode.getProbability() > FormatSpec.MAX_TERMINAL_FREQUENCY) {
throw new RuntimeException("A node has a frequency > "
+ FormatSpec.MAX_TERMINAL_FREQUENCY
diff --git a/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
index 6ba1ef966..2bed44d7a 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
@@ -277,7 +277,7 @@ public final class FusionDictionary implements Iterable<WordProperty> {
}
/**
- * Sanity check for a PtNode array.
+ * Validity check for a PtNode array.
*
* This method checks that all PtNodes in a node array are ordered as expected.
* If they are, nothing happens. If they aren't, an exception is thrown.
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 4b7b9bc36..73d7e7339 100644
--- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java
+++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTestsHelper.java
@@ -37,7 +37,7 @@ import java.util.Random;
public class UserHistoryDictionaryTestsHelper {
/**
- * Locale prefix for generating dummy locales for tests.
+ * Locale prefix for generating placeholder locales for tests.
*/
public static final String TEST_LOCALE_PREFIX = "test-";
@@ -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());
}