full test fan out passes
diff --git a/inc/qcbor/qcbor_common.h b/inc/qcbor/qcbor_common.h
index 819abf1..e9d7b7b 100644
--- a/inc/qcbor/qcbor_common.h
+++ b/inc/qcbor/qcbor_common.h
@@ -44,6 +44,13 @@
#endif
+//#define QCBOR_DISABLE_ENCODE_USAGE_GUARDS
+
+//#define QCBOR_DISABLE_FLOAT_HW_USE
+
+//#define QCBOR_DISABLE_PREFERRED_FLOAT
+
+
/**
* @file qcbor_common.h
*
diff --git a/inc/qcbor/qcbor_encode.h b/inc/qcbor/qcbor_encode.h
index b141437..0cee391 100644
--- a/inc/qcbor/qcbor_encode.h
+++ b/inc/qcbor/qcbor_encode.h
@@ -828,6 +828,9 @@
*
* See also QCBOREncode_AddDoubleNoPreferred(), QCBOREncode_AddFloat()
* and QCBOREncode_AddFloatNoPreferred() and @ref Floating-Point.
+ *
+ * By default, this will error out on an attempt to encode a NaN with
+ * a payload. See QCBOREncode_Allow() and @ref QCBOR_ENCODE_ALLOW_NAN_PAYLOAD.
*/
void
QCBOREncode_AddDouble(QCBOREncodeContext *pCtx, double dNum);
@@ -872,9 +875,8 @@
*
* Error handling is the same as QCBOREncode_AddInt64().
*
- * This is not subject to the checks for allowed NaN Payloads. See
- * QCBOR_ENCODE_ALLOW_NAN_PAYLOAD.
- *
+ * By default, this will error out on an attempt to encode a NaN with
+ * a payload. See QCBOREncode_Allow() and @ref QCBOR_ENCODE_ALLOW_NAN_PAYLOAD.
*
* See also QCBOREncode_AddDouble(), QCBOREncode_AddFloat(), and
* QCBOREncode_AddFloatNoPreferred() and @ref Floating-Point.
@@ -900,9 +902,8 @@
*
* Error handling is the same as QCBOREncode_AddInt64().
*
- * This is not subject to the checks for allowed NaN Payloads. See
- * QCBOR_ENCODE_ALLOW_NAN_PAYLOAD.
- *
+ * By default, this will error out on an attempt to encode a NaN with
+ * a payload. See QCBOREncode_Allow() and @ref QCBOR_ENCODE_ALLOW_NAN_PAYLOAD.
*
* See also QCBOREncode_AddDouble(), QCBOREncode_AddFloat(), and
* QCBOREncode_AddDoubleNoPreferred() and @ref Floating-Point.
@@ -2593,6 +2594,9 @@
{
#ifndef QCBOR_DISABLE_ENCODE_USAGE_GUARDS
pMe->uAllow = uAllow;
+#else
+ (void)uAllow;
+ (void)pMe;
#endif /* ! QCBOR_DISABLE_ENCODE_USAGE_GUARDS */
}
diff --git a/inc/qcbor/qcbor_private.h b/inc/qcbor/qcbor_private.h
index a877d79..cfc031d 100644
--- a/inc/qcbor/qcbor_private.h
+++ b/inc/qcbor/qcbor_private.h
@@ -92,9 +92,9 @@
* should return 'x'.
* FLOAT_ERR_CODE_NO_HALF_PREC_NO_FLOAT_HW(x) Can be used when either disabled
* preferred float or disabling
- * hardware floating point results in
- * error, and all other cases should
- * return 'x'.
+ * hardware floating point results
+ * in error, and all other cases
+ * should return 'x'.
*/
#ifdef USEFULBUF_DISABLE_ALL_FLOAT
#define FLOAT_ERR_CODE_NO_FLOAT(x) QCBOR_ERR_ALL_FLOAT_DISABLED
@@ -235,7 +235,7 @@
* position in it. */
uint8_t uError; /* Error state, always from QCBORError enum */
uint8_t uMode; /* @ref QCBOR_ENCODE_MODE_PREFERRED or related */
- uint8_t uAllow; /* @ref QCBOR_ENCODE_ALLOW_NAN_PAYLOAD or related */
+ uint8_t uAllow; /* @ref QCBOR_ENCODE_ALLOW_NAN_PAYLOAD, ... */
void (*pfnCloseMap)(QCBORPrivateEncodeContext *); /* Use of function
* pointer explained in QCBOREncode_SerializationCDE() */
QCBORTrackNesting nesting; /* Keep track of array and map nesting */
diff --git a/src/ieee754.c b/src/ieee754.c
index d4f1b1c..ade83f5 100644
--- a/src/ieee754.c
+++ b/src/ieee754.c
@@ -17,7 +17,6 @@
*/
#include "qcbor/qcbor_common.h"
-#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
#include "ieee754.h"
#include <string.h> /* For memcpy() */
@@ -164,6 +163,8 @@
return u64;
}
+#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
+
static inline double
CopyUint64ToDouble(uint64_t u64)
{
@@ -692,7 +693,7 @@
} else if(nDoubleUnbiasedExponent == DOUBLE_EXPONENT_INF_OR_NAN) {
if(uDoubleSignificand != 0) {
/* --- NAN --- */
- Result.type = IEEE754_ToInt_NAN; /* dCBOR doesn't care about payload */
+ Result.type = IEEE754_ToInt_NaN; /* dCBOR doesn't care about payload */
} else {
/* --- INIFINITY --- */
Result.type = IEEE754_ToInt_NO_CONVERSION;
@@ -774,7 +775,7 @@
} else if(nSingleUnbiasedExponent == SINGLE_EXPONENT_INF_OR_NAN) {
/* --- NAN or INFINITY --- */
if(uSingleleSignificand != 0) {
- Result.type = IEEE754_ToInt_NAN; /* dCBOR doesn't care about payload */
+ Result.type = IEEE754_ToInt_NaN; /* dCBOR doesn't care about payload */
} else {
Result.type = IEEE754_ToInt_NO_CONVERSION;
}
@@ -822,6 +823,9 @@
return Result;
}
+#endif /* QCBOR_DISABLE_PREFERRED_FLOAT */
+
+
/* Public function; see ieee754.h */
int
@@ -862,8 +866,4 @@
}
}
-#else /* QCBOR_DISABLE_PREFERRED_FLOAT */
-int ieee754_dummy_place_holder;
-
-#endif /* QCBOR_DISABLE_PREFERRED_FLOAT */
diff --git a/src/ieee754.h b/src/ieee754.h
index 7d9abaf..53ab3eb 100644
--- a/src/ieee754.h
+++ b/src/ieee754.h
@@ -10,11 +10,11 @@
* Created on 7/23/18
* ========================================================================== */
-#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
#ifndef ieee754_h
#define ieee754_h
+
#include <stdint.h>
@@ -54,6 +54,7 @@
* conversion. This version is reduced to what is needed for CBOR.
*/
+#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
/**
* @brief Convert half-precision float to double-precision float.
@@ -97,7 +98,7 @@
enum {IEEE754_ToInt_IS_INT,
IEEE754_ToInt_IS_UINT,
IEEE754_ToInt_NO_CONVERSION,
- IEEE754_ToInt_NAN
+ IEEE754_ToInt_NaN
} type;
union {
uint64_t un_signed;
@@ -183,6 +184,7 @@
struct IEEE754_ToInt
IEEE754_SingleToInt(float f);
+#endif /* ! QCBOR_DISABLE_PREFERRED_FLOAT */
/**
@@ -222,4 +224,3 @@
#endif /* ieee754_h */
-#endif /* QCBOR_DISABLE_PREFERRED_FLOAT */
diff --git a/src/qcbor_decode.c b/src/qcbor_decode.c
index 76953df..a073009 100644
--- a/src/qcbor_decode.c
+++ b/src/qcbor_decode.c
@@ -5960,8 +5960,12 @@
#endif /* QCBOR_DISABLE_FLOAT_HW_USE */
case QCBOR_TYPE_65BIT_NEG_INT:
+#ifndef QCBOR_DISABLE_FLOAT_HW_USE
*pdValue = -(double)pItem->val.uint64 - 1;
break;
+#else
+ return QCBOR_ERR_HW_FLOAT_DISABLED;
+#endif /* QCBOR_DISABLE_FLOAT_HW_USE */
default:
return QCBOR_ERR_UNEXPECTED_TYPE;
diff --git a/src/qcbor_encode.c b/src/qcbor_encode.c
index da24c91..37b1c89 100644
--- a/src/qcbor_encode.c
+++ b/src/qcbor_encode.c
@@ -36,7 +36,7 @@
#include "ieee754.h"
#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
-#include <math.h> /* Only for NAN */
+#include <math.h> /* Only for NAN definition */
#endif /* ! QCBOR_DISABLE_ENCODE_USAGE_GUARDS */
@@ -515,7 +515,7 @@
* @param pMe Encoder context.
* @param uMajorType Major type to insert.
* @param uArgument The argument (an integer value or a length).
- * @param uMinLen The minimum number of bytes for encoding the CBOR argument.
+ * @param uMinLen Minimum number of bytes for encoding the CBOR argument.
*
* This formats the CBOR "head" and appends it to the output.
*/
@@ -677,16 +677,22 @@
/*
* Public functions for adding negative integers. See qcbor/qcbor_encode.h
*/
-void QCBOREncode_AddNegativeUInt64(QCBOREncodeContext *pMe, const uint64_t uValue)
+void
+QCBOREncode_AddNegativeUInt64(QCBOREncodeContext *pMe, const uint64_t uValue)
{
#ifndef QCBOR_DISABLE_ENCODE_USAGE_GUARDS
+ if(pMe->uMode >= QCBOR_ENCODE_MODE_DCBOR) {
+ /* Never allowed in dCBOR */
+ pMe->uError = QCBOR_ERR_NOT_PREFERRED;
+ return;
+ }
+
if(!(pMe->uAllow & QCBOR_ENCODE_ALLOW_65_BIG_NEG)) {
pMe->uError = QCBOR_ERR_NOT_ALLOWED;
return;
}
#endif /* QCBOR_DISABLE_ENCODE_USAGE_GUARDS */
- // TODO: Error out in dCBOR mode
QCBOREncode_Private_AppendCBORHead(pMe, CBOR_MAJOR_TYPE_NEGATIVE_INT, uValue, 0);
QCBOREncode_Private_IncrementMapOrArrayCount(pMe);
@@ -824,13 +830,17 @@
* Public functions for adding a double. See qcbor/qcbor_encode.h
*/
void
-QCBOREncode_AddDoubleNoPreferred(QCBOREncodeContext *pMe, double dNum)
+QCBOREncode_AddDoubleNoPreferred(QCBOREncodeContext *pMe, const double dNum)
{
#ifndef QCBOR_DISABLE_ENCODE_USAGE_GUARDS
if(pMe->uMode >= QCBOR_ENCODE_MODE_PREFERRED) {
pMe->uError = QCBOR_ERR_NOT_PREFERRED;
return;
}
+ if(IEEE754_IsNotStandardDoubleNaN(dNum) && !(pMe->uAllow & QCBOR_ENCODE_ALLOW_NAN_PAYLOAD)) {
+ pMe->uError = QCBOR_ERR_NOT_ALLOWED;
+ return;
+ }
#endif /* ! QCBOR_DISABLE_ENCODE_USAGE_GUARDS */
QCBOREncode_Private_AddType7(pMe,
@@ -866,7 +876,7 @@
case IEEE754_ToInt_IS_UINT:
QCBOREncode_AddUInt64(pMe, IntResult.integer.un_signed);
return;
- case IEEE754_ToInt_NAN:
+ case IEEE754_ToInt_NaN:
dNum = NAN;
bNoNaNPayload = true;
break;
@@ -900,6 +910,10 @@
pMe->uError = QCBOR_ERR_NOT_PREFERRED;
return;
}
+ if(IEEE754_IsNotStandardSingleNaN(fNum) && !(pMe->uAllow & QCBOR_ENCODE_ALLOW_NAN_PAYLOAD)) {
+ pMe->uError = QCBOR_ERR_NOT_ALLOWED;
+ return;
+ }
#endif /* ! QCBOR_DISABLE_ENCODE_USAGE_GUARDS */
QCBOREncode_Private_AddType7(pMe,
sizeof(uint32_t),
@@ -935,7 +949,7 @@
case IEEE754_ToInt_IS_UINT:
QCBOREncode_AddUInt64(pMe, IntResult.integer.un_signed);
return;
- case IEEE754_ToInt_NAN:
+ case IEEE754_ToInt_NaN:
fNum = NAN;
bNoNaNPayload = true;
break;
@@ -949,6 +963,7 @@
FloatResult = IEEE754_SingleToHalf(fNum, bNoNaNPayload);
QCBOREncode_Private_AddType7(pMe, (uint8_t)FloatResult.uSize, FloatResult.uValue);
+
#else /* QCBOR_DISABLE_PREFERRED_FLOAT */
QCBOREncode_AddFloatNoPreferred(pMe, fNum);
#endif /* QCBOR_DISABLE_PREFERRED_FLOAT */
@@ -1113,7 +1128,8 @@
*
* @param[in] pMe The encode context with map to close.
*
- * See QCBOREncode_SerializationCDE() implemention for explantion for why this exists in this form.
+ * See QCBOREncode_SerializationCDE() implemention for explantion for why
+ * this exists in this form.
*/
static void
QCBOREncode_Private_CloseMapUnsorted(QCBOREncodeContext *pMe)
diff --git a/test/float_tests.c b/test/float_tests.c
index a46f090..ce078d4 100644
--- a/test/float_tests.c
+++ b/test/float_tests.c
@@ -232,7 +232,7 @@
{"\xFA\x4F\x80\x00\x00", 5}, {"\x1B\x00\x00\x00\x01\x00\x00\x00\x00", 9}},
/* 2251799813685248 -- exponent 51, 0 significand bits set, to test double exponent boundary */
- {2251799813685248, 0,
+ {2251799813685248, 2251799813685248.0f,
{"\xFA\x59\x00\x00\x00", 5}, {"\xFB\x43\x20\x00\x00\x00\x00\x00\x00", 9},
{"\xFA\x59\x00\x00\x00", 5}, {"\x1B\x00\x08\x00\x00\x00\x00\x00\x00", 9}},
@@ -252,7 +252,7 @@
{"\xFB\x43\x4F\xFF\xFF\xFF\xFF\xFF\xFF", 9}, {"\x1B\x00\x3F\xFF\xFF\xFF\xFF\xFF\xFE", 9}},
/* 18014398509481984 -- next largest possible double above 18014398509481982 */
- {18014398509481984, 0,
+ {18014398509481984, 18014398509481984.0f,
{"\xFA\x5A\x80\x00\x00", 5}, {"\xFB\x43\x50\x00\x00\x00\x00\x00\x00", 9},
{"\xFA\x5A\x80\x00\x00", 5}, {"\x1B\x00\x40\x00\x00\x00\x00\x00\x00", 9}},
@@ -414,6 +414,10 @@
for(uTestIndex = 0; FloatTestCases[uTestIndex].Preferred.len != 0; uTestIndex++) {
pTestCase = &FloatTestCases[uTestIndex];
+ if(uTestIndex == 34) {
+ uDecoded = 1;
+ }
+
/* Number Encode of Preferred */
QCBOREncode_Init(&EnCtx, TestOutBuffer);
QCBOREncode_AddDouble(&EnCtx, pTestCase->dNumber);
@@ -529,7 +533,7 @@
}
}
}
-#endif /* QCBOR_DISABLE_FLOAT_HW_USE */
+#endif /* ! QCBOR_DISABLE_FLOAT_HW_USE */
/* Number Decode of Not Preferred */
QCBORDecode_Init(&DCtx, pTestCase->NotPreferred, 0);
diff --git a/test/qcbor_decode_tests.c b/test/qcbor_decode_tests.c
index 8e33858..363e452 100644
--- a/test/qcbor_decode_tests.c
+++ b/test/qcbor_decode_tests.c
@@ -6632,12 +6632,19 @@
int32_t IntegerConvertTest(void)
{
+ uint64_t uInt;
+
+
const int nNumTests = C_ARRAY_COUNT(NumberConversions,
struct NumberConversion);
for(int nIndex = 0; nIndex < nNumTests; nIndex++) {
const struct NumberConversion *pF = &NumberConversions[nIndex];
+ if(nIndex == 21) {
+ uInt = 99; // For break point
+ }
+
// Set up the decoding context including a memory pool so that
// indefinite length items can be checked
QCBORDecodeContext DCtx;
@@ -6662,7 +6669,6 @@
return (int32_t)(3333+nIndex);
}
- uint64_t uInt;
QCBORDecode_GetUInt64ConvertAll(&DCtx, 0xffff, &uInt);
if(QCBORDecode_GetError(&DCtx) != pF->uErrorUint64) {
return (int32_t)(4000+nIndex);
diff --git a/test/qcbor_encode_tests.c b/test/qcbor_encode_tests.c
index 744b011..ed8f734 100644
--- a/test/qcbor_encode_tests.c
+++ b/test/qcbor_encode_tests.c
@@ -745,6 +745,7 @@
goto Done;
}
+#ifndef USEFULBUF_DISABLE_ALL_FLOAT
QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
/* 0x7ff8000000000001ULL is a NaN with a payload. */
QCBOREncode_AddDouble(&ECtx, UsefulBufUtil_CopyUint64ToDouble(0x7ff8000000000001ULL));
@@ -753,6 +754,15 @@
goto Done;
}
+ QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
+ /* 0x7ff8000000000001ULL is a NaN with a payload. */
+ QCBOREncode_AddDoubleNoPreferred(&ECtx, UsefulBufUtil_CopyUint64ToDouble(0x7ff8000000000001ULL));
+ if(QCBOREncode_Finish(&ECtx, &Enc) != uExpectedErr) {
+ nReturn = -22;
+ goto Done;
+ }
+
+
/* 0x7ffc000000000000ULL is a NaN with a payload. */
QCBOREncode_AddDouble(&ECtx, UsefulBufUtil_CopyUint64ToDouble(0x7ff8000000000001ULL));
if(QCBOREncode_Finish(&ECtx, &Enc) != uExpectedErr) {
@@ -767,12 +777,20 @@
goto Done;
}
+ /* 0x7ff80001UL is a NaN with a payload. */
+ QCBOREncode_AddFloatNoPreferred(&ECtx, UsefulBufUtil_CopyUint32ToFloat(0x7ff80001UL));
+ if(QCBOREncode_Finish(&ECtx, &Enc) != uExpectedErr) {
+ nReturn = -24;
+ goto Done;
+ }
+
/* 0x7ffc0000UL is a NaN with a payload. */
QCBOREncode_AddFloat(&ECtx, UsefulBufUtil_CopyUint32ToFloat(0x7ffc0000UL));
if(QCBOREncode_Finish(&ECtx, &Enc) != uExpectedErr) {
nReturn = -25;
goto Done;
}
+#endif /* ! USEFULBUF_DISABLE_ALL_FLOAT */
Done:
return nReturn;
@@ -3415,9 +3433,12 @@
}
+#if !defined(USEFULBUF_DISABLE_ALL_FLOAT) && !defined(QCBOR_DISABLE_PREFERRED_FLOAT)
+
#include <math.h> /* For INFINITY and NAN and isnan() */
+/* Public function. See qcbor_encode_tests.h */
int32_t CDETest(void)
{
QCBOREncodeContext EC;
@@ -3490,7 +3511,7 @@
return 0;
}
-
+/* Public function. See qcbor_encode_tests.h */
int32_t DCBORTest(void)
{
QCBOREncodeContext EC;
@@ -3530,7 +3551,9 @@
uExpectedErr = QCBOR_SUCCESS;
#endif
- /* Next, make sure methods that encode non-CDE error out */
+ /* Next, make sure methods that encode of non-CDE error out */
+
+ /* Indefinite-length map */
QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
QCBOREncode_SerializationdCBOR(&EC);
QCBOREncode_OpenMapIndefiniteLength(&EC);
@@ -3539,16 +3562,36 @@
return 100;
}
- /* Next, make sure methods that encode non-CDE error out */
+ /* Indefinite-length array */
QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
QCBOREncode_SerializationdCBOR(&EC);
- QCBOREncode_AddUndef(&EC);
+ QCBOREncode_OpenArrayIndefiniteLength(&EC);
QCBOREncode_CloseMap(&EC);
if(QCBOREncode_GetErrorState(&EC) != uExpectedErr) {
return 101;
}
+ /* The "undef" special value */
+ QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
+ QCBOREncode_SerializationdCBOR(&EC);
+ QCBOREncode_AddUndef(&EC);
+ QCBOREncode_CloseMap(&EC);
+ if(QCBOREncode_GetErrorState(&EC) != uExpectedErr) {
+ return 102;
+ }
+
+ /* 65-bit negative integers */
+ QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
+ QCBOREncode_SerializationdCBOR(&EC);
+ QCBOREncode_AddNegativeUInt64(&EC, 1);
+ if(QCBOREncode_GetErrorState(&EC) != uExpectedErr) {
+ return 103;
+ }
+
+ /* Improvement: when indefinite length string encoding is supported
+ * test it here too. */
return 0;
}
+#endif /* ! USEFULBUF_DISABLE_ALL_FLOAT && ! QCBOR_DISABLE_PREFERRED_FLOAT */
diff --git a/test/qcbor_encode_tests.h b/test/qcbor_encode_tests.h
index 526bfaf..7935862 100644
--- a/test/qcbor_encode_tests.h
+++ b/test/qcbor_encode_tests.h
@@ -195,10 +195,14 @@
/* Test map sorting */
int32_t SortMapTest(void);
+#if !defined(USEFULBUF_DISABLE_ALL_FLOAT) && !defined(QCBOR_DISABLE_PREFERRED_FLOAT)
-/* Test CDE Encoding Mode (TODO: CDE definition is in progress in IETF) */
+/* Test CBOR Deterministic Encoding */
int32_t CDETest(void);
+/* Test "dCBOR" mode */
int32_t DCBORTest(void);
+#endif /* ! USEFULBUF_DISABLE_ALL_FLOAT && ! QCBOR_DISABLE_PREFERRED_FLOAT */
+
#endif /* defined(__QCBOR__qcbor_encode_tests__) */
diff --git a/test/run_tests.c b/test/run_tests.c
index bf18aa2..bfc9dd9 100644
--- a/test/run_tests.c
+++ b/test/run_tests.c
@@ -67,91 +67,94 @@
static test_entry s_tests[] = {
- TEST_ENTRY(OpenCloseBytesTest),
- TEST_ENTRY(EnterBstrTest),
- TEST_ENTRY(IntegerConvertTest),
- TEST_ENTRY(EnterMapTest),
- TEST_ENTRY(QCBORHeadTest),
- TEST_ENTRY(EmptyMapsAndArraysTest),
- TEST_ENTRY(NotWellFormedTests),
- TEST_ENTRY(ParseMapAsArrayTest),
+ TEST_ENTRY(OpenCloseBytesTest),
+ TEST_ENTRY(EnterBstrTest),
+ TEST_ENTRY(IntegerConvertTest),
+ TEST_ENTRY(EnterMapTest),
+ TEST_ENTRY(QCBORHeadTest),
+ TEST_ENTRY(EmptyMapsAndArraysTest),
+ TEST_ENTRY(NotWellFormedTests),
+ TEST_ENTRY(ParseMapAsArrayTest),
#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS
- TEST_ENTRY(IndefiniteLengthNestTest),
- TEST_ENTRY(IndefiniteLengthArrayMapTest),
- TEST_ENTRY(NestedMapTestIndefLen),
+ TEST_ENTRY(IndefiniteLengthNestTest),
+ TEST_ENTRY(IndefiniteLengthArrayMapTest),
+ TEST_ENTRY(NestedMapTestIndefLen),
#endif /* QCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS */
- TEST_ENTRY(ParseSimpleTest),
- TEST_ENTRY(DecodeFailureTests),
- TEST_ENTRY(EncodeRawTest),
- TEST_ENTRY(RTICResultsTest),
- TEST_ENTRY(MapEncodeTest),
- TEST_ENTRY(ArrayNestingTest1),
- TEST_ENTRY(ArrayNestingTest2),
+ TEST_ENTRY(ParseSimpleTest),
+ TEST_ENTRY(DecodeFailureTests),
+ TEST_ENTRY(EncodeRawTest),
+ TEST_ENTRY(RTICResultsTest),
+ TEST_ENTRY(MapEncodeTest),
+ TEST_ENTRY(ArrayNestingTest1),
+ TEST_ENTRY(ArrayNestingTest2),
#ifndef QCBOR_DISABLE_ENCODE_USAGE_GUARDS
- TEST_ENTRY(ArrayNestingTest3),
+ TEST_ENTRY(ArrayNestingTest3),
#endif /* QCBOR_DISABLE_ENCODE_USAGE_GUARDS */
- TEST_ENTRY(EncodeDateTest),
- TEST_ENTRY(SimpleValuesTest1),
- TEST_ENTRY(IntegerValuesTest1),
- TEST_ENTRY(AllAddMethodsTest),
- TEST_ENTRY(ParseTooDeepArrayTest),
- TEST_ENTRY(ComprehensiveInputTest),
- TEST_ENTRY(ParseMapTest),
- TEST_ENTRY(BasicEncodeTest),
- TEST_ENTRY(NestedMapTest),
- TEST_ENTRY(BignumParseTest),
+ TEST_ENTRY(EncodeDateTest),
+ TEST_ENTRY(SimpleValuesTest1),
+ TEST_ENTRY(IntegerValuesTest1),
+ TEST_ENTRY(AllAddMethodsTest),
+ TEST_ENTRY(ParseTooDeepArrayTest),
+ TEST_ENTRY(ComprehensiveInputTest),
+ TEST_ENTRY(ParseMapTest),
+ TEST_ENTRY(BasicEncodeTest),
+ TEST_ENTRY(NestedMapTest),
+ TEST_ENTRY(BignumParseTest),
#ifndef QCBOR_DISABLE_TAGS
- TEST_ENTRY(OptTagParseTest),
- TEST_ENTRY(DateParseTest),
- TEST_ENTRY(DecodeTaggedTypeTests),
+ TEST_ENTRY(OptTagParseTest),
+ TEST_ENTRY(DateParseTest),
+ TEST_ENTRY(DecodeTaggedTypeTests),
#endif /* QCBOR_DISABLE_TAGS */
- TEST_ENTRY(SpiffyDateDecodeTest),
- TEST_ENTRY(ShortBufferParseTest2),
- TEST_ENTRY(ShortBufferParseTest),
- TEST_ENTRY(ParseDeepArrayTest),
- TEST_ENTRY(SimpleArrayTest),
- TEST_ENTRY(IntegerValuesParseTest),
+ TEST_ENTRY(SpiffyDateDecodeTest),
+ TEST_ENTRY(ShortBufferParseTest2),
+ TEST_ENTRY(ShortBufferParseTest),
+ TEST_ENTRY(ParseDeepArrayTest),
+ TEST_ENTRY(SimpleArrayTest),
+ TEST_ENTRY(IntegerValuesParseTest),
#ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS
- TEST_ENTRY(AllocAllStringsTest),
- TEST_ENTRY(MemPoolTest),
- TEST_ENTRY(IndefiniteLengthStringTest),
- TEST_ENTRY(SpiffyIndefiniteLengthStringsTests),
- TEST_ENTRY(SetUpAllocatorTest),
- TEST_ENTRY(CBORTestIssue134),
+ TEST_ENTRY(AllocAllStringsTest),
+ TEST_ENTRY(MemPoolTest),
+ TEST_ENTRY(IndefiniteLengthStringTest),
+ TEST_ENTRY(SpiffyIndefiniteLengthStringsTests),
+ TEST_ENTRY(SetUpAllocatorTest),
+ TEST_ENTRY(CBORTestIssue134),
#endif /* #ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
#ifndef USEFULBUF_DISABLE_ALL_FLOAT
#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
TEST_ENTRY(HalfPrecisionAgainstRFCCodeTest),
TEST_ENTRY(FloatValuesTests),
#endif /* QCBOR_DISABLE_PREFERRED_FLOAT */
- TEST_ENTRY(GeneralFloatEncodeTests),
- TEST_ENTRY(GeneralFloatDecodeTests),
+ TEST_ENTRY(GeneralFloatEncodeTests),
+ TEST_ENTRY(GeneralFloatDecodeTests),
#endif /* USEFULBUF_DISABLE_ALL_FLOAT */
- TEST_ENTRY(BstrWrapTest),
- TEST_ENTRY(BstrWrapErrorTest),
- TEST_ENTRY(BstrWrapNestTest),
- TEST_ENTRY(CoseSign1TBSTest),
- TEST_ENTRY(StringDecoderModeFailTest),
- TEST_ENTRY_DISABLED(BigComprehensiveInputTest),
- TEST_ENTRY_DISABLED(TooLargeInputTest),
- TEST_ENTRY(EncodeErrorTests),
- TEST_ENTRY(SimpleValuesIndefiniteLengthTest1),
- TEST_ENTRY(EncodeLengthThirtyoneTest),
- TEST_ENTRY(CBORSequenceDecodeTests),
- TEST_ENTRY(IntToTests),
- TEST_ENTRY(PeekAndRewindTest),
+ TEST_ENTRY(BstrWrapTest),
+ TEST_ENTRY(BstrWrapErrorTest),
+ TEST_ENTRY(BstrWrapNestTest),
+ TEST_ENTRY(CoseSign1TBSTest),
+ TEST_ENTRY(StringDecoderModeFailTest),
+ TEST_ENTRY_DISABLED(BigComprehensiveInputTest),
+ TEST_ENTRY_DISABLED(TooLargeInputTest),
+ TEST_ENTRY(EncodeErrorTests),
+ TEST_ENTRY(SimpleValuesIndefiniteLengthTest1),
+ TEST_ENTRY(EncodeLengthThirtyoneTest),
+ TEST_ENTRY(CBORSequenceDecodeTests),
+ TEST_ENTRY(IntToTests),
+ TEST_ENTRY(PeekAndRewindTest),
#ifndef QCBOR_DISABLE_EXP_AND_MANTISSA
- TEST_ENTRY(ExponentAndMantissaDecodeTests),
+ TEST_ENTRY(ExponentAndMantissaDecodeTests),
#ifndef QCBOR_DISABLE_TAGS
- TEST_ENTRY(ExponentAndMantissaDecodeFailTests),
+ TEST_ENTRY(ExponentAndMantissaDecodeFailTests),
#endif /* QCBOR_DISABLE_TAGS */
- TEST_ENTRY(ExponentAndMantissaEncodeTests),
+ TEST_ENTRY(ExponentAndMantissaEncodeTests),
#endif /* QCBOR_DISABLE_EXP_AND_MANTISSA */
- TEST_ENTRY(ParseEmptyMapInMapTest),
- TEST_ENTRY(BoolTest),
- TEST_ENTRY(SortMapTest),
- TEST_ENTRY(CDETest),
- TEST_ENTRY(DCBORTest)
+ TEST_ENTRY(BoolTest),
+ TEST_ENTRY(SortMapTest),
+#if !defined(USEFULBUF_DISABLE_ALL_FLOAT) && !defined(QCBOR_DISABLE_PREFERRED_FLOAT)
+ TEST_ENTRY(CDETest),
+ TEST_ENTRY(DCBORTest),
+#endif /* ! USEFULBUF_DISABLE_ALL_FLOAT && ! QCBOR_DISABLE_PREFERRED_FLOAT */
+ TEST_ENTRY(ParseEmptyMapInMapTest),
+
};