Add experiment support to gentest
Summary: This diff does two things - Clean up some of the generated code making the files smaller. - Add experiment support to generated tests allowing us to use gentest for things still being experimented with such as more compliant flex-basis behavior. Reviewed By: gkassabli Differential Revision: D4226734 fbshipit-source-id: 2cc1471c21883e8e326f16e7a8bb1a3657acd84b
This commit is contained in:
committed by
Facebook Github Bot
parent
a0d560a24b
commit
22b0fdb3e6
@@ -10,19 +10,9 @@
|
||||
#include <CSSLayout/CSSLayout.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
class CSSLayoutRelayoutTest : public ::testing::Test {
|
||||
TEST(CSSLayoutTest, dont_cache_computed_flex_basis_between_layouts) {
|
||||
CSSLayoutSetExperimentalFeatureEnabled(CSSExperimentalFeatureWebFlexBasis, true);
|
||||
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
CSSLayoutSetExperimentalFeatureEnabled(CSSExperimentalFeatureWebFlexBasis, true);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
CSSLayoutSetExperimentalFeatureEnabled(CSSExperimentalFeatureWebFlexBasis, false);
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(CSSLayoutRelayoutTest, dont_cache_computed_flex_basis_between_layouts) {
|
||||
const CSSNodeRef root = CSSNodeNew();
|
||||
|
||||
const CSSNodeRef root_child0 = CSSNodeNew();
|
||||
@@ -36,4 +26,6 @@ TEST_F(CSSLayoutRelayoutTest, dont_cache_computed_flex_basis_between_layouts) {
|
||||
ASSERT_FLOAT_EQ(20, CSSNodeLayoutGetHeight(root_child0));
|
||||
|
||||
CSSNodeFreeRecursive(root);
|
||||
|
||||
CSSLayoutSetExperimentalFeatureEnabled(CSSExperimentalFeatureWebFlexBasis, false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user