Improve test coverage for reading numbers represented as strings

This commit is contained in:
Dmitry-Me 2020-01-21 19:29:33 +03:00
parent d8e0f40663
commit 51e775e21e
1 changed files with 2 additions and 0 deletions

View File

@ -373,6 +373,8 @@ private:
}
void toDoubleNumber() const {
ASSERT_EQUALS_DOUBLE(1.0, MathLib::toDoubleNumber("1"), 0.001);
ASSERT_EQUALS_DOUBLE(1.0, MathLib::toDoubleNumber("0x1"), 0.001);
ASSERT_EQUALS_DOUBLE(10.0, MathLib::toDoubleNumber("10"), 0.001);
ASSERT_EQUALS_DOUBLE(1000.0, MathLib::toDoubleNumber("10E+2"), 0.001);
ASSERT_EQUALS_DOUBLE(100.0, MathLib::toDoubleNumber("1.0E+2"), 0.001);