From 56e2c6c7043ca14159284b7b1f07e95d6fcf9a9e Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Fri, 24 Jul 2020 14:07:57 -0400 Subject: Make all String float conversion methods be 64-bit --- tests/test_math.cpp | 2 +- tests/test_string.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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)); } } -- cgit v1.2.3