From bbb727d657aa4912e86620d874673e7a5680b53f Mon Sep 17 00:00:00 2001 From: Hayden Roche Date: Tue, 30 Jan 2024 12:14:48 -0800 Subject: [PATCH] Fix macro gating for single vs. double precision in unit tests. (#138) --- test/src/JSON_number_handling_test.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/src/JSON_number_handling_test.cpp b/test/src/JSON_number_handling_test.cpp index 9b59406..9c63689 100644 --- a/test/src/JSON_number_handling_test.cpp +++ b/test/src/JSON_number_handling_test.cpp @@ -258,9 +258,10 @@ SCENARIO("Marshalling") GIVEN("A JSON object with a numeric field with the max value of JINTEGER " "plus 4096") { -#ifdef NOTE_C_LOW_MEM - // In the NOTE_C_LOW_MEM case, where JNUMBER is a single-precision - // float, JINTEGER_MAX_PLUS_4096 is indistinguishable from JINTEGER_MAX. +#ifdef NOTE_C_TEST_SINGLE_PRECISION + // In the NOTE_C_TEST_SINGLE_PRECISION case, where JNUMBER is a + // single-precision float, JINTEGER_MAX_PLUS_4096 is indistinguishable + // from JINTEGER_MAX. const char expected[] = "{\"" FIELD "\":" JINTEGER_MAX_STR "}"; #else const char expected[] = "{\"" FIELD "\":" \ @@ -331,10 +332,10 @@ SCENARIO("Marshalling") GIVEN("A J object with a numeric field with the min value of JINTEGER minus" " 4096") { -#ifdef NOTE_C_LOW_MEM - // In the NOTE_C_LOW_MEM case, where JNUMBER is a single-precision - // float, JINTEGER_MIN_MINUS_4096 is indistinguishable from - // JINTEGER_MIN. +#ifdef NOTE_C_TEST_SINGLE_PRECISION + // In the NOTE_C_TEST_SINGLE_PRECISION case, where JNUMBER is a + // single-precision float, JINTEGER_MIN_MINUS_4096 is indistinguishable + // from JINTEGER_MIN. const char expected[] = "{\"" FIELD "\":" JINTEGER_MIN_STR "}"; #else const char expected[] = "{\"" FIELD "\":" \