summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/launcher3
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2018-08-24 14:04:43 -0700
committerVadim Tryshev <vadimt@google.com>2018-08-24 14:04:43 -0700
commit12daab5597f45be6272ee5782c5f363d89bf38b7 (patch)
treec97b7b59287518f02db2ceb53214147e9e9dd0eb /tests/src/com/android/launcher3
parent98afc964614dc98e5ed6b8b22cd69155b2ba43f1 (diff)
downloadandroid_packages_apps_Trebuchet-12daab5597f45be6272ee5782c5f363d89bf38b7.tar.gz
android_packages_apps_Trebuchet-12daab5597f45be6272ee5782c5f363d89bf38b7.tar.bz2
android_packages_apps_Trebuchet-12daab5597f45be6272ee5782c5f363d89bf38b7.zip
Enabling some test suites that miss from ATP
ATP requires the test size attribute, or else the test won't be run. Test: Will see on ATP Change-Id: If231781b5188c022e47cc40e46af933d753fa114
Diffstat (limited to 'tests/src/com/android/launcher3')
-rw-r--r--tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java9
-rw-r--r--tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java17
-rw-r--r--tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java14
-rw-r--r--tests/src/com/android/launcher3/model/PackageInstallStateChangedTaskTest.java6
-rw-r--r--tests/src/com/android/launcher3/popup/PopupPopulatorTest.java16
5 files changed, 38 insertions, 24 deletions
diff --git a/tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java b/tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java
index ab2adaaef..afbedbacd 100644
--- a/tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java
+++ b/tests/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithmTest.java
@@ -15,7 +15,12 @@
*/
package com.android.launcher3.allapps.search;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import android.content.ComponentName;
+
+import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.launcher3.AppInfo;
@@ -24,12 +29,10 @@ import com.android.launcher3.Utilities;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
/**
* Unit tests for {@link DefaultAppSearchAlgorithm}
*/
+@SmallTest
@RunWith(AndroidJUnit4.class)
public class DefaultAppSearchAlgorithmTest {
private static final DefaultAppSearchAlgorithm.StringMatcher MATCHER =
diff --git a/tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java b/tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java
index dae8f2f9a..38e211b69 100644
--- a/tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java
+++ b/tests/src/com/android/launcher3/model/AddWorkspaceItemsTaskTest.java
@@ -1,5 +1,11 @@
package com.android.launcher3.model;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.verify;
+
import android.content.ComponentName;
import android.content.ContentProviderOperation;
import android.content.ContentValues;
@@ -7,9 +13,11 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Rect;
import android.net.Uri;
-import androidx.test.runner.AndroidJUnit4;
import android.util.Pair;
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
import com.android.launcher3.ItemInfo;
import com.android.launcher3.LauncherProvider;
import com.android.launcher3.LauncherSettings;
@@ -25,15 +33,10 @@ import org.mockito.ArgumentCaptor;
import java.util.ArrayList;
import java.util.List;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.verify;
-
/**
* Tests for {@link AddWorkspaceItemsTask}
*/
+@SmallTest
@RunWith(AndroidJUnit4.class)
public class AddWorkspaceItemsTaskTest extends BaseModelUpdateTaskTestCase {
diff --git a/tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java b/tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java
index 59f807acf..db8004445 100644
--- a/tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java
+++ b/tests/src/com/android/launcher3/model/CacheDataUpdatedTaskTest.java
@@ -1,5 +1,12 @@
package com.android.launcher3.model;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+
+import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.launcher3.AppInfo;
@@ -13,15 +20,10 @@ import org.junit.runner.RunWith;
import java.util.Arrays;
import java.util.HashSet;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-
/**
* Tests for {@link CacheDataUpdatedTask}
*/
+@SmallTest
@RunWith(AndroidJUnit4.class)
public class CacheDataUpdatedTaskTest extends BaseModelUpdateTaskTestCase {
diff --git a/tests/src/com/android/launcher3/model/PackageInstallStateChangedTaskTest.java b/tests/src/com/android/launcher3/model/PackageInstallStateChangedTaskTest.java
index 51e21e2c7..435686ff8 100644
--- a/tests/src/com/android/launcher3/model/PackageInstallStateChangedTaskTest.java
+++ b/tests/src/com/android/launcher3/model/PackageInstallStateChangedTaskTest.java
@@ -1,5 +1,8 @@
package com.android.launcher3.model;
+import static org.junit.Assert.assertEquals;
+
+import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.launcher3.ItemInfo;
@@ -15,11 +18,10 @@ import org.junit.runner.RunWith;
import java.util.Arrays;
import java.util.HashSet;
-import static org.junit.Assert.assertEquals;
-
/**
* Tests for {@link PackageInstallStateChangedTask}
*/
+@SmallTest
@RunWith(AndroidJUnit4.class)
public class PackageInstallStateChangedTaskTest extends BaseModelUpdateTaskTestCase {
diff --git a/tests/src/com/android/launcher3/popup/PopupPopulatorTest.java b/tests/src/com/android/launcher3/popup/PopupPopulatorTest.java
index 6a1dc9667..d224c8906 100644
--- a/tests/src/com/android/launcher3/popup/PopupPopulatorTest.java
+++ b/tests/src/com/android/launcher3/popup/PopupPopulatorTest.java
@@ -16,7 +16,16 @@
package com.android.launcher3.popup;
+import static com.android.launcher3.popup.PopupPopulator.MAX_SHORTCUTS;
+import static com.android.launcher3.popup.PopupPopulator.NUM_DYNAMIC;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import android.content.pm.ShortcutInfo;
+
+import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.launcher3.shortcuts.ShortcutInfoCompat;
@@ -28,15 +37,10 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import static com.android.launcher3.popup.PopupPopulator.MAX_SHORTCUTS;
-import static com.android.launcher3.popup.PopupPopulator.NUM_DYNAMIC;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
/**
* Tests the sorting and filtering of shortcuts in {@link PopupPopulator}.
*/
+@SmallTest
@RunWith(AndroidJUnit4.class)
public class PopupPopulatorTest {