From 1c22a1aa5371c7716fdbd0d2ff15b93fc8684558 Mon Sep 17 00:00:00 2001 From: Rachit Siamwalla Date: Mon, 7 Nov 2016 13:55:52 -0800 Subject: [PATCH] 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 --- tests/CSSLayoutMeasureTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/CSSLayoutMeasureTest.cpp b/tests/CSSLayoutMeasureTest.cpp index 624ca125..960f3e50 100644 --- a/tests/CSSLayoutMeasureTest.cpp +++ b/tests/CSSLayoutMeasureTest.cpp @@ -10,6 +10,7 @@ #include #include +#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