CSSNodeCopyStyle API for Java and C#

Summary: Add CopyStyle API for Java and C#

Reviewed By: emilsjolander

Differential Revision: D4189954

fbshipit-source-id: 10759fdb27bf67350d3151614f7815aa09bf7e04
This commit is contained in:
Kazuki Sakamoto
2016-11-17 09:10:47 -08:00
committed by Facebook Github Bot
parent 191ac98b89
commit 0bb2955c5c
8 changed files with 52 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ package com.facebook.csslayout;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class CSSNodeTest {
@@ -71,4 +72,16 @@ public class CSSNodeTest {
assertEquals(CSSLogLevel.VERBOSE, mLogLevel);
assertEquals("Flexbox", mLogMessage);
}
@Test
public void testCopyStyle() {
final CSSNode node0 = new CSSNode();
assertTrue(CSSConstants.isUndefined(node0.getStyleMaxHeight()));
final CSSNode node1 = new CSSNode();
node1.setStyleMaxHeight(100);
node0.copyStyle(node1);
assertEquals(100, (int) node0.getStyleMaxHeight());
}
}