[yoga] Replace float with double

This commit is contained in:
Lvv.me
2021-07-05 10:57:32 +08:00
parent 578d197dd6
commit 860bb8b660
36 changed files with 694 additions and 686 deletions

View File

@@ -10,14 +10,14 @@
#include <yoga/YGValue.h>
TEST(YGValue, supports_equality) {
ASSERT_EQ((YGValue{12.5f, YGUnitPercent}), (YGValue{12.5f, YGUnitPercent}));
ASSERT_NE((YGValue{12.5f, YGUnitPercent}), (YGValue{56.7f, YGUnitPercent}));
ASSERT_NE((YGValue{12.5f, YGUnitPercent}), (YGValue{12.5f, YGUnitPoint}));
ASSERT_NE((YGValue{12.5f, YGUnitPercent}), (YGValue{12.5f, YGUnitAuto}));
ASSERT_NE((YGValue{12.5f, YGUnitPercent}), (YGValue{12.5f, YGUnitUndefined}));
ASSERT_EQ((YGValue{12.5, YGUnitPercent}), (YGValue{12.5, YGUnitPercent}));
ASSERT_NE((YGValue{12.5, YGUnitPercent}), (YGValue{56.7, YGUnitPercent}));
ASSERT_NE((YGValue{12.5, YGUnitPercent}), (YGValue{12.5, YGUnitPoint}));
ASSERT_NE((YGValue{12.5, YGUnitPercent}), (YGValue{12.5, YGUnitAuto}));
ASSERT_NE((YGValue{12.5, YGUnitPercent}), (YGValue{12.5, YGUnitUndefined}));
ASSERT_EQ(
(YGValue{12.5f, YGUnitUndefined}),
(YGValue{12.5, YGUnitUndefined}),
(YGValue{YGUndefined, YGUnitUndefined}));
ASSERT_EQ((YGValue{0, YGUnitAuto}), (YGValue{-1, YGUnitAuto}));
}