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
e9078374c9
commit
da678ef971
@@ -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