more thorough removal of float
diff --git a/test/float_tests.c b/test/float_tests.c
index 20057c3..54683c3 100644
--- a/test/float_tests.c
+++ b/test/float_tests.c
@@ -10,6 +10,8 @@
Created on 9/19/18
=============================================================================*/
+#ifndef QCBOR_CONFIG_DISABLE_ENCODE_IEEE754
+
#include "float_tests.h"
#include "qcbor.h"
#include "half_to_double_from_rfc7049.h"
@@ -491,5 +493,6 @@
}
#endif
+#endif /* QCBOR_CONFIG_DISABLE_ENCODE_IEEE754 */
diff --git a/test/float_tests.h b/test/float_tests.h
index f777156..50f3e8a 100644
--- a/test/float_tests.h
+++ b/test/float_tests.h
@@ -15,11 +15,15 @@
#include <stdint.h>
+#ifndef QCBOR_CONFIG_DISABLE_ENCODE_IEEE754
+
int32_t HalfPrecisionDecodeBasicTests(void);
int32_t DoubleAsSmallestTest(void);
int32_t HalfPrecisionAgainstRFCCodeTest(void);
+#endif /* QCBOR_CONFIG_DISABLE_ENCODE_IEEE754 */
+
#endif /* float_tests_h */
diff --git a/test/qcbor_decode_tests.c b/test/qcbor_decode_tests.c
index a9e1fb2..140283f 100644
--- a/test/qcbor_decode_tests.c
+++ b/test/qcbor_decode_tests.c
@@ -2125,6 +2125,7 @@
}
// Epoch date in float format with fractional seconds
+#ifndef QCBOR_DISABLE_FLOAT_HW_USE
if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
return -8;
if(Item.uDataType != QCBOR_TYPE_DATE_EPOCH ||
@@ -2132,6 +2133,10 @@
CHECK_EXPECTED_DOUBLE(Item.val.epochDate.fSecondsFraction, 0.1 )) {
return -9;
}
+#else
+ if(QCBORDecode_GetNext(&DCtx, &Item) != QCBOR_ERR_FLOAT_DATE_UNSUPPORTED)
+ return -80;
+#endif
// Epoch date float that is too large for our representation
if(QCBORDecode_GetNext(&DCtx, &Item) != QCBOR_ERR_DATE_OVERFLOW) {
diff --git a/test/run_tests.c b/test/run_tests.c
index 8e52dae..78450eb 100644
--- a/test/run_tests.c
+++ b/test/run_tests.c
@@ -91,9 +91,11 @@
TEST_ENTRY(IntegerValuesParseTest),
TEST_ENTRY(MemPoolTest),
TEST_ENTRY(IndefiniteLengthStringTest),
+#ifndef QCBOR_CONFIG_DISABLE_ENCODE_IEEE754
TEST_ENTRY(HalfPrecisionDecodeBasicTests),
TEST_ENTRY(DoubleAsSmallestTest),
TEST_ENTRY(HalfPrecisionAgainstRFCCodeTest),
+#endif /* QCBOR_CONFIG_DISABLE_ENCODE_IEEE754 */
TEST_ENTRY(BstrWrapTest),
TEST_ENTRY(BstrWrapErrorTest),
TEST_ENTRY(BstrWrapNestTest),