summaryrefslogtreecommitdiffstats
path: root/tests/test_json.h
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-05-20 06:04:41 -0400
committerAaron Franke <arnfranke@yahoo.com>2021-05-20 06:18:11 -0400
commitb5b6d3a8ec722719edd3f260e789315b87322b4c (patch)
tree1172f709e85e0396f37bbbcabb7903ffa3b420ae /tests/test_json.h
parent42b6602f1d4b108cecb94b94c0d2b645acaebd4f (diff)
downloadredot-engine-b5b6d3a8ec722719edd3f260e789315b87322b4c.tar.gz
Make is_equal_approx have explicit float and double versions
Diffstat (limited to 'tests/test_json.h')
-rw-r--r--tests/test_json.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_json.h b/tests/test_json.h
index e652a8fced..f1cb4799dc 100644
--- a/tests/test_json.h
+++ b/tests/test_json.h
@@ -80,7 +80,7 @@ TEST_CASE("[JSON] Parsing single data types") {
err_line == 0,
"Parsing an integer number as JSON should parse successfully.");
CHECK_MESSAGE(
- Math::is_equal_approx(result, 123'456),
+ (int)result == 123'456,
"Parsing an integer number as JSON should return the expected value.");
json.parse("0.123456", result, err_str, err_line);
@@ -155,7 +155,7 @@ TEST_CASE("[JSON] Parsing objects (dictionaries)") {
dictionary["bugs"] == Variant(),
"The parsed JSON should contain the expected values.");
CHECK_MESSAGE(
- Math::is_equal_approx(Dictionary(dictionary["apples"])["blue"], -20),
+ (int)Dictionary(dictionary["apples"])["blue"] == -20,
"The parsed JSON should contain the expected values.");
CHECK_MESSAGE(
dictionary["empty_object"].hash() == Dictionary().hash(),