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:
David Aurelio 2018-12-13 07:09:29 -08:00 committed by Facebook Github Bot
parent 568472231f
commit 2d6a10028f
2 changed files with 2 additions and 2 deletions

View File

@ -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_);
}

View File

@ -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;