Files
react-native/ReactCommon
Valentin Shergin b549d0ea9e 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
2020-01-28 22:37:17 -08:00
..