Skip to content

Commit

Permalink
Temporary commit at 8/29/2023, 6:48:18 PM
Browse files Browse the repository at this point in the history
Differential Revision: https://www.internalfb.com/diff/D48767465?entry_point=27

fbshipit-source-id: 467e3dec30ce8255f17c77a83639a0b090406f2c
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Aug 30, 2023
1 parent f041a09 commit 1f99e8f
Show file tree
Hide file tree
Showing 13 changed files with 413 additions and 398 deletions.
16 changes: 9 additions & 7 deletions tests/YGFloatOptionalTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@

#include <gtest/gtest.h>

#include <yoga/Utils.h>
#include <yoga/numeric/Comparison.h>
#include <yoga/YGFloatOptional.h>
#include <yoga/YGValue.h>

using namespace facebook;

constexpr auto empty = YGFloatOptional{};
constexpr auto zero = YGFloatOptional{0.0f};
constexpr auto one = YGFloatOptional{1.0f};
Expand Down Expand Up @@ -192,13 +194,13 @@ TEST(YGFloatOptional, addition) {
ASSERT_EQ(negative + empty, empty);
}

TEST(YGFloatOptionalTest, YGFloatOptionalMax) {
ASSERT_EQ(YGFloatOptionalMax(empty, empty), empty);
ASSERT_EQ(YGFloatOptionalMax(empty, positive), positive);
ASSERT_EQ(YGFloatOptionalMax(negative, empty), negative);
ASSERT_EQ(YGFloatOptionalMax(negative, YGFloatOptional{-INFINITY}), negative);
TEST(YGFloatOptionalTest, maxOrDefined) {
ASSERT_EQ(yoga::maxOrDefined(empty, empty), empty);
ASSERT_EQ(yoga::maxOrDefined(empty, positive), positive);
ASSERT_EQ(yoga::maxOrDefined(negative, empty), negative);
ASSERT_EQ(yoga::maxOrDefined(negative, YGFloatOptional{-INFINITY}), negative);
ASSERT_EQ(
YGFloatOptionalMax(YGFloatOptional{1.0f}, YGFloatOptional{1.125f}),
yoga::maxOrDefined(YGFloatOptional{1.0f}, YGFloatOptional{1.125f}),
YGFloatOptional{1.125f});
}

Expand Down
83 changes: 0 additions & 83 deletions yoga/Utils.cpp

This file was deleted.

146 changes: 0 additions & 146 deletions yoga/Utils.h

This file was deleted.

4 changes: 0 additions & 4 deletions yoga/Yoga-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ inline bool isUndefined(double value) {
return std::isnan(value);
}

void throwLogicalErrorWithMessage(const char* message);

} // namespace facebook::yoga

extern const std::array<YGEdge, 4> trailing;
Expand Down Expand Up @@ -149,5 +147,3 @@ class Values {
static const float kDefaultFlexGrow = 0.0f;
static const float kDefaultFlexShrink = 0.0f;
static const float kWebDefaultFlexShrink = 1.0f;

extern bool YGFloatsEqual(const float a, const float b);
Loading

0 comments on commit 1f99e8f

Please sign in to comment.