aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-07-23 18:28:45 +0900
committerTadashi G. Takaoka <takaoka@google.com>2013-07-23 19:29:33 +0900
commitb80cc628ff793b51ccc443708d97c34f385e7841 (patch)
tree5f8a272e4e71ab54ebcf12accd643b6dbb96cf9c /tests
parent62f3b4e9c9d896d2026ebf363aeefce36116baac (diff)
downloadlatinime-b80cc628ff793b51ccc443708d97c34f385e7841.tar.gz
latinime-b80cc628ff793b51ccc443708d97c34f385e7841.tar.xz
latinime-b80cc628ff793b51ccc443708d97c34f385e7841.zip
Fix KeySpecParserSplitTests
Change-Id: Icf4525c735cda0330a3bd0f9628165ec722b64a8
Diffstat (limited to 'tests')
-rw-r--r--tests/res/raw/dummy_resource_for_testing.txt3
-rw-r--r--tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserSplitTests.java7
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/res/raw/dummy_resource_for_testing.txt b/tests/res/raw/dummy_resource_for_testing.txt
new file mode 100644
index 000000000..05da86b8f
--- /dev/null
+++ b/tests/res/raw/dummy_resource_for_testing.txt
@@ -0,0 +1,3 @@
+/* This dummy raw resource is needed to be able to load string resources from a test APK
+ * successfully. (See {@link KeySpecParserSplitTests#setUp()}.
+ */
diff --git a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserSplitTests.java b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserSplitTests.java
index f04c7e953..b6ee71a09 100644
--- a/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserSplitTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/internal/KeySpecParserSplitTests.java
@@ -51,9 +51,10 @@ public class KeySpecParserSplitTests extends InstrumentationTestCase {
}.runInLocale(targetContext.getResources(), TEST_LOCALE);
final String[] testResourceNames = getAllResourceIdNames(
com.android.inputmethod.latin.tests.R.string.class);
- mTextsSet.loadStringResourcesInternal(instrumentation.getContext(),
- testResourceNames,
- com.android.inputmethod.latin.tests.R.string.empty_string);
+ mTextsSet.loadStringResourcesInternal(instrumentation.getContext(), testResourceNames,
+ // This dummy raw resource is needed to be able to load string resources from a test
+ // APK successfully.
+ com.android.inputmethod.latin.tests.R.raw.dummy_resource_for_testing);
}
private static String[] getAllResourceIdNames(final Class<?> resourceIdClass) {