A framework for building native applications using React
Fabric: Test for ShadowNode trees Diffing algorithm
Summary: Here is a mutation test for the Diffing algorithm that we use to diff ShadowNode trees and flatten them. As a side-effect, it also "tests" that Concurrent Yoga does not crash and produces decent cloning requests. The test works this way: 1. We create a random ShadowNode tree; 2. We create a View tree from that that we continue to maintain; 3. We apply random mutation on this; 4. We layout the tree; 5. We generate the mutation instruction comparing a previous tree with a new one; 6. We apply mutations on the first tree; 7. We generate a new tree from scratch; 8. We compare the new tree with the tree updated with mutations and expect equivalence; 9. Repeat a million times. Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross, mdvacca Differential Revision: D19357714 fbshipit-source-id: 04765ede87d91180952ae650ff0d505dfac2ed8e
V
Valentin Shergin committed
b549d0ea9e206dd2131e16685d9d79889a3828b6
Parent: fb5d951
Committed by Facebook Github Bot <[email protected]>
on 1/29/2020, 6:37:17 AM