mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 17:46:35 +08:00
Add tests for YGFloatOptional
Summary: @public Adds tests for `YGFloatOptional`, to ease refactorings. Reviewed By: SidharthGuglani Differential Revision: D13439610 fbshipit-source-id: e29da7f85ccedc46520b59f6c893bad521d35417
This commit is contained in:
committed by
Facebook Github Bot
parent
568472231f
commit
2d6a10028f
@@ -53,7 +53,7 @@ bool YGFloatOptional::operator!=(float val) const {
|
||||
return !(*this == val);
|
||||
}
|
||||
|
||||
YGFloatOptional YGFloatOptional::operator+(const YGFloatOptional& op) {
|
||||
YGFloatOptional YGFloatOptional::operator+(const YGFloatOptional& op) const {
|
||||
if (!isUndefined_ && !op.isUndefined_) {
|
||||
return YGFloatOptional(value_ + op.value_);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ struct YGFloatOptional {
|
||||
return isUndefined_;
|
||||
}
|
||||
|
||||
YGFloatOptional operator+(const YGFloatOptional& op);
|
||||
YGFloatOptional operator+(const YGFloatOptional& op) const;
|
||||
bool operator>(const YGFloatOptional& op) const;
|
||||
bool operator<(const YGFloatOptional& op) const;
|
||||
bool operator>=(const YGFloatOptional& op) const;
|
||||
|
||||
Reference in New Issue
Block a user