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:
committed by
Facebook Github Bot
parent
7082734c6b
commit
1c22a1aa53
@@ -10,6 +10,7 @@
|
|||||||
#include <CSSLayout/CSSLayout.h>
|
#include <CSSLayout/CSSLayout.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#if GTEST_HAS_DEATH_TEST
|
||||||
static CSSSize _measure(CSSNodeRef node,
|
static CSSSize _measure(CSSNodeRef node,
|
||||||
float width,
|
float width,
|
||||||
CSSMeasureMode widthMode,
|
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.*");
|
ASSERT_DEATH(CSSNodeSetMeasureFunc(root, _measure), "Cannot set measure function.*");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user