Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b3ae50e authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Use InstrumentationTestCase and get rid of AndroidTestCase.getTestContext call"

parents 5e50eec5 9a5bf1d1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -16,25 +16,27 @@

package com.android.inputmethod.keyboard.internal;

import android.test.AndroidTestCase;
import android.app.Instrumentation;
import android.test.InstrumentationTestCase;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;

public class KeySpecParserCsvTests extends AndroidTestCase {
public class KeySpecParserCsvTests extends InstrumentationTestCase {
    private final KeyboardTextsSet mTextsSet = new KeyboardTextsSet();

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        final Instrumentation instrumentation = getInstrumentation();
        mTextsSet.setLanguage(Locale.ENGLISH.getLanguage());
        mTextsSet.loadStringResources(getContext());
        mTextsSet.loadStringResources(instrumentation.getTargetContext());
        final String[] testResourceNames = getAllResourceIdNames(
                com.android.inputmethod.latin.tests.R.string.class);
        mTextsSet.loadStringResourcesInternal(getTestContext(),
        mTextsSet.loadStringResourcesInternal(instrumentation.getContext(),
                testResourceNames,
                com.android.inputmethod.latin.tests.R.string.empty_string);
    }