Merge "Fix KeySpecParserSplitTests"
commit
01c2bb1303
|
@ -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()}.
|
||||||
|
*/
|
|
@ -51,9 +51,10 @@ public class KeySpecParserSplitTests extends InstrumentationTestCase {
|
||||||
}.runInLocale(targetContext.getResources(), TEST_LOCALE);
|
}.runInLocale(targetContext.getResources(), TEST_LOCALE);
|
||||||
final String[] testResourceNames = getAllResourceIdNames(
|
final String[] testResourceNames = getAllResourceIdNames(
|
||||||
com.android.inputmethod.latin.tests.R.string.class);
|
com.android.inputmethod.latin.tests.R.string.class);
|
||||||
mTextsSet.loadStringResourcesInternal(instrumentation.getContext(),
|
mTextsSet.loadStringResourcesInternal(instrumentation.getContext(), testResourceNames,
|
||||||
testResourceNames,
|
// This dummy raw resource is needed to be able to load string resources from a test
|
||||||
com.android.inputmethod.latin.tests.R.string.empty_string);
|
// APK successfully.
|
||||||
|
com.android.inputmethod.latin.tests.R.raw.dummy_resource_for_testing);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String[] getAllResourceIdNames(final Class<?> resourceIdClass) {
|
private static String[] getAllResourceIdNames(final Class<?> resourceIdClass) {
|
||||||
|
|
Loading…
Reference in New Issue