diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2020-07-24 14:07:57 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2020-07-27 18:38:53 -0400 |
commit | 56e2c6c7043ca14159284b7b1f07e95d6fcf9a9e (patch) | |
tree | a332137aefabdfc21f7f5f317096a1895e9f1dc9 /tests | |
parent | 4e825539e590c6ce06e54fbb05571efce7fb181c (diff) |
Make all String float conversion methods be 64-bit
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)); } } |