Fix xplat CSSLayoutTests to compile on platforms without death tests.

Summary:
Not all platforms have gtest death tests. There is a define to check for that.
Bracketed the relevant tests with the define.

Reviewed By: youerkang

Differential Revision: D4141823

fbshipit-source-id: 1396657f3ee83853fcda85d5a51708d4e77642cb
This commit is contained in:
Rachit Siamwalla
2016-11-07 13:55:52 -08:00
committed by Facebook Github Bot
parent 7082734c6b
commit 1c22a1aa53

View File

@@ -10,6 +10,7 @@
#include <CSSLayout/CSSLayout.h>
#include <gtest/gtest.h>
#if GTEST_HAS_DEATH_TEST
static CSSSize _measure(CSSNodeRef node,
float width,
CSSMeasureMode widthMode,
@@ -36,3 +37,4 @@ TEST(CSSLayoutTest, cannot_add_measure_func_to_non_leaf_node) {
ASSERT_DEATH(CSSNodeSetMeasureFunc(root, _measure), "Cannot set measure function.*");
}
#endif