mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Fixing robolectric tests not running on UI thread after changing looper mode
Bug: 297950111 Flag: None Test: Presubmit Change-Id: I9351474ba4d377e8e9539f9b3d22d5ba15ac6a44
This commit is contained in:
@@ -37,11 +37,15 @@ import android.view.animation.DecelerateInterpolator;
|
||||
import android.view.animation.PathInterpolator;
|
||||
|
||||
import androidx.test.annotation.UiThreadTest;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.filters.SmallTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.launcher3.util.rule.RobolectricUiThreadRule;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TestRule;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
@@ -51,11 +55,14 @@ import org.mockito.Spy;
|
||||
* Tests for FastBitmapDrawable.
|
||||
*/
|
||||
@SmallTest
|
||||
@UiThreadTest
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@UiThreadTest
|
||||
public class FastBitmapDrawableTest {
|
||||
private static final float EPSILON = 0.00001f;
|
||||
|
||||
@Rule
|
||||
public final TestRule roboUiThreadRule = new RobolectricUiThreadRule();
|
||||
|
||||
@Spy
|
||||
FastBitmapDrawable mFastBitmapDrawable =
|
||||
spy(new FastBitmapDrawable(Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888)));
|
||||
|
||||
Reference in New Issue
Block a user