Cleanup YGValue.h header (#37179)
Summary:
X-link: https://github.com/facebook/react-native/pull/37179
Pull Request resolved: https://github.com/facebook/yoga/pull/1273
1. Simplify nan handling a bit
2. Remove string literal operators which seem dead enough to remove. These are public, so anyone could be using them, but it seems like almost nobody is.
1. FB has no usages of `using namespace facebook::yoga::literals` (exposing the literal operators) outside of Yoga tests.
1. There is only [a single usage](6dfba905ea/SDLTest/UIKit.hpp (L19)
) on GitHub.
Reviewed By: yungsters
Differential Revision: D45419970
fbshipit-source-id: 8121303e5ae66596132a848a711802081728f4fb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3156cb207f
commit
080d16cabf
@@ -21,29 +21,3 @@ TEST(YGValue, supports_equality) {
|
||||
(YGValue{YGUndefined, YGUnitUndefined}));
|
||||
ASSERT_EQ((YGValue{0, YGUnitAuto}), (YGValue{-1, YGUnitAuto}));
|
||||
}
|
||||
|
||||
using namespace facebook::yoga::literals;
|
||||
|
||||
TEST(YGValue, supports_double_point_literals) {
|
||||
ASSERT_EQ(12.5_pt, (YGValue{12.5, YGUnitPoint}));
|
||||
}
|
||||
|
||||
TEST(YGValue, supports_double_percent_literals) {
|
||||
ASSERT_EQ(12.5_percent, (YGValue{12.5, YGUnitPercent}));
|
||||
}
|
||||
|
||||
TEST(YGValue, supports_integral_point_literals) {
|
||||
ASSERT_EQ(34_pt, (YGValue{34, YGUnitPoint}));
|
||||
}
|
||||
|
||||
TEST(YGValue, supports_integral_percent_literals) {
|
||||
ASSERT_EQ(125_percent, (YGValue{125, YGUnitPercent}));
|
||||
}
|
||||
|
||||
TEST(YGValue, supports_negative_point_literals) {
|
||||
ASSERT_EQ(-34.5_pt, (YGValue{-34.5, YGUnitPoint}));
|
||||
}
|
||||
|
||||
TEST(YGValue, supports_negative_percent_literals) {
|
||||
ASSERT_EQ(-34.5_percent, (YGValue{-34.5, YGUnitPercent}));
|
||||
}
|
||||
|
Reference in New Issue
Block a user