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:
committed by
Facebook Github Bot
parent
5514722ce2
commit
138521ccc2
@@ -432,6 +432,16 @@ public class YogaNodeTest {
|
|||||||
assertTrue(root.hasNewLayout());
|
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() {
|
private YogaNode createNode() {
|
||||||
return mNodeFactory.create();
|
return mNodeFactory.create();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user