Test YogaNode#getLayoutDirection()

Summary:
@public

Previously untested. Allows us to ship with more confidence

Reviewed By: SidharthGuglani

Differential Revision: D13534350

fbshipit-source-id: a2e7577befdeeb7a27148e16624eeb7a347efd87
This commit is contained in:
David Aurelio
2018-12-21 03:12:17 -08:00
committed by Facebook Github Bot
parent 5514722ce2
commit 138521ccc2

View File

@@ -432,6 +432,16 @@ public class YogaNodeTest {
assertTrue(root.hasNewLayout());
}
@Test
public void directionIsPassedThrough() {
YogaNode root = createNode();
root.setDirection(YogaDirection.RTL);
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
assertEquals(root.getLayoutDirection(), YogaDirection.RTL);
}
private YogaNode createNode() {
return mNodeFactory.create();
}