Switch tests to test utility for counting nodes

Summary:
@public
replaces the global node counter with the event-based one for all tests.

Reviewed By: SidharthGuglani

Differential Revision: D15174856

fbshipit-source-id: f4401d502bdbaf3b6e4632a4d985aac260cb35a8
This commit is contained in:
David Aurelio
2019-05-09 04:14:08 -07:00
committed by Facebook Github Bot
parent 6e04631862
commit 9e20dfeea1
3 changed files with 18 additions and 10 deletions

View File

@@ -31,9 +31,9 @@ public class YogaNodeTest {
@Test
public void testInit() {
final int refCount = YogaNative.jni_YGNodeGetInstanceCount();
TestUtil.startCountingNodes();
final YogaNode node = createNode();
assertEquals(refCount + 1, YogaNative.jni_YGNodeGetInstanceCount());
assertEquals(1, TestUtil.stopCountingNodes());
}
@Test