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:
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;
|
||||
|
|
Loading…
Reference in New Issue