mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-17 17:48:20 +00:00
Adding 100 different test cases for the ReorderAlgorithm. The test cases are randomly generated using generateRandomTestCase() the boards are generated once and then written in the file reorder_algorithm_test_cases. I will leave the code to generate the boards in the Test even though is not used anymore in case we need to generate more boards later on. Also, I found that the ReorderAlgorithm was not deterministic, meaning that it could generate two different results with the same inputs (views positions and view being drag positions), because it was traversing a map whose has was the object id which is random. So I sort the views before traversing them. Bug: 229292911 Test: atest ReorderAlgorithmUnitTestCase Change-Id: I196eb8f1dafcb57d5259969268c458129ae4f46b