Commit Graph

4 Commits

Author SHA1 Message Date
Sebastian Franco
5f0af4f633 Moving classes inside of CellLayout to their own file
This is a no-op change ensure this we have ReorderAlgorithmUnitTest.

Flag: NA
Bug: 229292911
Test: ReorderAlgorithmUnitTest
Change-Id: I6ffe2a1260f869a4686a9f1e652dd1ab6d406269
2023-11-23 23:13:56 +00:00
Alex Chau
36c3880b6b Fix ReorderAlgorithmUnitTest not restoring numRows properly
Fix: 289191222
Test: ReorderAlgorithmUnitTest
Change-Id: I4e8a8afc6bd043c3983b19220bca0e50c26eab69
2023-06-28 18:44:59 +00:00
Sebastian Franco
d3f6522ebb Stopp Cell height from changing when running ReorderUnitTest
Fix: 280683994
Test: atest ReorderAlgorithmUnitTest
Change-Id: Iee6336e11387a637e3fe52722d4f30a15e58aca9
2023-05-11 13:12:55 -06:00
Sebastian Franco
45b39b50e5 Adding unit test to ReorderAlgorithm
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
2023-05-03 11:22:09 -06:00