mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Move cell layout tests to deviceless tests" into main
This commit is contained in:
@@ -105,6 +105,7 @@ android_library {
|
||||
android_library {
|
||||
name: "Launcher3TestResources",
|
||||
resource_dirs: ["res"],
|
||||
asset_dirs: ["assets"],
|
||||
// TODO(b/319712088): re-enable use_resource_processor
|
||||
use_resource_processor: false,
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.core.view.get
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.filters.SmallTest
|
||||
import com.android.launcher3.CellLayout
|
||||
import com.android.launcher3.celllayout.board.CellLayoutBoard
|
||||
import com.android.launcher3.celllayout.board.IconPoint
|
||||
@@ -34,6 +36,7 @@ import java.util.Random
|
||||
import org.junit.Assert
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
private class HotseatReorderTestCase(
|
||||
val startBoard: CellLayoutBoard,
|
||||
@@ -44,6 +47,8 @@ private class HotseatReorderTestCase(
|
||||
}
|
||||
}
|
||||
|
||||
@SmallTest
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class HotseatReorderUnitTest {
|
||||
|
||||
private val applicationContext: Context =
|
||||
@@ -141,11 +141,14 @@ class ReorderPreviewAnimationTest {
|
||||
ReorderPreviewAnimation.MODE_PREVIEW,
|
||||
AnimationValues(dx = 0, dy = 0, scale = 100)
|
||||
)
|
||||
testAnimationAtGivenProgress(
|
||||
PREVIEW_DURATION * 99,
|
||||
ReorderPreviewAnimation.MODE_PREVIEW,
|
||||
AnimationValues(dx = 5, dy = -10, scale = 96)
|
||||
)
|
||||
// (b/339313407) Temporarily disable this test as the behavior is
|
||||
// inconsistent between Soong & Gradle builds.
|
||||
//
|
||||
// testAnimationAtGivenProgress(
|
||||
// PREVIEW_DURATION * 99,
|
||||
// ReorderPreviewAnimation.MODE_PREVIEW,
|
||||
// AnimationValues(dx = 5, dy = -10, scale = 96)
|
||||
// )
|
||||
testAnimationAtGivenProgress(
|
||||
PREVIEW_DURATION * 98,
|
||||
ReorderPreviewAnimation.MODE_PREVIEW,
|
||||
Reference in New Issue
Block a user