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:
committed by
Facebook Github Bot
parent
6e04631862
commit
9e20dfeea1
@@ -5,9 +5,12 @@
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#include <gtest/gtest.h>
|
||||
#include <yoga/testutil/testutil.h>
|
||||
#include <yoga/Yoga.h>
|
||||
#include <yoga/YGNode.h>
|
||||
|
||||
using facebook::yoga::test::TestUtil;
|
||||
|
||||
TEST(YogaTest, cloning_shared_root) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
|
||||
@@ -220,7 +223,7 @@ TEST(YogaTest, cloning_two_levels) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, cloning_and_freeing) {
|
||||
const int32_t initialInstanceCount = YGNodeGetInstanceCount();
|
||||
TestUtil::startCountingNodes();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
|
||||
@@ -249,7 +252,7 @@ TEST(YogaTest, cloning_and_freeing) {
|
||||
|
||||
YGConfigFree(config);
|
||||
|
||||
ASSERT_EQ(initialInstanceCount, YGNodeGetInstanceCount());
|
||||
ASSERT_EQ(0, TestUtil::stopCountingNodes());
|
||||
}
|
||||
|
||||
TEST(YogaTest, mixed_shared_and_owned_children) {
|
||||
|
Reference in New Issue
Block a user