Free memory used in tests to enable use of valgrind

Summary: Its very usefull to be able to run valgrind on the tests and benchmarks. We were previously not freeing test memory so valgrind output was very messy.

Reviewed By: javache

Differential Revision: D3937493

fbshipit-source-id: 23c6970d7769b081575d39de583ba954fc65a397
This commit is contained in:
Emil Sjolander
2016-09-29 04:09:56 -07:00
committed by Facebook Github Bot
parent dbf3b11946
commit 1f300a58fb
20 changed files with 196 additions and 1 deletions

View File

@@ -81,6 +81,8 @@ TEST(CSSLayoutTest, flex_basis_flex_grow_column) {
ASSERT_EQ(75, CSSNodeLayoutGetTop(root_child1));
ASSERT_EQ(100, CSSNodeLayoutGetWidth(root_child1));
ASSERT_EQ(25, CSSNodeLayoutGetHeight(root_child1));
CSSNodeFreeRecursive(root);
}
TEST(CSSLayoutTest, flex_basis_flex_grow_row) {
@@ -130,6 +132,8 @@ TEST(CSSLayoutTest, flex_basis_flex_grow_row) {
ASSERT_EQ(0, CSSNodeLayoutGetTop(root_child1));
ASSERT_EQ(25, CSSNodeLayoutGetWidth(root_child1));
ASSERT_EQ(100, CSSNodeLayoutGetHeight(root_child1));
CSSNodeFreeRecursive(root);
}
TEST(CSSLayoutTest, flex_basis_flex_shrink_column) {
@@ -178,6 +182,8 @@ TEST(CSSLayoutTest, flex_basis_flex_shrink_column) {
ASSERT_EQ(50, CSSNodeLayoutGetTop(root_child1));
ASSERT_EQ(100, CSSNodeLayoutGetWidth(root_child1));
ASSERT_EQ(50, CSSNodeLayoutGetHeight(root_child1));
CSSNodeFreeRecursive(root);
}
TEST(CSSLayoutTest, flex_basis_flex_shrink_row) {
@@ -227,4 +233,6 @@ TEST(CSSLayoutTest, flex_basis_flex_shrink_row) {
ASSERT_EQ(0, CSSNodeLayoutGetTop(root_child1));
ASSERT_EQ(50, CSSNodeLayoutGetWidth(root_child1));
ASSERT_EQ(100, CSSNodeLayoutGetHeight(root_child1));
CSSNodeFreeRecursive(root);
}