diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_math.cpp | 2 | ||||
-rw-r--r-- | tests/test_string.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_math.cpp b/tests/test_math.cpp index 5f84bad4e9..84a85be2f6 100644 --- a/tests/test_math.cpp +++ b/tests/test_math.cpp @@ -242,7 +242,7 @@ class GetClassAndNamespace { if (code[idx] == '-' || (code[idx] >= '0' && code[idx] <= '9')) { //a number const CharType *rptr; - double number = String::to_double(&code[idx], &rptr); + double number = String::to_float(&code[idx], &rptr); idx += (rptr - &code[idx]); value = number; return TK_NUMBER; diff --git a/tests/test_string.h b/tests/test_string.h index 25fd513a1a..310be31f4b 100644 --- a/tests/test_string.h +++ b/tests/test_string.h @@ -209,7 +209,7 @@ TEST_CASE("[String] String to float") { static const double num[4] = { -12348298412.2, 0.05, 2.0002, -0.0001 }; for (int i = 0; i < 4; i++) { - CHECK(!(ABS(String(nums[i]).to_double() - num[i]) > 0.00001)); + CHECK(!(ABS(String(nums[i]).to_float() - num[i]) > 0.00001)); } } |