Loading tests/multivalentTests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,9 @@ package com.android.launcher3.celllayout; import static androidx.test.core.app.ApplicationProvider.getApplicationContext; import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; Loading @@ -37,6 +40,8 @@ import com.android.launcher3.celllayout.board.WidgetRect; import com.android.launcher3.celllayout.testgenerator.RandomBoardGenerator; import com.android.launcher3.celllayout.testgenerator.RandomMultiBoardGenerator; import com.android.launcher3.util.ActivityContextWrapper; import com.android.launcher3.util.rule.TestStabilityRule; import com.android.launcher3.util.rule.TestStabilityRule.Stability; import com.android.launcher3.views.DoubleShadowBubbleTextView; import org.junit.Rule; Loading Loading @@ -67,6 +72,9 @@ public class ReorderAlgorithmUnitTest { private static final int TOTAL_OF_CASES_GENERATED = 300; private Context mApplicationContext; @Rule public TestStabilityRule mTestStabilityRule = new TestStabilityRule(); @Rule public UnitTestCellLayoutBuilderRule mCellLayoutBuilder = new UnitTestCellLayoutBuilderRule(); Loading @@ -74,6 +82,7 @@ public class ReorderAlgorithmUnitTest { * This test reads existing test cases and makes sure the CellLayout produces the same * output for each of them for a given input. */ @Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) @Test public void testAllCases() throws IOException { List<ReorderAlgorithmUnitTestCase> testCases = getTestCases( Loading Loading @@ -116,6 +125,7 @@ public class ReorderAlgorithmUnitTest { /** * Same as above but testing the Multipage CellLayout. */ @Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) @Test public void generateValidTests_Multi() { Random generator = new Random(SEED); Loading Loading
tests/multivalentTests/src/com/android/launcher3/celllayout/ReorderAlgorithmUnitTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,9 @@ package com.android.launcher3.celllayout; import static androidx.test.core.app.ApplicationProvider.getApplicationContext; import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; Loading @@ -37,6 +40,8 @@ import com.android.launcher3.celllayout.board.WidgetRect; import com.android.launcher3.celllayout.testgenerator.RandomBoardGenerator; import com.android.launcher3.celllayout.testgenerator.RandomMultiBoardGenerator; import com.android.launcher3.util.ActivityContextWrapper; import com.android.launcher3.util.rule.TestStabilityRule; import com.android.launcher3.util.rule.TestStabilityRule.Stability; import com.android.launcher3.views.DoubleShadowBubbleTextView; import org.junit.Rule; Loading Loading @@ -67,6 +72,9 @@ public class ReorderAlgorithmUnitTest { private static final int TOTAL_OF_CASES_GENERATED = 300; private Context mApplicationContext; @Rule public TestStabilityRule mTestStabilityRule = new TestStabilityRule(); @Rule public UnitTestCellLayoutBuilderRule mCellLayoutBuilder = new UnitTestCellLayoutBuilderRule(); Loading @@ -74,6 +82,7 @@ public class ReorderAlgorithmUnitTest { * This test reads existing test cases and makes sure the CellLayout produces the same * output for each of them for a given input. */ @Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) @Test public void testAllCases() throws IOException { List<ReorderAlgorithmUnitTestCase> testCases = getTestCases( Loading Loading @@ -116,6 +125,7 @@ public class ReorderAlgorithmUnitTest { /** * Same as above but testing the Multipage CellLayout. */ @Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) @Test public void generateValidTests_Multi() { Random generator = new Random(SEED); Loading