remove all trailing tabs and spaces
diff --git a/test/UsefulBuf_Tests.c b/test/UsefulBuf_Tests.c
index 82f2da6..3ec2529 100644
--- a/test/UsefulBuf_Tests.c
+++ b/test/UsefulBuf_Tests.c
@@ -2,7 +2,7 @@
  Copyright (c) 2016-2018, The Linux Foundation.
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -16,7 +16,7 @@
       contributors, nor the name "Laurence Lundblade" may be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -34,11 +34,11 @@
 
 
 /* Basic exercise...
-   
+
    Call all the main public functions.
- 
+
    Binary compare the result to the expected.
- 
+
    There is nothing adversarial in this test
  */
 const char * UOBTest_NonAdversarial()
@@ -46,16 +46,16 @@
    const char *szReturn = NULL;
 
    UsefulBuf_MAKE_STACK_UB(outbuf,50);
-   
+
    UsefulOutBuf UOB;
-   
+
    UsefulOutBuf_Init(&UOB, outbuf);
-   
+
    if(!UsefulOutBuf_AtStart(&UOB)) {
       szReturn = "Not at start";
       goto Done;
    }
-   
+
    // Put 7 bytes at beginning of buf
    UsefulOutBuf_AppendData(&UOB, "bluster", 7);
 
@@ -63,41 +63,41 @@
       szReturn = "At start";
       goto Done;
    }
-   
+
    // add a space to end
    UsefulOutBuf_AppendByte(&UOB, ' ');
-   
+
    // Add 5 bytes to the end
    UsefulBufC UBC = {"hunny", 5};
    UsefulOutBuf_AppendUsefulBuf(&UOB, UBC);
-   
+
    // Insert 9 bytes at the beginning, slide the previous stuff right
    UsefulOutBuf_InsertData(&UOB, "heffalump", 9, 0);
    UsefulOutBuf_InsertByte(&UOB, ' ', 9);
-   
+
    // Put 9 bytes in at position 10 -- just after "heffalump "
    UsefulBufC UBC2 = {"unbounce ", 9};
    UsefulOutBuf_InsertUsefulBuf(&UOB, UBC2, 10);
-   
+
    // Make it a null terminated string (because all the appends and inserts above not strcpy !)
    UsefulOutBuf_AppendByte(&UOB, '\0');
-   
-   
+
+
    UsefulBufC U = UsefulOutBuf_OutUBuf(&UOB);
-   
+
    const char *expected = "heffalump unbounce bluster hunny";
-   
+
    if(UsefulBuf_IsNULLC(U) || U.len-1 != strlen(expected) || strcmp(expected, U.ptr) || UsefulOutBuf_GetError(&UOB)) {
       szReturn = "OutUBuf";
    }
-   
+
    UsefulBuf_MAKE_STACK_UB(buf, 50);
    UsefulBufC Out =  UsefulOutBuf_CopyOut(&UOB, buf);
-   
+
    if(UsefulBuf_IsNULLC(Out) || Out.len-1 != strlen(expected) || strcmp(expected, Out.ptr)) {
       szReturn = "CopyOut";
    }
-   
+
 Done:
    return szReturn;
 }
@@ -108,26 +108,26 @@
     pUOB is the buffer to append too
     num is the amount to append
     expected is the expected return code, 0 or 1
- 
+
  returns 0 if test passed
- 
+
  */
 static int AppendTest(UsefulOutBuf *pUOB, size_t num, int expected)
 {
    //reset
    UsefulOutBuf_Reset(pUOB);
-   
+
    // check status first
    if(UsefulOutBuf_GetError(pUOB))
       return 1;
-   
+
    // append the bytes
    UsefulOutBuf_AppendData(pUOB, (const uint8_t *)"bluster", num);
-   
+
    // check error status after
    if(UsefulOutBuf_GetError(pUOB) != expected)
       return 1;
-   
+
    return 0;
 }
 
@@ -139,16 +139,16 @@
 {
    // reset
    UsefulOutBuf_Reset(pUOB);
-   
+
    // check
    if(UsefulOutBuf_GetError(pUOB))
       return 1;
-   
+
    UsefulOutBuf_InsertData(pUOB, (const uint8_t *)"bluster", num, pos);
-   
+
    if(UsefulOutBuf_GetError(pUOB) != expected)
       return 1;
-   
+
    return 0;
 }
 
@@ -158,28 +158,28 @@
    - around 0
    - around the buffer size
    - around MAX size_t
- 
- 
+
+
  Test these for the buffer size and the cursor, the insert amount, the append amount and the insert position
- 
+
  */
 
 const char *UOBTest_BoundaryConditionsTest()
 {
    UsefulBuf_MAKE_STACK_UB(outbuf,2);
-   
+
    UsefulOutBuf UOB;
-   
+
    UsefulOutBuf_Init(&UOB, outbuf);
 
    // append 0 byte to a 2 byte buffer --> success
    if(AppendTest(&UOB, 0, 0))
       return "Append 0 bytes failed";
-   
+
    // append 1 byte to a 2 byte buffer --> success
    if(AppendTest(&UOB, 1, 0))
       return "Append of 1 byte failed";
-   
+
    // append 2 byte to a 2 byte buffer --> success
    if(AppendTest(&UOB, 2, 0))
       return "Append to fill buffer failed";
@@ -191,53 +191,53 @@
    // append max size_t to a 2 byte buffer --> failure
    if(AppendTest(&UOB, SIZE_MAX, 1))
       return "Append of SIZE_MAX error not caught";
-   
+
    if(InsertTest(&UOB, 1, 0, 0))
       return "Insert 1 byte at start failed";
 
    if(InsertTest(&UOB, 2, 0, 0))
       return "Insert 2 bytes at start failed";
-   
+
    if(InsertTest(&UOB, 3, 0, 1))
       return "Insert overflow not caught";
-   
+
    if(InsertTest(&UOB, 1, 1, 1))
       return "Bad insertion point not caught";
-   
-   
+
+
    UsefulBuf_MAKE_STACK_UB(outBuf2,10);
-   
+
    UsefulOutBuf_Init(&UOB, outBuf2);
-   
+
    UsefulOutBuf_Reset(&UOB);
    // put data in the buffer
    UsefulOutBuf_AppendString(&UOB, "abc123");
-   
+
    UsefulOutBuf_InsertString(&UOB, "xyz*&^", 0);
-   
+
    if(!UsefulOutBuf_GetError(&UOB)) {
       return "insert with data should have failed";
    }
-   
+
 
    UsefulOutBuf_Init(&UOB, (UsefulBuf){NULL, SIZE_MAX - 5});
    UsefulOutBuf_AppendData(&UOB, "123456789", SIZE_MAX -6);
    if(UsefulOutBuf_GetError(&UOB)) {
       return "insert in huge should have succeeded";
    }
-   
+
    UsefulOutBuf_Init(&UOB, (UsefulBuf){NULL, SIZE_MAX - 5});
    UsefulOutBuf_AppendData(&UOB, "123456789", SIZE_MAX -5);
    if(UsefulOutBuf_GetError(&UOB)) {
       return "insert in huge should have succeeded";
    }
-   
+
    UsefulOutBuf_Init(&UOB, (UsefulBuf){NULL, SIZE_MAX - 5});
    UsefulOutBuf_AppendData(&UOB, "123456789", SIZE_MAX - 4);
    if(!UsefulOutBuf_GetError(&UOB)) {
       return "lengths near max size";
    }
-   
+
    return NULL;
 }
 
@@ -250,15 +250,15 @@
 const char *TestBasicSanity()
 {
    UsefulBuf_MAKE_STACK_UB(outbuf,10);
-   
+
    UsefulOutBuf UOB;
-   
+
    // First -- make sure that the room left function returns the right amount
    UsefulOutBuf_Init(&UOB, outbuf);
- 
+
    if(UsefulOutBuf_RoomLeft(&UOB) != 10)
       return "room left failed";
-   
+
    if(!UsefulOutBuf_WillItFit(&UOB, 9)) {
       return "it did not fit";
    }
@@ -266,27 +266,27 @@
    if(UsefulOutBuf_WillItFit(&UOB, 11)) {
       return "it should have not fit";
    }
-   
-   
+
+
    // Next -- make sure that the magic number checking is working right
    UOB.magic = 8888; // make magic bogus
-   
+
    UsefulOutBuf_AppendData(&UOB, (const uint8_t *)"bluster", 7);
-   
+
    if(!UsefulOutBuf_GetError(&UOB))
       return "magic corruption check failed";
-   
-   
-   
+
+
+
    // Next make sure that the valid data length check is working right
    UsefulOutBuf_Init(&UOB, outbuf);
-   
+
    UOB.data_len = UOB.UB.len+1; // make size bogus
-   
+
    UsefulOutBuf_AppendData(&UOB, (const uint8_t *)"bluster", 7);
    if(!UsefulOutBuf_GetError(&UOB))
       return "valid data check failed";
-   
+
    return NULL;
 }
 
@@ -295,11 +295,11 @@
 const char *UBMacroConversionsTest()
 {
    char *szFoo = "foo";
-   
+
    UsefulBufC Foo = UsefulBuf_FromSZ(szFoo);
    if(Foo.len != 3 || strncmp(Foo.ptr, szFoo, 3))
       return "SZToUsefulBufC failed";
-   
+
    UsefulBufC Too = UsefulBuf_FROM_SZ_LITERAL("Toooo");
    if(Too.len != 5 || strncmp(Too.ptr, "Toooo", 5))
       return "UsefulBuf_FROM_SZ_LITERAL failed";
@@ -308,13 +308,13 @@
    UsefulBufC Boo = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pB);
    if(Boo.len != 3 || strncmp(Boo.ptr, "Boo", 3))
      return "UsefulBuf_FROM_BYTE_ARRAY_LITERAL failed";
-   
+
    char *sz = "not const"; // some data for the test
    UsefulBuf B = (UsefulBuf){sz, sizeof(sz)};
    UsefulBufC BC = UsefulBuf_Const(B);
    if(BC.len != sizeof(sz) || BC.ptr != sz)
       return "UsefulBufConst failed";
-   
+
    return NULL;
 }
 
@@ -322,7 +322,7 @@
 const char *UBUtilTests()
 {
    UsefulBuf UB = NULLUsefulBuf;
-   
+
    if(!UsefulBuf_IsNULL(UB)){
       return "IsNull failed";
    }
@@ -330,64 +330,64 @@
    if(!UsefulBuf_IsEmpty(UB)){
       return "IsEmpty failed";
    }
-   
+
    if(!UsefulBuf_IsNULLOrEmpty(UB)) {
       return "IsNULLOrEmpty failed";
    }
-   
+
    const UsefulBufC UBC = UsefulBuf_Const(UB);
-   
+
    if(!UsefulBuf_IsNULLC(UBC)){
       return "IsNull const failed";
    }
-   
+
    if(!UsefulBuf_IsEmptyC(UBC)){
       return "IsEmptyC failed";
    }
-   
+
    if(!UsefulBuf_IsNULLOrEmptyC(UBC)){
       return "IsNULLOrEmptyC failed";
    }
-   
+
    const UsefulBuf UB2 = UsefulBuf_Unconst(UBC);
    if(!UsefulBuf_IsEmpty(UB2)) {
       return "Back to UB is Empty failed";
    }
-   
+
    UB.ptr = "x"; // just some valid pointer
-   
+
    if(UsefulBuf_IsNULL(UB)){
       return "IsNull failed";
    }
-   
+
    if(!UsefulBuf_IsEmptyC(UBC)){
       return "IsEmpty failed";
    }
-   
+
    // test the Unconst.
    if(UsefulBuf_Unconst(UBC).ptr != NULL) {
       return "Unconst failed";
    }
-   
+
    // Set 100 bytes of '+'; validated a few tests later
    UsefulBuf_MAKE_STACK_UB(Temp, 100);
    const UsefulBufC TempC = UsefulBuf_Set(Temp, '+');
-   
+
    // Try to copy into a buf that is too small and see failure
    UsefulBuf_MAKE_STACK_UB(Temp2, 99);
    if(!UsefulBuf_IsNULLC(UsefulBuf_Copy(Temp2, TempC))) {
       return "Copy should have failed";
    }
-   
+
    if(UsefulBuf_IsNULLC(UsefulBuf_CopyPtr(Temp2, "xx", 2))) {
       return "CopyPtr failed";
    }
-   
+
    UsefulBufC xxyy = UsefulBuf_CopyOffset(Temp2, 2, UsefulBuf_FROM_SZ_LITERAL("yy"));
    if(UsefulBuf_IsNULLC(xxyy)) {
       return "CopyOffset Failed";
    }
-   
+
    if(UsefulBuf_Compare(UsefulBuf_Head(xxyy, 3), UsefulBuf_FROM_SZ_LITERAL("xxy"))) {
       return "head failed";
    }
@@ -395,7 +395,7 @@
    if(UsefulBuf_Compare(UsefulBuf_Tail(xxyy, 1), UsefulBuf_FROM_SZ_LITERAL("xyy"))) {
       return "tail failed";
    }
-   
+
    if(!UsefulBuf_IsNULLC(UsefulBuf_Head(xxyy, 5))) {
       return "head should have failed";
    }
@@ -403,27 +403,27 @@
    if(!UsefulBuf_IsNULLC(UsefulBuf_Tail(xxyy, 5))) {
       return "tail should have failed";
    }
-   
+
    if(!UsefulBuf_IsNULLC(UsefulBuf_CopyOffset(Temp2, 100, UsefulBuf_FROM_SZ_LITERAL("yy")))) {
       return "Copy Offset should have failed";
    }
-   
+
    // Try to copy into a NULL/empty buf and see failure
    const UsefulBuf UBNull = NULLUsefulBuf;
    if(!UsefulBuf_IsNULLC(UsefulBuf_Copy(UBNull, TempC))) {
       return "Copy to NULL should have failed";
    }
-   
-   
+
+
    // Try to set a NULL/empty buf; nothing should happen
    UsefulBuf_Set(UBNull, '+'); // This will crash on failure
-   
+
    // Copy successfully to a buffer
    UsefulBuf_MAKE_STACK_UB(Temp3, 101);
    if(UsefulBuf_IsNULLC(UsefulBuf_Copy(Temp3, TempC))) {
       return "Copy should not have failed";
    }
-   
+
    static const uint8_t pExpected[] = {
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+',
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+',
@@ -441,12 +441,12 @@
    if(UsefulBuf_Compare(Expected, TempC)) {
       return "Set / Copy / Compare failed";
    }
-   
+
    // Compare two empties and expect success
    if(UsefulBuf_Compare(NULLUsefulBufC, NULLUsefulBufC)){
       return "Compare Empties failed";
    }
-   
+
    // Compare with empty and expect the first to be larger
    if(UsefulBuf_Compare(Expected, NULLUsefulBufC) <= 0){
       return "Compare with empty failed";
@@ -466,13 +466,13 @@
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  ',',
    };
    const UsefulBufC ExpectedBigger = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pExpectedBigger);
-   
+
    // Expect -1 when the first arg is smaller
    if(UsefulBuf_Compare(Expected, ExpectedBigger) >= 0){
       return "Compare with bigger";
    }
 
-   
+
    static const uint8_t pExpectedSmaller[] = {
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+',
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+',
@@ -490,8 +490,8 @@
    if(UsefulBuf_Compare(Expected, ExpectedSmaller) <= 0){
       return "Compare with smaller";
    }
-   
-   
+
+
    static const uint8_t pExpectedLonger[] = {
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+',
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+',
@@ -505,13 +505,13 @@
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+', '+'
    };
    const UsefulBufC ExpectedLonger = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pExpectedLonger);
-   
+
    // Expect -1 when the first arg is smaller
    if(UsefulBuf_Compare(Expected, ExpectedLonger) >= 0){
       return "Compare with longer";
    }
 
-   
+
    static const uint8_t pExpectedShorter[] = {
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+',
       '+',  '+',  '+',  '+', '+',  '+',  '+', '+',  '+',  '+',
@@ -529,21 +529,21 @@
    if(UsefulBuf_Compare(Expected, ExpectedShorter) <= 0){
       return "Compare with shorter";
    }
-   
-   
+
+
    if(UsefulBuf_IsNULLC(UsefulBuf_Copy(Temp, NULLUsefulBufC))) {
       return "Copy null/empty failed";
    }
-   
+
    // Look for +++++... in +++++... and find it at the beginning
    if(0 != UsefulBuf_FindBytes(ExpectedLonger, ExpectedShorter)){
       return "Failed to find";
    }
-   
+
    // look for ++* in ....++* and find it at the end
    static const uint8_t pToFind[] = {'+', '+', '*'};
    const UsefulBufC ToBeFound = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pToFind);
-   
+
    if(97 != UsefulBuf_FindBytes(ExpectedSmaller, ToBeFound)){
       return "Failed to find 2";
    }
@@ -552,12 +552,12 @@
    if(SIZE_MAX != UsefulBuf_FindBytes(ExpectedBigger, ToBeFound)){
       return "Failed to not find";
    }
-   
+
    // Look for the whole buffer in itself and succeed.
    if(0 != UsefulBuf_FindBytes(ExpectedLonger, ExpectedLonger)){
       return "Failed to find 3";
    }
-   
+
    return NULL;
 }
 
@@ -565,40 +565,40 @@
 const char *  UIBTest_IntegerFormat()
 {
    UsefulOutBuf_MakeOnStack(UOB,100);
-   
+
    const uint32_t u32 = 0x0A0B0C0D; // from https://en.wikipedia.org/wiki/Endianness
    const uint64_t u64 = 1984738472938472;
    const uint16_t u16 = 40000;
    const uint8_t  u8 = 9;
    const float    f  = (float)314.15;
    const double   d  = 2.1e10;
-   
-   
+
+
    UsefulOutBuf_AppendUint32(&UOB, u32); // Also tests UsefulOutBuf_InsertUint64 and UsefulOutBuf_GetEndPosition
    UsefulOutBuf_AppendUint64(&UOB, u64); // Also tests UsefulOutBuf_InsertUint32
    UsefulOutBuf_AppendUint16(&UOB, u16); // Also tests UsefulOutBuf_InsertUint16
    UsefulOutBuf_AppendByte(&UOB, u8);
    UsefulOutBuf_AppendFloat(&UOB, f); // Also tests UsefulOutBuf_InsertFloat
    UsefulOutBuf_AppendDouble(&UOB, d); // Also tests UsefulOutBuf_InsertDouble
-   
+
    const UsefulBufC O = UsefulOutBuf_OutUBuf(&UOB);
    if(UsefulBuf_IsNULLC(O))
       return "Couldn't output integers";
-   
+
    // from https://en.wikipedia.org/wiki/Endianness
    const uint8_t pExpectedNetworkOrder[4] = {0x0A, 0x0B, 0x0C, 0x0D};
    if(memcmp(O.ptr, pExpectedNetworkOrder, 4)) {
       return "not in network order";
    }
-   
+
    UsefulInputBuf UIB;
-   
+
    UsefulInputBuf_Init(&UIB, O);
-   
+
    if(UsefulInputBuf_Tell(&UIB) != 0) {
       return "UsefulInputBuf_Tell failed";
    }
-   
+
    if(UsefulInputBuf_GetUint32(&UIB) != u32) {
       return "u32 out then in failed";
    }
@@ -620,7 +620,7 @@
 
    // Reset and go again for a few more tests
    UsefulInputBuf_Init(&UIB, O);
-   
+
    const UsefulBufC Four = UsefulInputBuf_GetUsefulBuf(&UIB, 4);
    if(UsefulBuf_IsNULLC(Four)) {
       return "Four is NULL";
@@ -628,7 +628,7 @@
    if(UsefulBuf_Compare(Four, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pExpectedNetworkOrder))) {
       return "Four compare failed";
    }
-   
+
    if(UsefulInputBuf_BytesUnconsumed(&UIB) != 23){
       return "Wrong number of unconsumed bytes";
    }
@@ -640,28 +640,28 @@
    if(UsefulInputBuf_BytesAvailable(&UIB, 24)){
       return "Wrong number of bytes available II";
    }
-   
+
    UsefulInputBuf_Seek(&UIB, 0);
-   
+
    if(UsefulInputBuf_GetError(&UIB)) {
       return "unexpected error after seek";
    }
-   
+
    const uint8_t *pGetBytes = (const uint8_t *)UsefulInputBuf_GetBytes(&UIB, 4);
    if(pGetBytes == NULL) {
       return "GetBytes returns NULL";
    }
-   
+
    if(memcmp(pGetBytes, pExpectedNetworkOrder, 4)) {
       return "Got wrong bytes";
    }
-   
+
    UsefulInputBuf_Seek(&UIB, 28);
 
    if(!UsefulInputBuf_GetError(&UIB)) {
       return "expected error after seek";
    }
-   
+
    return NULL;
 }
 
@@ -675,15 +675,15 @@
    if(UsefulBufUtil_CopyDoubleToUint64(4e-40F) != 0X37C16C2800000000ULL) {
       return "CopyDoubleToUint64 failed";
    }
-   
+
    if(UsefulBufUtil_CopyUint64ToDouble(0X37C16C2800000000ULL) != 4e-40F) {
       return "CopyUint64ToDouble failed";
    }
-   
+
    if(UsefulBufUtil_CopyUint32ToFloat(0x47800000) != 65536.0F) {
       return "CopyUint32ToFloat failed";
    }
-   
+
    return NULL;
 }
 
diff --git a/test/UsefulBuf_Tests.h b/test/UsefulBuf_Tests.h
index 649d6a8..976de62 100644
--- a/test/UsefulBuf_Tests.h
+++ b/test/UsefulBuf_Tests.h
@@ -2,7 +2,7 @@
  Copyright (c) 2016-2018, The Linux Foundation.
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -16,7 +16,7 @@
       contributors, nor the name "Laurence Lundblade" may be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
diff --git a/test/UsefulBuf_Tests.o b/test/UsefulBuf_Tests.o
new file mode 100644
index 0000000..cf71175
--- /dev/null
+++ b/test/UsefulBuf_Tests.o
Binary files differ
diff --git a/test/float_tests.c b/test/float_tests.c
index 2b472f3..7bc23aa 100644
--- a/test/float_tests.c
+++ b/test/float_tests.c
@@ -3,7 +3,7 @@
 
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -16,7 +16,7 @@
     * The name "Laurence Lundblade" may not be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -86,17 +86,17 @@
         0xF9, 0x7E, 0x0F,    // qNaN with payload 0x0f
         0x07,
         0xF9, 0x7C, 0x0F,    // sNaN with payload 0x0f
-    
+
 };
 
 
 int HalfPrecisionDecodeBasicTests()
 {
     UsefulBufC HalfPrecision = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spExpectedHalf);
-    
+
     QCBORDecodeContext DC;
     QCBORDecode_Init(&DC, HalfPrecision, 0);
-    
+
     QCBORItem Item;
 
     QCBORDecode_GetNext(&DC, &Item);
@@ -108,7 +108,7 @@
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != 0.0F) {
         return -2;
     }
-    
+
     QCBORDecode_GetNext(&DC, &Item);
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != INFINITY) {
         return -3;
@@ -128,7 +128,7 @@
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != 1.0F) {
         return -6;
     }
-    
+
     QCBORDecode_GetNext(&DC, &Item);
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != 0.333251953125F) {
         return -7;
@@ -143,7 +143,7 @@
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != INFINITY) {
         return -9;
     }
-    
+
     QCBORDecode_GetNext(&DC, &Item); // TODO: check this
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != 0.0000000596046448F) {
         return -10;
@@ -158,17 +158,17 @@
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != 0.0000610351563F) {
         return -12;
     }
-    
-    QCBORDecode_GetNext(&DC, &Item); 
+
+    QCBORDecode_GetNext(&DC, &Item);
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != 0) {
         return -13;
     }
-    
+
     QCBORDecode_GetNext(&DC, &Item);
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || Item.val.dfnum != -2.0F) {
         return -14;
     }
-    
+
     // TODO: double check these four tests
     QCBORDecode_GetNext(&DC, &Item); // qNaN
     if(Item.uDataType != QCBOR_TYPE_DOUBLE || UsefulBufUtil_CopyDoubleToUint64(Item.val.dfnum) != 0x7ff8000000000000ULL) {
@@ -190,7 +190,7 @@
     if(QCBORDecode_Finish(&DC)) {
         return -19;
     }
-    
+
     return 0;
 }
 
@@ -204,12 +204,12 @@
         x[1] = uHalfP & 0xff;
         x[0] = uHalfP >> 8;
         double d = decode_half(x);
-        
+
         // Contruct the CBOR for the half-precision float by hand
         UsefulBuf_MAKE_STACK_UB(__xx, 3);
         UsefulOutBuf UOB;
         UsefulOutBuf_Init(&UOB, __xx);
-        
+
         const uint8_t uHalfPrecInitialByte = HALF_PREC_FLOAT + (CBOR_MAJOR_TYPE_SIMPLE << 5); // 0xf9
         UsefulOutBuf_AppendByte(&UOB, uHalfPrecInitialByte); // The initial byte for a half-precision float
         UsefulOutBuf_AppendUint16(&UOB, (uint16_t)uHalfP);
@@ -217,16 +217,16 @@
         // Now parse the hand-constructed CBOR. This will invoke the conversion to a float
         QCBORDecodeContext DC;
         QCBORDecode_Init(&DC, UsefulOutBuf_OutUBuf(&UOB), 0);
-        
+
         QCBORItem Item;
-        
+
         QCBORDecode_GetNext(&DC, &Item);
         if(Item.uDataType != QCBOR_TYPE_DOUBLE) {
             return -1;
         }
-        
+
         //printf("%04x  QCBOR:%15.15f  RFC: %15.15f (%8x)\n", uHalfP,Item.val.fnum, d , UsefulBufUtil_CopyFloatToUint32(d));
-        
+
         if(isnan(d)) {
             // The RFC code uses the native instructions which may or may not
             // handle sNaN, qNaN and NaN payloads correctly. This test just
@@ -315,11 +315,11 @@
 int DoubleAsSmallestTest()
 {
     UsefulBuf_MAKE_STACK_UB(EncodedHalfsMem, 420);
-    
+
 #define QCBOREncode_AddDoubleAsSmallestToMap QCBOREncode_AddDoubleToMap
 #define QCBOREncode_AddDoubleAsSmallestToMapN QCBOREncode_AddDoubleToMapN
 
-    
+
     QCBOREncodeContext EC;
     QCBOREncode_Init(&EC, EncodedHalfsMem);
     // These are mostly from https://en.wikipedia.org/wiki/Half-precision_floating-point_format
@@ -333,34 +333,34 @@
     //    7A65726F                          # "negative zero"
     // F9 8000                              # primitive(0)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "negative zero", -0.00);
-    
+
     // 6A                                   # text(10)
     //    696E66696E6974697479              # "infinitity"
     // F9 7C00                              # primitive(31744)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "infinitity", INFINITY);
-    
+
     // 73                                   # text(19)
     //    6E6567617469766520696E66696E6974697479 # "negative infinitity"
     // F9 FC00                              # primitive(64512)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "negative infinitity", -INFINITY);
-    
+
     // 63                                   # text(3)
     //    4E614E                            # "NaN"
     // F9 7E00                              # primitive(32256)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "NaN", NAN);
-    
+
     // TODO: test a few NaN variants
-    
+
     // 63                                   # text(3)
     //    6F6E65                            # "one"
     // F9 3C00                              # primitive(15360)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "one", 1.0);
-    
+
     // 69                                   # text(9)
     //    6F6E65207468697264                # "one third"
     // F9 3555                              # primitive(13653)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "one third", 0.333251953125);
-    
+
     // 76                                   # text(22)
     //    6C6172676573742068616C662D707265636973696F6E # "largest half-precision"
     // F9 7BFF                              # primitive(31743)
@@ -370,20 +370,20 @@
     //    6C6172676573742068616C662D707265636973696F6E # "largest half-precision"
     // F9 7BFF                              # primitive(31743)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "largest half-precision point one",65504.1);
-    
+
     // Float 65536.0F is 0x47800000 in hex. It has an exponent of 16, which is larger than 15, the largest half-precision exponent
     // 78 18                                # text(24)
     //    746F6F2D6C617267652068616C662D707265636973696F6E # "too-large half-precision"
     // FA 47800000                          # primitive(31743)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "too-large half-precision", 65536.0);
-    
+
     // The smallest possible half-precision subnormal, but digitis are lost converting
     // to half, so this turns into a double
     // 72                                   # text(18)
     //    736D616C6C657374207375626E6F726D616C # "smallest subnormal"
     // FB 3E700000001C5F68                  # primitive(4499096027744984936)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "smallest subnormal", 0.0000000596046448);
-    
+
     // The smallest possible half-precision snormal, but digitis are lost converting
     // to half, so this turns into a single TODO: confirm this is right
     // 6F                                   # text(15)
@@ -391,22 +391,22 @@
     // FA 387FFFFF                          # primitive(947912703)
     // in hex single is 0x387fffff, exponent -15, significand 7fffff
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "smallest normal",    0.0000610351526F);
-    
+
     // 71                                   # text(17)
     //    62696767657374207375626E6F726D616C # "biggest subnormal"
     // F9 0400                              # primitive(1024)
     // in hex single is 0x38800000, exponent -14, significand 0
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "biggest subnormal",  0.0000610351563F);
-    
+
     // 70                                   # text(16)
     //    7375626E6F726D616C2073696E676C65  # "subnormal single"
     // FB 37C16C2800000000                  # primitive(4017611261645684736)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "subnormal single", 4e-40F);
-    
+
     // 03                                   # unsigned(3)
     // F9 C000                              # primitive(49152)
     QCBOREncode_AddDoubleAsSmallestToMapN(&EC, 3, -2.0);
-    
+
     // 70                                   # text(16)
     //    6C617267652073696E676C6520657870  # "large single exp"
     // FA 7F400000                          # primitive(2134900736)
@@ -423,27 +423,27 @@
     //    646664666465                      # "dfdfde"
     // FA 4B800000                          # primitive(1266679808)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "biggest single with prec",16777216); // Single with no precision loss
-    
+
     // 78 18                                # text(24)
     //    626967676573742073696E676C6520776974682070726563 # "biggest single with prec"
     // FA 4B800000                          # primitive(1266679808)
     QCBOREncode_AddDoubleAsSmallestToMap(&EC, "first single with prec loss",16777217); // Double becuase of precision loss
-    
+
     // Just a convenient marker when cutting and pasting encoded CBOR
     QCBOREncode_AddSZStringToMapN(&EC, 1, "fin");
 
     QCBOREncode_CloseMap(&EC);
-    
+
     UsefulBufC EncodedHalfs;
     int nReturn = QCBOREncode_Finish(&EC, &EncodedHalfs);
     if(nReturn) {
         return -1;
     }
-    
+
     if(UsefulBuf_Compare(EncodedHalfs, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spExpectedSmallest))) {
         return -3;
     }
-    
+
     return 0;
 }
 
@@ -474,20 +474,20 @@
     double dqNaN = UsefulBufUtil_CopyUint64ToDouble(DOUBLE_EXPONENT_MASK | DOUBLE_QUIET_NAN_BIT);
     double dsNaN = UsefulBufUtil_CopyUint64ToDouble(DOUBLE_EXPONENT_MASK | 0x01);
     double dqNaNPayload = UsefulBufUtil_CopyUint64ToDouble(DOUBLE_EXPONENT_MASK | DOUBLE_QUIET_NAN_BIT | 0xf00f);
-    
+
     float f1 = (float)dqNaN;
     float f2 = (float)dsNaN;
     float f3 = (float)dqNaNPayload;
-    
-    
+
+
     uint32_t uqNaN = UsefulBufUtil_CopyFloatToUint32((float)dqNaN);
     uint32_t usNaN = UsefulBufUtil_CopyFloatToUint32((float)dsNaN);
     uint32_t uqNaNPayload = UsefulBufUtil_CopyFloatToUint32((float)dqNaNPayload);
-    
+
     // Result of this on x86 is that every NaN is a qNaN. The intel
     // CVTSD2SS instruction ignores the NaN payload and even converts
     // a sNaN to a qNaN.
-    
+
     return 0;
 }
 #endif
diff --git a/test/float_tests.h b/test/float_tests.h
index 6bc0af1..ffd8aac 100644
--- a/test/float_tests.h
+++ b/test/float_tests.h
@@ -3,7 +3,7 @@
 
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -16,7 +16,7 @@
     * The name "Laurence Lundblade" may not be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
diff --git a/test/float_tests.o b/test/float_tests.o
new file mode 100644
index 0000000..7cd2a48
--- /dev/null
+++ b/test/float_tests.o
Binary files differ
diff --git a/test/half_to_double_from_rfc7049.c b/test/half_to_double_from_rfc7049.c
index 68d03cb..6380e51 100644
--- a/test/half_to_double_from_rfc7049.c
+++ b/test/half_to_double_from_rfc7049.c
@@ -1,8 +1,8 @@
 /*
- 
+
  Copyright (c) 2013 IETF Trust and the persons identified as the
  document authors.  All rights reserved.
- 
+
  This document is subject to BCP 78 and the IETF Trust's Legal
  Provisions Relating to IETF Documents
  (http://trustee.ietf.org/license-info) in effect on the date of
@@ -12,7 +12,7 @@
  include Simplified BSD License text as described in Section 4.e of
  the Trust Legal Provisions and are provided without warranty as
  described in the Simplified BSD License.
- 
+
  */
 
 /*
@@ -20,13 +20,13 @@
  because:
    a) it adds a dependency on <math.h> and ldexp().
    b) the license may be an issue
- 
+
  QCBOR does support half-precision, but rather than using
  floating point math like this, it does it with bit shifting
  and masking.
- 
+
  This code is here to test that code.
- 
+
  */
 
 #include "half_to_double_from_rfc7049.h"
diff --git a/test/half_to_double_from_rfc7049.h b/test/half_to_double_from_rfc7049.h
index c8b2a06..a971c6c 100644
--- a/test/half_to_double_from_rfc7049.h
+++ b/test/half_to_double_from_rfc7049.h
@@ -1,11 +1,11 @@
 /*==============================================================================
- 
+
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -18,7 +18,7 @@
     * The name "Laurence Lundblade" may not be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
diff --git a/test/half_to_double_from_rfc7049.o b/test/half_to_double_from_rfc7049.o
new file mode 100644
index 0000000..84eac79
--- /dev/null
+++ b/test/half_to_double_from_rfc7049.o
Binary files differ
diff --git a/test/qcbor_decode_malloc_tests.c b/test/qcbor_decode_malloc_tests.c
index ea184b5..903f560 100644
--- a/test/qcbor_decode_malloc_tests.c
+++ b/test/qcbor_decode_malloc_tests.c
@@ -1,8 +1,8 @@
 /*==============================================================================
- 
+
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -15,7 +15,7 @@
     * The name "Laurence Lundblade" may not be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -63,11 +63,11 @@
 int MallocAllStringsTest()
 {
     QCBORDecodeContext DC;
-    
+
     // Next parse, save pointers to a few strings, destroy original and see all is OK.
     UsefulBuf_MAKE_STACK_UB(CopyOfStorage, 160);
     const UsefulBufC CopyOf = UsefulBuf_Copy(CopyOfStorage, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pValidMapEncoded));
-    
+
     QCBORDecode_Init(&DC, CopyOf, QCBOR_DECODE_MODE_NORMAL);
     QCBORStringAllocator *pAlloc = QCBORDecode_MakeMallocStringAllocator();
     QCBORDecode_SetUpAllocator(&DC, pAlloc, true);
@@ -88,35 +88,35 @@
         return nCBORError;
     if((nCBORError = QCBORDecode_GetNext(&DC, &Item4)))
         return nCBORError;
-    
+
     UsefulBuf_Set(CopyOfStorage, '_');
-    
+
     if(Item1.uLabelType != QCBOR_TYPE_TEXT_STRING ||
        Item1.label.string.len != 13 ||
        Item1.uDataType != QCBOR_TYPE_INT64 ||
        Item1.val.int64 != 42 ||
        memcmp(Item1.label.string.ptr, "first integer", 13))
         return -1;
-    
+
     if(Item2.uLabelType != QCBOR_TYPE_TEXT_STRING ||
        Item2.label.string.len != 23 ||
        memcmp(Item2.label.string.ptr, "an array of two strings", 23) ||
        Item2.uDataType != QCBOR_TYPE_ARRAY ||
        Item2.val.uCount != 2)
         return -1;
-    
+
     if(Item3.uDataType != QCBOR_TYPE_TEXT_STRING ||
        Item3.val.string.len != 7 ||
        memcmp(Item3.val.string.ptr, "string1", 7))
         return -1;
-    
+
     if(Item4.uDataType != QCBOR_TYPE_TEXT_STRING ||
        Item4.val.string.len != 7 ||
        memcmp(Item4.val.string.ptr, "string2", 7))
         return -1;
-    
+
     (void)QCBORDecode_Finish(&DC);
-    
+
     free(UNCONST_POINTER(Item1.label.string.ptr));
     free(UNCONST_POINTER(Item2.label.string.ptr));
     free(UNCONST_POINTER(Item3.val.string.ptr));
diff --git a/test/qcbor_decode_malloc_tests.h b/test/qcbor_decode_malloc_tests.h
index 9682f26..c9a7da3 100644
--- a/test/qcbor_decode_malloc_tests.h
+++ b/test/qcbor_decode_malloc_tests.h
@@ -1,8 +1,8 @@
 /*==============================================================================
- 
+
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -15,7 +15,7 @@
     * The name "Laurence Lundblade" may not be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
diff --git a/test/qcbor_decode_malloc_tests.o b/test/qcbor_decode_malloc_tests.o
new file mode 100644
index 0000000..3bec7b3
--- /dev/null
+++ b/test/qcbor_decode_malloc_tests.o
Binary files differ
diff --git a/test/qcbor_decode_tests.c b/test/qcbor_decode_tests.c
index 6e8f282..be84e65 100644
--- a/test/qcbor_decode_tests.c
+++ b/test/qcbor_decode_tests.c
@@ -2,7 +2,7 @@
  Copyright (c) 2016-2018, The Linux Foundation.
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -16,7 +16,7 @@
       contributors, nor the name "Laurence Lundblade" may be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -43,7 +43,7 @@
    if(szLabel) {
       printf("%s ", szLabel);
    }
-   
+
    size_t i;
    for(i = 0; i < nLen; i++) {
       uint8_t Z = pEncoded[i];
@@ -89,7 +89,7 @@
 {
    QCBORItem          Item;
    int nCBORError;
-   
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_ARRAY)
@@ -106,165 +106,165 @@
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -4294967297)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -4294967296)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -4294967295)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -4294967294)
       return -1;
-   
-   
+
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -2147483648)
       return -1;
-  
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -2147483647)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -65538)
       return  -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -65537)
       return  -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -65536)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -65535)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -65534)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -257)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -256)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -255)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -254)
       return  -1;
-   
-   
+
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -25)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -24)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -23)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != -1)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 0)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 0)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 1)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 22)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 23)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 24)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
@@ -277,143 +277,143 @@
       Item.val.int64 != 26)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 254)
       return  -1;
-   
-   
+
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 255)
       return  -1;
-   
-   
+
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 256)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 257)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 65534)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 65535)
       return  -1;
 
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 65536)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 65537)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 65538)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 2147483647)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 2147483647)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 2147483648)
       return  -1;
-   
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 2147483649)
       return  -1;
-  
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 4294967294)
       return  -1;
-   
-   
+
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 4294967295)
       return  -1;
-   
-   
+
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 4294967296)
       return  -1;
-   
-   
+
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 4294967297)
       return  -1;
 
-   
-   
+
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 9223372036854775807LL)
       return  -1;
-   
-   
+
+
    if((   nCBORError = QCBORDecode_GetNext(pDCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_UINT64 ||
       Item.val.uint64 != 18446744073709551615ULL)
       return  -1;
-   
-   
+
+
    if(QCBORDecode_Finish(pDCtx) != QCBOR_SUCCESS) {
       return -1;
    }
-   
+
    return 0;
 }
 
 
-/* 
-   Tests the decoding of lots of different integers sizes 
+/*
+   Tests the decoding of lots of different integers sizes
    and values.
  */
 
@@ -421,31 +421,31 @@
 {
    int n;
    QCBORDecodeContext DCtx;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spExpectedEncodedInts), QCBOR_DECODE_MODE_NORMAL);
-   
+
    n = IntegerValuesParseTestInternal(&DCtx);
-   
+
    return(n);
 }
 
 
 /*
    Creates a simple CBOR array and returns it in *pEncoded. The array is malloced
-   and needs to be freed. This is used by several tests. 
- 
+   and needs to be freed. This is used by several tests.
+
    Two of the inputs can be set. Two other items in the array are fixed.
- 
+
  */
 
 static int CreateSimpleArray(int nInt1, int nInt2, uint8_t **pEncoded, size_t *pEncodedLen)
 {
    QCBOREncodeContext ECtx;
    int nReturn = -1;
-   
+
    *pEncoded = NULL;
    *pEncodedLen = INT32_MAX;
-   
+
    // loop runs CBOR encoding twice. First with no buffer to
    // calucate the length so buffer can be allocated correctly,
    // and last with the buffer to do the actual encoding
@@ -457,7 +457,7 @@
       QCBOREncode_AddBytes(&ECtx, ((UsefulBufC) {"galactic", 8}));
       QCBOREncode_AddBytes(&ECtx, ((UsefulBufC) {"haven token", 11}));
       QCBOREncode_CloseArray(&ECtx);
-      
+
       UsefulBufC Encoded;
       if(QCBOREncode_Finish(&ECtx, &Encoded))
          goto Done;
@@ -472,11 +472,11 @@
          nReturn = -1;
          goto Done;
       }
-      
+
    } while(1);
 Done:
    return (nReturn);
-   
+
 }
 
 
@@ -517,37 +517,37 @@
    QCBORDecodeContext DCtx;
    QCBORItem          Item;
    int                nReturn = -1; // assume error until success
-   
+
    QCBORDecode_Init(&DCtx, (UsefulBufC){pEncoded, nLen}, QCBOR_DECODE_MODE_NORMAL);
-   
+
    // Make sure the first thing is a map
    if(QCBORDecode_GetNext(&DCtx, &Item) != 0 || Item.uDataType != QCBOR_TYPE_ARRAY)
       goto Done;
-   
+
    // First integer
    if(QCBORDecode_GetNext(&DCtx, &Item) != 0 || Item.uDataType != QCBOR_TYPE_INT64)
       goto Done;
    *pInt1 = Item.val.int64;
-   
+
    // Second integer
    if(QCBORDecode_GetNext(&DCtx, &Item) != 0 || Item.uDataType != QCBOR_TYPE_INT64)
       goto Done;
    *pInt2 = Item.val.int64;
-   
+
    // First string
    if(QCBORDecode_GetNext(&DCtx, &Item) != 0 || Item.uDataType != QCBOR_TYPE_BYTE_STRING)
       goto Done;
    *pBuf3 = Item.val.string.ptr;
    *pBuf3Len = Item.val.string.len;
-   
+
    // Second string
    if(QCBORDecode_GetNext(&DCtx, &Item) != 0 || Item.uDataType != QCBOR_TYPE_BYTE_STRING)
       goto Done;
    *pBuf4 = Item.val.string.ptr;
    *pBuf4Len = Item.val.string.len;
-   
+
    nReturn = 0;
-   
+
 Done:
    return(nReturn);
 }
@@ -559,18 +559,18 @@
 {
    uint8_t *pEncoded;
    size_t  nEncodedLen;
-   
+
    int64_t i1, i2;
    size_t i3, i4;
    const uint8_t *s3, *s4;
-   
-   
+
+
    if(CreateSimpleArray(23, 6000, &pEncoded, &nEncodedLen) < 0) {
       return(-1);
    }
-   
+
    ParseOrderedArray(pEncoded, nEncodedLen, &i1, &i2, &s3, &i3, &s4, &i4);
-   
+
    if(i1 != 23 ||
       i2 != 6000 ||
       i3 != 8 ||
@@ -579,7 +579,7 @@
       memcmp("haven token", s4, 11) !=0) {
       return(-1);
    }
-   
+
    return(0);
 }
 
@@ -592,12 +592,12 @@
    QCBORDecodeContext DCtx;
    int nReturn = 0;
    int i;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spDeepArrays), QCBOR_DECODE_MODE_NORMAL);
-   
+
    for(i = 0; i < 10; i++) {
       QCBORItem Item;
-      
+
       if(QCBORDecode_GetNext(&DCtx, &Item) != 0 ||
          Item.uDataType != QCBOR_TYPE_ARRAY ||
          Item.uNestingLevel != i) {
@@ -605,7 +605,7 @@
          break;
       }
    }
-   
+
    return(nReturn);
 }
 
@@ -621,12 +621,12 @@
    int nReturn = 0;
    int i;
    QCBORItem Item;
-   
-   
+
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spTooDeepArrays), QCBOR_DECODE_MODE_NORMAL);
-   
+
    for(i = 0; i < QCBOR_MAX_ARRAY_NESTING1; i++) {
-      
+
       if(QCBORDecode_GetNext(&DCtx, &Item) != 0 ||
          Item.uDataType != QCBOR_TYPE_ARRAY ||
          Item.uNestingLevel != i) {
@@ -634,10 +634,10 @@
          break;
       }
    }
-   
+
    if(QCBORDecode_GetNext(&DCtx, &Item) != QCBOR_ERR_ARRAY_NESTING_TOO_DEEP)
       nReturn = -1;
-   
+
    return(nReturn);
 }
 
@@ -649,16 +649,16 @@
    int nResult  = 0;
    QCBORDecodeContext DCtx;
    int num;
-   
+
    for(num = sizeof(spExpectedEncodedInts)-1; num; num--) {
       int n;
-      
+
       QCBORDecode_Init(&DCtx, (UsefulBufC){spExpectedEncodedInts, num}, QCBOR_DECODE_MODE_NORMAL);
-      
+
       n = IntegerValuesParseTestInternal(&DCtx);
-      
+
       //printf("Len %d, result: %d\n", num, n);
-      
+
       if(n != QCBOR_ERR_HIT_END) {
          nResult = -1;
          goto Done;
@@ -675,24 +675,24 @@
    uint8_t *pEncoded;
    int      nReturn;
    size_t   nEncodedLen;
-   
+
    int64_t i1, i2;
    size_t i3, i4;
    const uint8_t *s3, *s4;
-   
+
    nReturn = 0;
-   
+
    if(CreateSimpleArray(23, 6000, &pEncoded, &nEncodedLen) < 0) {
       return(-1);
    }
-   
+
    for(nEncodedLen--; nEncodedLen; nEncodedLen--) {
       int nResult = ParseOrderedArray(pEncoded, (uint32_t)nEncodedLen, &i1, &i2, &s3, &i3, &s4, &i4);
       if(nResult == 0) {
          nReturn = -1;
       }
    }
-   
+
    return(nReturn);
 }
 
@@ -705,16 +705,16 @@
    QCBORDecodeContext DCtx;
    QCBORItem Item;
    int nCBORError;
-   
+
    QCBORDecode_Init(&DCtx, (UsefulBufC){pValidMapEncoded, sizeof(pValidMapEncoded)}, nMode);
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
    if(Item.uDataType != QCBOR_TYPE_MAP ||
       Item.val.uCount != 3)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -726,7 +726,7 @@
       UsefulBuf_Compare(Item.label.string, UsefulBuf_FromSZ("first integer"))) {
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -737,7 +737,7 @@
       Item.uDataType != QCBOR_TYPE_ARRAY ||
       Item.val.uCount != 2)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -747,7 +747,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("string1"))) {
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -757,7 +757,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("string2"))) {
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -769,7 +769,7 @@
       Item.val.uCount != 4) {
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -781,7 +781,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("xxxx"))) {
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -793,7 +793,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("yyyy"))) {
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -804,7 +804,7 @@
       Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 98)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -816,7 +816,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("lies, damn lies and statistics"))) {
       return -1;
    }
-   
+
    return 0;
 }
 
@@ -830,9 +830,9 @@
    QCBORDecodeContext DCtx;
    QCBORItem Item;
    int nCBORError;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pValidMapEncoded), QCBOR_DECODE_MODE_MAP_AS_ARRAY);
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -840,7 +840,7 @@
       Item.val.uCount != 6) {
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -862,7 +862,7 @@
       Item.uLabelAlloc) {
       return -3;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -884,7 +884,7 @@
       Item.val.uCount != 2) {
       return -5;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -895,7 +895,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("string1"))) {
       return -6;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -905,8 +905,8 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("string2"))) {
       return -7;
    }
-   
-   
+
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -927,7 +927,7 @@
       Item.val.uCount != 8) {
       return -9;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -938,7 +938,7 @@
       Item.uLabelAlloc) {
       return -10;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -949,7 +949,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("xxxx"))) {
       return -11;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -960,7 +960,7 @@
       Item.uLabelAlloc) {
       return -12;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -971,7 +971,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("yyyy"))) {
       return -13;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -982,7 +982,7 @@
       Item.uDataType != QCBOR_TYPE_TEXT_STRING) {
       return -14;
    }
-  
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -993,7 +993,7 @@
       Item.val.int64 != 98) {
       return -15;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1015,7 +1015,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("lies, damn lies and statistics"))) {
       return -17;
    }
-   
+
    return 0;
 }
 
@@ -1024,10 +1024,10 @@
  Fully or partially decode pValidMapEncoded. When
  partially decoding check for the right error code.
  How much partial decoding depends on nLevel.
- 
+
  The partial decodes test error conditions of
  incomplete encoded input.
- 
+
  This could be combined with the above test
  and made prettier and maybe a little more
  thorough.
@@ -1037,9 +1037,9 @@
    QCBORDecodeContext DCtx;
    QCBORItem Item;
    int nCBORError;
-   
+
    QCBORDecode_Init(&DCtx, (UsefulBufC){pValidMapEncoded, sizeof(pValidMapEncoded)}, QCBOR_DECODE_MODE_NORMAL);
-   
+
    if(nLevel < 1) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_EXTRA_BYTES) {
          return -1;
@@ -1048,7 +1048,7 @@
       }
    }
 
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1063,8 +1063,8 @@
          return 0;
       }
    }
-   
-   
+
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1074,7 +1074,7 @@
       UsefulBuf_Compare(Item.label.string, UsefulBuf_FromSZ("first integer"))) {
       return -1;
    }
-   
+
    if(nLevel < 3) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
          return -1;
@@ -1082,7 +1082,7 @@
          return 0;
       }
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1092,8 +1092,8 @@
       Item.val.uCount != 2) {
       return -1;
    }
-   
-   
+
+
    if(nLevel < 4) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
          return -1;
@@ -1101,8 +1101,8 @@
          return 0;
       }
    }
-   
-   
+
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1110,7 +1110,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("string1"))) {
       return -1;
    }
-   
+
    if(nLevel < 5) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
          return -1;
@@ -1118,7 +1118,7 @@
          return 0;
       }
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1126,7 +1126,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("string2"))) {
       return -1;
    }
- 
+
    if(nLevel < 6) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
          return -1;
@@ -1134,7 +1134,7 @@
          return 0;
       }
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1143,7 +1143,7 @@
       Item.uDataType != QCBOR_TYPE_MAP ||
       Item.val.uCount != 4)
       return -1;
-   
+
    if(nLevel < 7) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
          return -1;
@@ -1151,7 +1151,7 @@
          return 0;
       }
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1161,7 +1161,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("xxxx"))) {
       return -1;
    }
-   
+
    if(nLevel < 8) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
          return -1;
@@ -1169,7 +1169,7 @@
          return 0;
       }
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1179,7 +1179,7 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("yyyy"))) {
       return -1;
    }
-   
+
    if(nLevel < 9) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
          return -1;
@@ -1187,7 +1187,7 @@
          return 0;
       }
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1196,7 +1196,7 @@
       Item.uDataType != QCBOR_TYPE_INT64 ||
       Item.val.int64 != 98)
       return -1;
-   
+
    if(nLevel < 10) {
       if(QCBORDecode_Finish(&DCtx) != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
          return -1;
@@ -1204,7 +1204,7 @@
          return 0;
       }
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item))) {
       return nCBORError;
    }
@@ -1214,11 +1214,11 @@
       UsefulBuf_Compare(Item.val.string, UsefulBuf_FromSZ("lies, damn lies and statistics"))) {
       return -1;
    }
-   
+
    if(QCBORDecode_Finish(&DCtx)) {
       return -1;
    }
-   
+
    return 0;
 }
 
@@ -1240,7 +1240,7 @@
          }
       }
    }
-   
+
    return(n);
 }
 
@@ -1252,17 +1252,17 @@
    QCBORDecodeContext DCtx;
    QCBORItem Item;
    int nCBORError;
-   
-   
+
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spSimpleValues), QCBOR_DECODE_MODE_NORMAL);
-   
-   
+
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_ARRAY ||
       Item.val.uCount != 10)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_FALSE)
@@ -1272,12 +1272,12 @@
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_TRUE)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_NULL)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_UNDEF)
@@ -1299,25 +1299,25 @@
 
    if(QCBORDecode_GetNext(&DCtx, &Item) != QCBOR_ERR_INVALID_CBOR)
       return -1;
-   
+
    if(QCBORDecode_GetNext(&DCtx, &Item) != QCBOR_ERR_INVALID_CBOR)
       return -1;
 
    if(QCBORDecode_GetNext(&DCtx, &Item) != QCBOR_ERR_INVALID_CBOR)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_UKNOWN_SIMPLE || Item.val.uSimple != 32)
       return -1;
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return nCBORError;
    if(Item.uDataType != QCBOR_TYPE_UKNOWN_SIMPLE || Item.val.uSimple != 255)
       return -1;
-   
+
    return 0;
-   
+
 }
 
 
@@ -1357,16 +1357,16 @@
 int FailureTests()
 {
    int nResult = 0;
-   
+
    struct FailInput *pFEnd = &Failures[0] + sizeof(Failures)/sizeof(struct FailInput);
-   
+
    for(struct FailInput *pF = &Failures[0]; pF < pFEnd ;pF++) {
       QCBORDecodeContext DCtx;
       QCBORItem Item;
       int nCBORError;
-      
+
       QCBORDecode_Init(&DCtx, pF->Input, QCBOR_DECODE_MODE_NORMAL);
-      
+
       while(1) {
          nCBORError = QCBORDecode_GetNext(&DCtx, &Item);
          if(QCBOR_ERR_HIT_END == nCBORError) {
@@ -1378,12 +1378,12 @@
          }
       }
    }
-   
+
    {
       QCBORDecodeContext DCtx;
       QCBORItem Item;
       int nCBORError;
-      
+
       QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spSimpleValues), QCBOR_DECODE_MODE_NORMAL);
 
       if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
@@ -1391,15 +1391,15 @@
       if(Item.uDataType != QCBOR_TYPE_ARRAY ||
          Item.val.uCount != 10)
          return -1;
-      
+
       DCtx.InBuf.magic = 0; // Corrupt the UsefulInputBuf
-      
+
       nCBORError = QCBORDecode_GetNext(&DCtx, &Item);
       if(nCBORError != QCBOR_ERR_HIT_END)
          return -1;
    }
-   
-   
+
+
    return nResult;
 }
 
@@ -1408,24 +1408,24 @@
 
 static void Recurser(uint8_t *pBuf, int nLen, int nLenMax)
 {
-   
+
    if(nLen >= nLenMax) {
       return;
    }
 
    //printf("__%d__%d__\n", nLen, nLenMax);
-   
+
    for(int i = 0; i < 256; i++) {
       pBuf[nLen] = i;
-      
+
       QCBORDecodeContext DCtx;
       QCBORItem Item;
       int nCBORError;
-      
+
       const UsefulBufC Input = {pBuf, nLen+1};
-      
+
       QCBORDecode_Init(&DCtx, Input, QCBOR_DECODE_MODE_NORMAL);
-      
+
       while(1) {
          nCBORError =  QCBORDecode_GetNext(&DCtx, &Item);
          if(QCBOR_ERR_HIT_END == nCBORError) {
@@ -1438,14 +1438,14 @@
          }
       }
 
-   
+
       Recurser(pBuf, nLen+1, nLenMax);
    }
 }
 
 
 /*
- Runs all possible input strings of a given length. This is set to 3 to make the test 
+ Runs all possible input strings of a given length. This is set to 3 to make the test
  run in reasonable time.
  Main point of this test is to not crash.
  */
@@ -1453,16 +1453,16 @@
 int ComprehensiveInputTest()
 {
    uint8_t pBuf[3]; // 3 keeps it running in reasonable time. 4 takes tens of minutes.
-   
+
    Recurser(pBuf, 0, sizeof(pBuf));
-   
+
    return 0;
 }
 
 static uint8_t spDateTestInput[] = {
    0xc0, // tag for string date
    0x6a, '1','9','8','5','-','0','4','-','1','2', // Date string
-   
+
    0xc1, // tag for epoch date
    0x1a, 0x53, 0x72, 0x4E, 0x00, // Epoch date 1400000000; Tue, 13 May 2014 16:53:20 GMT
 
@@ -1472,10 +1472,10 @@
 
    0xc1, // tag for epoch date
    0x1b, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, // Too large integer
-   
+
    0xc1, // tag for epoch date
    0xfa, 0x3f, 0x8c, 0xcc, 0xcd, // double with value 1.1
-   
+
    0xc1, // tag for epoch date
    0xfa, 0x7f, 0x7f, 0xff, 0xff // 3.4028234663852886e+38 too large
 
@@ -1484,11 +1484,11 @@
 
 // have to check float expected only to within an epsilon
 int CHECK_EXPECTED_DOUBLE(double val, double expected) {
-   
+
    double diff = val - expected;
-   
+
    diff = fabs(diff);
-   
+
    return diff > 0.0000001;
 }
 
@@ -1498,14 +1498,14 @@
    QCBORDecodeContext DCtx;
    QCBORItem Item;
    int nCBORError;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spDateTestInput), QCBOR_DECODE_MODE_NORMAL);
-   
+
    const uint64_t uTags[] = {15};
    QCBORTagListIn TagList = {1, uTags};
-      
+
    QCBORDecode_SetCallerConfiguredTagList(&DCtx, &TagList);
-   
+
    // String date
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return -1;
@@ -1522,7 +1522,7 @@
       Item.val.epochDate.fSecondsFraction != 0 ) {
       return -4;
    }
-   
+
    // Epoch date with extra CBOR_TAG_B64 tag that doesn't really mean anything
    // but want to be sure extra tag doesn't cause a problem
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
@@ -1533,12 +1533,12 @@
       !QCBORDecode_IsTagged(&DCtx, &Item, CBOR_TAG_B64)) {
       return -6;
    }
-   
+
    // Epoch date that is too large for our representation
    if(QCBORDecode_GetNext(&DCtx, &Item) != QCBOR_ERR_DATE_OVERFLOW) {
       return -7;
    }
-   
+
    // Epoch date in float format with fractional seconds
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return -8;
@@ -1547,12 +1547,12 @@
       CHECK_EXPECTED_DOUBLE(Item.val.epochDate.fSecondsFraction, 0.1 )) {
       return -9;
    }
-   
+
    // Epoch date float that is too large for our representation
    if(QCBORDecode_GetNext(&DCtx, &Item) != QCBOR_ERR_DATE_OVERFLOW) {
       return -10;
    }
-   
+
    // TODO: could use a few more tests with float, double, and half precsion and negative (but coverage is still pretty good)
 
    return 0;
@@ -1620,9 +1620,9 @@
 {
    QCBORDecodeContext DCtx;
    QCBORItem Item;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spOptTestInput), QCBOR_DECODE_MODE_NORMAL);
-   
+
    //-------------------------
    // This text matches the magic number tag and the fraction tag
    if(QCBORDecode_GetNext(&DCtx, &Item)) {
@@ -1632,7 +1632,7 @@
       !QCBORDecode_IsTagged(&DCtx, &Item, CBOR_TAG_CBOR_MAGIC)) {
       return -3;
    }
-   
+
    if(QCBORDecode_GetNext(&DCtx, &Item)) {
       return -4;
    }
@@ -1641,7 +1641,7 @@
       Item.val.uCount != 2) {
       return -5;
    }
-   
+
    // --------------------------------
    // This test decodes the very large tag, but it is not in
    // any list so it is ignored.
@@ -1652,14 +1652,14 @@
    if(Item.uTagBits) {
       return -7;
    }
-   
+
    // ----------------------------------
    // This test sets up a caller-config list that includes the very large tage and then matches it.
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spEncodedLargeTag), QCBOR_DECODE_MODE_NORMAL);
    const uint64_t puList[] = {0x9192939495969798, 257};
    const QCBORTagListIn TL = {2, puList};
    QCBORDecode_SetCallerConfiguredTagList(&DCtx, &TL);
-   
+
    if(QCBORDecode_GetNext(&DCtx, &Item)) {
       return -8;
    }
@@ -1670,7 +1670,7 @@
       Item.val.uCount != 0) {
       return -9;
    }
-   
+
    //------------------------
    // This test sets up a caller-configured list, and looks up something not in it
    const uint64_t puLongList[17] = {1,2,1};
@@ -1680,7 +1680,7 @@
    if(QCBORDecode_GetNext(&DCtx, &Item)) {
       return -11;
    }
-   
+
    // -----------------------
    // This tests retrievel of the full tag list
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spLotsOfTags), QCBOR_DECODE_MODE_NORMAL);
@@ -1695,7 +1695,7 @@
       puTags[3] != 0x04) {
       return -13;
    }
-   
+
    // ----------------------
    // This text if too small of an out list
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spLotsOfTags), QCBOR_DECODE_MODE_NORMAL);
@@ -1703,7 +1703,7 @@
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &OutSmall) != QCBOR_ERR_TOO_MANY_TAGS) {
       return -14;
    }
-   
+
    // ---------------
    // Parse a version of the "CSR" that has had a ton of tags randomly inserted
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spCSRWithTags), QCBOR_DECODE_MODE_NORMAL);
@@ -1711,15 +1711,15 @@
    if(n) {
       return n-2000;
    }
-   
+
    Out = (QCBORTagListOut){0,16, puTags};
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spCSRWithTags), QCBOR_DECODE_MODE_NORMAL);
-   
+
    const uint64_t puTagList[] = {773, 1, 90599561};
    const QCBORTagListIn TagList = {3, puTagList};
    QCBORDecode_SetCallerConfiguredTagList(&DCtx, &TagList);
-   
-   
+
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -100;
    }
@@ -1734,7 +1734,7 @@
       Out.uNumUsed != 3) {
       return -101;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -102;
    }
@@ -1748,7 +1748,7 @@
       Out.uNumUsed != 2) {
       return -103;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -104;
    }
@@ -1759,7 +1759,7 @@
       Out.uNumUsed != 1) {
       return -105;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -106;
    }
@@ -1772,7 +1772,7 @@
       Out.uNumUsed != 3) {
       return -105;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -107;
    }
@@ -1783,7 +1783,7 @@
       Out.uNumUsed != 1) {
       return -108;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -109;
    }
@@ -1795,7 +1795,7 @@
       Out.uNumUsed != 12) {
       return -110;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -111;
    }
@@ -1806,7 +1806,7 @@
       Out.uNumUsed != 1) {
       return -112;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -111;
    }
@@ -1828,7 +1828,7 @@
       Out.uNumUsed != 1) {
       return -114;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -115;
    }
@@ -1861,7 +1861,7 @@
       Out.uNumUsed != 1) {
       return -119;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -120;
    }
@@ -1872,7 +1872,7 @@
       Out.uNumUsed != 1) {
       return -121;
    }
-   
+
    if(QCBORDecode_GetNextWithTags(&DCtx, &Item, &Out)) {
       return -122;
    }
@@ -1883,17 +1883,17 @@
       Out.uNumUsed != 1) {
       return -123;
    }
-   
+
    if(QCBORDecode_Finish(&DCtx)) {
       return -124;
    }
-   
+
    return 0;
 }
 
 
 
-   
+
 static uint8_t spBigNumInput[] = {
  0x83,
    0xC2, 0x49, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1917,18 +1917,18 @@
    QCBORDecodeContext DCtx;
    QCBORItem Item;
    int nCBORError;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spBigNumInput), QCBOR_DECODE_MODE_NORMAL);
-   
-   
+
+
    //
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return -1;
    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -1;
    }
-   
-   // 
+
+   //
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return -1;
    if(Item.uDataType != QCBOR_TYPE_POSBIGNUM ||
@@ -1943,14 +1943,14 @@
       UsefulBuf_Compare(Item.val.bigNum, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spBigNum))){
       return -1;
    }
-   
+
    //
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return -1;
    if(Item.uDataType != QCBOR_TYPE_MAP) {
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return -1;
    if(Item.uDataType != QCBOR_TYPE_POSBIGNUM ||
@@ -1967,7 +1967,7 @@
       UsefulBuf_Compare(Item.val.bigNum, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spBigNum))){
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return -1;
    if(Item.uDataType != QCBOR_TYPE_NEGBIGNUM ||
@@ -1975,7 +1975,7 @@
       UsefulBuf_Compare(Item.val.bigNum, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spBigNum))){
       return -1;
    }
-   
+
    if((nCBORError = QCBORDecode_GetNext(&DCtx, &Item)))
       return -1;
    if(Item.uDataType != QCBOR_TYPE_NEGBIGNUM ||
@@ -1984,7 +1984,7 @@
       UsefulBuf_Compare(Item.val.bigNum, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spBigNum))){
       return -1;
    }
-   
+
    return 0;
 }
 
@@ -1994,7 +1994,7 @@
 {
    QCBORItem Item;
    int nCBORError;
-   
+
    if((nCBORError = QCBORDecode_GetNext(pCtx, &Item))) return -1;
    if(Item.uDataType != uDataType) return -1;
    if(uNestingLevel > 0) {
@@ -2007,7 +2007,7 @@
    }
    if(Item.uNestingLevel != uNestingLevel) return -1;
    if(Item.uNextNestLevel != uNextNest) return -1;
-   
+
    if(pItem) {
       *pItem = Item;
    }
@@ -2019,28 +2019,28 @@
 static int CheckCSRMaps(QCBORDecodeContext *pDC)
 {
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_MAP, 0, 1, 0, NULL)) return -1;
-   
+
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_MAP, 1, 2, -23, NULL)) return -1;
-   
+
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_MAP, 2, 3, -20, NULL)) return -1;
-   
+
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_TEXT_STRING, 3, 3, -18, NULL)) return -1;
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_TEXT_STRING, 3, 3, -17, NULL)) return -1;
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_TEXT_STRING, 3, 3, -15, NULL)) return -1;
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_TEXT_STRING, 3, 3, -16, NULL)) return -1;
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_TEXT_STRING, 3, 2, -14, NULL)) return -1;
-   
+
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_MAP, 2, 3, -19, NULL)) return -1;
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_MAP, 3, 4, -11, NULL)) return -1;
-   
+
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_INT64, 4, 3, -9, NULL)) return -1;
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_BYTE_STRING, 3, 1, -10, NULL)) return -1;
-   
+
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_MAP, 1, 2, -22, NULL)) return -1;
    if(CheckItemWithIntLabel(pDC, QCBOR_TYPE_INT64, 2, 0, -5, NULL)) return -1;
-   
+
    if(QCBORDecode_Finish(pDC)) return -2;
-   
+
    return 0;
 }
 
@@ -2084,9 +2084,9 @@
 int NestedMapTest()
 {
    QCBORDecodeContext DCtx;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spCSRInput), QCBOR_DECODE_MODE_NORMAL);
-   
+
    return CheckCSRMaps(&DCtx);
 }
 
@@ -2095,19 +2095,19 @@
 int StringDecoderModeFailTest()
 {
    QCBORDecodeContext DCtx;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spCSRInput), QCBOR_DECODE_MODE_MAP_STRINGS_ONLY);
-   
+
    QCBORItem Item;
    QCBORError nCBORError;
-   
+
    if(QCBORDecode_GetNext(&DCtx, &Item)) {
       return -1;
    }
    if(Item.uDataType != QCBOR_TYPE_MAP) {
       return -2;
    }
-   
+
    nCBORError = QCBORDecode_GetNext(&DCtx, &Item);
    if(nCBORError != QCBOR_ERR_MAP_LABEL_TYPE) {
       return -3;
@@ -2133,9 +2133,9 @@
 int NestedMapTestIndefLen()
 {
    QCBORDecodeContext DCtx;
-   
+
    QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spCSRInputIndefLen), QCBOR_DECODE_MODE_NORMAL);
-   
+
    return CheckCSRMaps(&DCtx);
 }
 
@@ -2145,7 +2145,7 @@
 {
    UsefulOutBuf UOB;
    UsefulOutBuf_Init(&UOB, Storage);
-   
+
    int i;
    for(i = 0; i < n; i++) {
       UsefulOutBuf_AppendByte(&UOB, 0x9f);
@@ -2162,7 +2162,7 @@
 {
    QCBORDecodeContext DC;
    QCBORDecode_Init(&DC, Nested, 0);
-   
+
    int j;
    for(j = 0; j < nNestLevel; j++) {
       QCBORItem Item;
@@ -2196,7 +2196,7 @@
 {
    UsefulBuf_MAKE_STACK_UB(Storage, 50);
    int i;
-   for(i=1; i < QCBOR_MAX_ARRAY_NESTING+4; i++) { 
+   for(i=1; i < QCBOR_MAX_ARRAY_NESTING+4; i++) {
       const UsefulBufC Nested = make_nested_indefinite_arrays(i, Storage);
       int nReturn = parse_indeflen_nested(Nested, i);
       if(nReturn) {
@@ -2220,15 +2220,15 @@
    int nResult;
    // --- first test -----
     UsefulBufC IndefLen = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteArray);
-   
+
     // Decode it and see if it is OK
     UsefulBuf_MAKE_STACK_UB(MemPool, 150);
     QCBORDecodeContext DC;
     QCBORItem Item;
     QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-    
+
     QCBORDecode_SetMemPool(&DC, MemPool, false);
-        
+
     QCBORDecode_GetNext(&DC, &Item);
 
     if(Item.uDataType != QCBOR_TYPE_ARRAY ||
@@ -2236,64 +2236,64 @@
        Item.uNextNestLevel != 1) {
        return -111;
     }
-    
+
     QCBORDecode_GetNext(&DC, &Item);
     if(Item.uDataType != QCBOR_TYPE_INT64 ||
        Item.uNestingLevel != 1 ||
        Item.uNextNestLevel != 1) {
         return -2;
     }
-    
+
     QCBORDecode_GetNext(&DC, &Item);
     if(Item.uDataType != QCBOR_TYPE_ARRAY ||
        Item.uNestingLevel != 1 ||
        Item.uNextNestLevel != 2) {
         return -3;
     }
-    
+
     QCBORDecode_GetNext(&DC, &Item);
     if(Item.uDataType != QCBOR_TYPE_INT64 ||
        Item.uNestingLevel != 2 ||
        Item.uNextNestLevel != 2) {
         return -4;
     }
-    
+
     QCBORDecode_GetNext(&DC, &Item);
     if(Item.uDataType != QCBOR_TYPE_INT64 ||
        Item.uNestingLevel != 2 ||
        Item.uNextNestLevel != 0) {
         return -5;
     }
-    
+
     if(QCBORDecode_Finish(&DC)) {
         return -6;
     }
-   
+
    // --- next test -----
    IndefLen = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteArrayBad1);
-   
+
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORDecode_SetMemPool(&DC, MemPool, false);
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -7;
    }
-   
+
    nResult = QCBORDecode_Finish(&DC);
    if(nResult != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
       return -8;
    }
 
-   
+
    // --- next test -----
    IndefLen = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteArrayBad2);
-   
+
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORDecode_SetMemPool(&DC, MemPool, false);
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -9;
@@ -2303,75 +2303,75 @@
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -10;
    }
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_INT64) {
       return -11;
    }
-   
+
    nResult = QCBORDecode_Finish(&DC);
    if(nResult != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
       return -12;
    }
-   
-   
+
+
    // --- next test -----
    IndefLen = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteArrayBad3);
-   
+
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORDecode_SetMemPool(&DC, MemPool, false);
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -13;
    }
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult != QCBOR_ERR_BAD_BREAK) {
       return -14;
    }
 
-   
+
    // --- next test -----
    IndefLen = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteArrayBad4);
-   
+
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORDecode_SetMemPool(&DC, MemPool, false);
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -15;
    }
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -16;
    }
-   
+
    nResult = QCBORDecode_Finish(&DC);
    if(nResult != QCBOR_ERR_ARRAY_OR_MAP_STILL_OPEN) {
       return -17;
    }
-   
+
    // --- next test -----
    IndefLen = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteArrayBad5);
-   
+
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORDecode_SetMemPool(&DC, MemPool, false);
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult || Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -18;
    }
-   
+
    nResult = QCBORDecode_GetNext(&DC, &Item);
    if(nResult != QCBOR_ERR_BAD_BREAK) {
       return -19;
    }
-   
+
     return 0;
 }
 
@@ -2419,11 +2419,11 @@
 static UsefulBufC MakeIndefiniteBigBstr(UsefulBuf Storage)
 {
    UsefulOutBuf UOB;
-   
+
    UsefulOutBuf_Init(&UOB, Storage);
    UsefulOutBuf_AppendByte(&UOB, 0x81);
    UsefulOutBuf_AppendByte(&UOB, 0x5f);
-   
+
    int i = 0;
    for(int nChunkSize = 1; nChunkSize <= 128; nChunkSize *= 2) {
       UsefulOutBuf_AppendByte(&UOB, 0x58);
@@ -2443,7 +2443,7 @@
    if(BigString.len != 255) {
       return 1;
    }
-   
+
    for(uint8_t i = 0; i < 255; i++){
       if(((const uint8_t *)BigString.ptr)[i] != i) {
          return 1;
@@ -2459,22 +2459,22 @@
    QCBORItem Item;
    // big enough for MakeIndefiniteBigBstr() + MemPool overhead
    UsefulBuf_MAKE_STACK_UB(MemPool, 320);
-   
+
    // --- Simple normal indefinite length string ------
    UsefulBufC IndefLen = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteLenString);
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-    
+
    if(QCBORDecode_SetMemPool(&DC, MemPool, false)) {
       return -1;
    }
-    
+
    if(QCBORDecode_GetNext(&DC, &Item)) {
       return -2;
    }
    if(Item.uDataType != QCBOR_TYPE_ARRAY || Item.uDataAlloc) {
       return -3;
    }
-    
+
    if(QCBORDecode_GetNext(&DC, &Item)) {
       return -4;
    }
@@ -2487,70 +2487,70 @@
 
    // ----- types mismatch ---
    QCBORDecode_Init(&DC, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteLenStringBad2), QCBOR_DECODE_MODE_NORMAL);
-   
+
    if(QCBORDecode_SetMemPool(&DC,  MemPool, false)) {
       return -7;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item)) {
       return -8;
    }
    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -9;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item) != QCBOR_ERR_INDEFINITE_STRING_CHUNK) {
       return -10;
    }
 
    // ----- not a string ---
    QCBORDecode_Init(&DC, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteLenStringBad3), QCBOR_DECODE_MODE_NORMAL);
-   
+
    if(QCBORDecode_SetMemPool(&DC,  MemPool, false)) {
       return -11;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item)) {
       return -12;
    }
    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -13;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item) != QCBOR_ERR_INDEFINITE_STRING_CHUNK) {
       return -14;
    }
 
    // ----- no end -----
    QCBORDecode_Init(&DC, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteLenStringBad4), QCBOR_DECODE_MODE_NORMAL);
-   
+
    if(QCBORDecode_SetMemPool(&DC,  MemPool, false)) {
       return -15;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item)) {
       return -16;
    }
    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -17;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item) != QCBOR_ERR_HIT_END) {
       return -18;
    }
-   
+
    // ------ Don't set a string allocator and see an error -----
    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -19;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item) != QCBOR_ERR_NO_STRING_ALLOCATOR) {
       return -20;
    }
-   
+
    // ----- Mempool is way too small -----
    UsefulBuf_MAKE_STACK_UB(MemPoolTooSmall, 20); // 20 is too small no matter what
 
@@ -2558,18 +2558,18 @@
    if(!QCBORDecode_SetMemPool(&DC,  MemPoolTooSmall, false)) {
       return -21;
    }
-   
+
    // ----- Mempool is way too small -----
    UsefulBuf_MAKE_STACK_UB(BigIndefBStrStorage, 290);
    const UsefulBufC BigIndefBStr = MakeIndefiniteBigBstr(BigIndefBStrStorage);
-   
+
    UsefulBuf_MAKE_STACK_UB(MemPoolSmall, 80); // 80 is big enough for MemPool overhead, but not BigIndefBStr
-   
+
    QCBORDecode_Init(&DC, BigIndefBStr, QCBOR_DECODE_MODE_NORMAL);
    if(QCBORDecode_SetMemPool(&DC,  MemPoolSmall, false)) {
       return -22;
    }
-   
+
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -23;
@@ -2577,21 +2577,21 @@
    if(QCBORDecode_GetNext(&DC, &Item) != QCBOR_ERR_STRING_ALLOCATE) {
       return -24;
    }
-   
+
    // ---- big bstr -----
    QCBORDecode_Init(&DC, BigIndefBStr, QCBOR_DECODE_MODE_NORMAL);
-   
+
    if(QCBORDecode_SetMemPool(&DC,  MemPool, false)) {
       return -25;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item)) {
       return -26;
    }
    if(Item.uDataType != QCBOR_TYPE_ARRAY || Item.uDataAlloc) {
       return -26;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item)) {
       return -27;
    }
@@ -2604,19 +2604,19 @@
    if(QCBORDecode_Finish(&DC)) {
       return -29;
    }
-   
+
    // --- label is an indefinite length string ------
    QCBORDecode_Init(&DC, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spIndefiniteLenStringLabel), QCBOR_DECODE_MODE_NORMAL);
-   
+
    if(QCBORDecode_SetMemPool(&DC,  MemPool, false)) {
       return -30;
    }
-   
+
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_MAP) {
       return -31;
    }
-   
+
    if(QCBORDecode_GetNext(&DC, &Item)){
       return -32;
    }
@@ -2625,11 +2625,11 @@
       UsefulBuf_Compare(Item.label.string, UsefulBuf_FromSZ("struuming"))) {
       return -33;
    }
-   
+
    if(QCBORDecode_Finish(&DC)) {
       return -34;
    }
-   
+
     return 0;
 }
 
@@ -2637,25 +2637,25 @@
 int AllocAllStringsTest()
 {
    QCBORDecodeContext DC;
-   
+
    // First test, use the "CSRMap" as easy input and checking
    QCBORDecode_Init(&DC, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spCSRInput), QCBOR_DECODE_MODE_NORMAL);
-   
+
    UsefulBuf_MAKE_STACK_UB(Pool, 300);
-   
+
    QCBORDecode_SetMemPool(&DC, Pool, 1); // Turn on copying.
-   
+
    if(CheckCSRMaps(&DC)) {
       return -1;
    }
-   
+
    // Next parse, save pointers to a few strings, destroy original and see all is OK.
    UsefulBuf_MAKE_STACK_UB(CopyOfStorage, 160);
    const UsefulBufC CopyOf = UsefulBuf_Copy(CopyOfStorage, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pValidMapEncoded));
 
    QCBORDecode_Init(&DC, CopyOf, QCBOR_DECODE_MODE_NORMAL);
    QCBORDecode_SetMemPool(&DC, Pool, 1); // Turn on copying.
-   
+
    int nCBORError;
    QCBORItem Item1, Item2, Item3, Item4;
    if((nCBORError = QCBORDecode_GetNext(&DC, &Item1)))
@@ -2671,33 +2671,33 @@
       return nCBORError;
    if((nCBORError = QCBORDecode_GetNext(&DC, &Item4)))
       return nCBORError;
-   
+
    UsefulBuf_Set(CopyOfStorage, '_');
-   
+
    if(Item1.uLabelType != QCBOR_TYPE_TEXT_STRING ||
       Item1.uDataType != QCBOR_TYPE_INT64 ||
       Item1.val.int64 != 42 ||
       UsefulBuf_Compare(Item1.label.string, UsefulBuf_FromSZ("first integer"))) {
       return -1;
    }
-   
+
 
    if(Item2.uLabelType != QCBOR_TYPE_TEXT_STRING ||
       UsefulBuf_Compare(Item2.label.string, UsefulBuf_FromSZ("an array of two strings")) ||
       Item2.uDataType != QCBOR_TYPE_ARRAY ||
       Item2.val.uCount != 2)
       return -1;
-   
+
    if(Item3.uDataType != QCBOR_TYPE_TEXT_STRING ||
       UsefulBuf_Compare(Item3.val.string, UsefulBuf_FromSZ("string1"))) {
       return -1;
    }
-   
+
    if(Item4.uDataType != QCBOR_TYPE_TEXT_STRING ||
       UsefulBuf_Compare(Item4.val.string, UsefulBuf_FromSZ("string2"))) {
       return -1;
    }
-   
+
    // Next parse with a pool that is too small
    UsefulBuf_MAKE_STACK_UB(SmallPool, 80);
    QCBORDecode_Init(&DC, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pValidMapEncoded), QCBOR_DECODE_MODE_NORMAL);
@@ -2732,15 +2732,15 @@
    QCBORDecodeContext DC;
    const uint8_t pMinimalCBOR[] = {0xa0}; // One empty map
    QCBORDecode_Init(&DC, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(pMinimalCBOR),0);
-   
+
    // Set up an memory pool of 100 bytes
    UsefulBuf_MAKE_STACK_UB(Pool, 100);
    QCBORDecode_SetMemPool(&DC, Pool, 0);
-    
+
    // Cheat a little to get to the string allocator object
    // so we can call it directly to test it
    QCBORStringAllocator *pAlloc = (QCBORStringAllocator *)DC.pStringAllocator;
-   // Cheat some more to know exactly the 
+   // Cheat some more to know exactly the
    size_t uAvailPool = MemPoolTestHook_GetPoolSize(pAlloc);
 
    // First test -- ask for too much in one go
@@ -2748,21 +2748,21 @@
    if(!UsefulBuf_IsNULL(Allocated)) {
       return -1;
    }
-   
-   
+
+
    // Re do the set up for the next test that will do a successful alloc,
    // a fail, a free and then success
    // This test should work on 32 and 64-bit machines if the compiler
    // does the expected thing with pointer sizes for the internal
    // MemPool implementation leaving 44 or 72 bytes of pool memory.
    QCBORDecode_SetMemPool(&DC, Pool, 0);
-    
+
    // Cheat a little to get to the string allocator object
    // so we can call it directly to test it
    pAlloc = (QCBORStringAllocator *)DC.pStringAllocator;
    // Cheat some more to know exactly the
    uAvailPool = MemPoolTestHook_GetPoolSize(pAlloc);
-    
+
    Allocated = (*pAlloc->fAllocate)(pAlloc->pAllocaterContext, NULL, uAvailPool-1);
    if(UsefulBuf_IsNULL(Allocated)) { // expected to succeed
       return -2;
@@ -2776,12 +2776,12 @@
    if(UsefulBuf_IsNULL(Allocated)) { // succeed because of the free
       return -4;
    }
-    
-   
+
+
    // Re do set up for next test that involves a successful alloc,
    // and a successful realloc and a failed realloc
    QCBORDecode_SetMemPool(&DC, Pool, 0);
-    
+
    // Cheat a little to get to the string allocator object
    // so we can call it directly to test it
    pAlloc = (QCBORStringAllocator *)DC.pStringAllocator;
@@ -2800,7 +2800,7 @@
    if(!UsefulBuf_IsNULL(Allocated3)) { // expected to fail
       return -8;
    }
-    
+
    return 0;
 }
 
diff --git a/test/qcbor_decode_tests.h b/test/qcbor_decode_tests.h
index 398a8af..8a91929 100644
--- a/test/qcbor_decode_tests.h
+++ b/test/qcbor_decode_tests.h
@@ -2,7 +2,7 @@
  Copyright (c) 2016-2018, The Linux Foundation.
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -16,7 +16,7 @@
       contributors, nor the name "Laurence Lundblade" may be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -36,16 +36,16 @@
 #include "qcbor.h"
 
 
-/* 
+/*
  Notes:
- 
+
  - All the functions in qcbor.h are called once in the aggregation of all the tests below.
- 
+
  - All the types that are supported are given as input and parsed by these tests
- 
+
  - There is some hostile input such as invalid lengths and CBOR too complex
    and types this parser doesn't handle
- 
+
  */
 
 
@@ -90,7 +90,7 @@
 int UnsupportedCBORDecodeTest(void);
 
 
-/* 
+/*
   This takes the encoded CBOR integers used in the above test and parses
   it over and over with one more byte less each time. It should fail
   every time on incorrect CBOR input. This is a hostile input decode test.
@@ -98,7 +98,7 @@
 int ShortBufferParseTest(void);
 
 
-/* 
+/*
    Same as ShortBufferParseTest, but with a different encoded CBOR input.
    It is another hostile input test
  */
@@ -121,7 +121,7 @@
 
 
 /*
- 
+
  */
 int ParseMapAsArrayTest(void);
 
diff --git a/test/qcbor_decode_tests.o b/test/qcbor_decode_tests.o
new file mode 100644
index 0000000..c18a6c5
--- /dev/null
+++ b/test/qcbor_decode_tests.o
Binary files differ
diff --git a/test/qcbor_encode_tests.c b/test/qcbor_encode_tests.c
index 97cee3d..8553dbe 100644
--- a/test/qcbor_encode_tests.c
+++ b/test/qcbor_encode_tests.c
@@ -2,7 +2,7 @@
  Copyright (c) 2016-2018, The Linux Foundation.
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -16,7 +16,7 @@
       contributors, nor the name "Laurence Lundblade" may be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -36,15 +36,15 @@
 
 /*
  This is the test set for CBOR encoding.
- 
+
  This is largely complete for the implemented.
- 
+
  A few more things to do include:
    - Add a test for counting the top level items and adding it back in with AddRaw()
    - Run on some different CPUs like 32-bit and maybe even 16-bit
    - Test the large array count limit
    - Add the CBOR diagnostic output for every expected
- 
+
  */
 
 //#define PRINT_FUNCTIONS_FOR_DEBUGGINGXX
@@ -76,7 +76,7 @@
       }
    }
    return 0;
-   
+
 }
 
 #define CheckResults(Enc, Expected) \
@@ -105,39 +105,39 @@
 {
    // Very simple CBOR, a map with one boolean that is true in it
    QCBOREncodeContext EC;
-   
+
    QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
 
    QCBOREncode_OpenMap(&EC);
    QCBOREncode_AddBoolToMapN(&EC, 66, true);
    QCBOREncode_CloseMap(&EC);
-   
+
    UsefulBufC Encoded;
    if(QCBOREncode_Finish(&EC, &Encoded)) {
       return -1;
    }
-   
-   
+
+
    // Decode it and see that is right
    QCBORDecodeContext DC;
    QCBORItem Item;
    QCBORDecode_Init(&DC, Encoded, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_MAP) {
       return -2;
    }
-   
+
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_TRUE) {
       return -3;
    }
-   
+
    if(QCBORDecode_Finish(&DC)) {
       return -4;
    }
-   
-   
+
+
    // Make another encoded message with the CBOR from the previous put into this one
    UsefulBuf_MAKE_STACK_UB(MemoryForEncoded2, 20);
    QCBOREncode_Init(&EC, MemoryForEncoded2);
@@ -148,7 +148,7 @@
    QCBOREncode_AddEncodedToMapN(&EC, -70000, Encoded);
    QCBOREncode_CloseMap(&EC);
    QCBOREncode_CloseArray(&EC);
-   
+
    UsefulBufC Encoded2;
    if(QCBOREncode_Finish(&EC, &Encoded2)) {
       return -5;
@@ -165,9 +165,9 @@
           }
         }
      ]
-     
-     
-     
+
+
+
       83                # array(3)
          19 01C3        # unsigned(451)
          A1             # map(1)
@@ -179,56 +179,56 @@
                18 42    # unsigned(66)
                F5       # primitive(21)
      */
-   
+
    // Decode it and see if it is OK
    QCBORDecode_Init(&DC, Encoded2, QCBOR_DECODE_MODE_NORMAL);
-   
+
    // 0    1:3
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_ARRAY || Item.val.uCount != 3) {
       return -6;
    }
-   
+
    // 1    1:2
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_INT64 || Item.val.uint64 != 451) {
       return -7;
    }
-   
+
    // 1    1:2   2:1
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_MAP || Item.val.uCount != 1) {
       return -8;
    }
-   
+
    // 2    1:1
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_TRUE) {
       return -9;
    }
-   
+
    // 1    1:1   2:1
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_MAP || Item.val.uCount != 1) {
       return -10;
    }
-   
+
    // 2    1:1   2:1   3:1
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_MAP || Item.val.uCount != 1 || Item.uLabelType != QCBOR_TYPE_INT64 || Item.label.int64 != -70000) {
       return -11;
    }
-   
+
    // 3    XXXXXX
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_TRUE || Item.uLabelType != QCBOR_TYPE_INT64 || Item.label.int64 != 66) {
       return -12;
    }
-   
+
    if(QCBORDecode_Finish(&DC)) {
       return -13;
    }
-   
+
    return 0;
 }
 
@@ -471,9 +471,9 @@
    // TODO: this test should be broken down into several so it is more managable. Tags and labels could be more sensible
    QCBOREncodeContext ECtx;
    int nReturn = 0;
-   
+
    QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
-   
+
    QCBOREncode_OpenArray(&ECtx);
 
    // Some ints that are tagged and have strings preceeding them (not labels becase it is not a map)
@@ -493,17 +493,17 @@
    QCBOREncode_AddInt64ToMap(&ECtx, "NEGLBLTHAT IS KIND OF LONG", -2394893489238);
    QCBOREncode_AddInt64ToMapN(&ECtx, -100000000, -800000000);
    QCBOREncode_CloseMap(&ECtx);
-   
+
    // Epoch Date
    QCBOREncode_AddDateEpoch(&ECtx, 2383748234);
-   
+
    // Epoch date with labels
    QCBOREncode_OpenMap(&ECtx);
    QCBOREncode_AddDateEpochToMap(&ECtx, "LongLiveDenisRitchie", 1400000000);
    QCBOREncode_AddDateEpochToMap(&ECtx, "time()", 1477263730);
    QCBOREncode_AddDateEpochToMapN(&ECtx, -1969, 1477263222);
    QCBOREncode_CloseMap(&ECtx);
-   
+
    // Binary blobs
    QCBOREncode_AddBytes(&ECtx, ((UsefulBufC) {(uint8_t []){0xff, 0x00}, 2}));
 
@@ -515,7 +515,7 @@
    QCBOREncode_AddBytesToMap(&ECtx, "blabel", ((UsefulBufC) {(uint8_t []){0x01, 0x02, 0x03}, 3}));
    QCBOREncode_AddBytesToMapN(&ECtx, 0, ((UsefulBufC){(uint8_t []){0x04, 0x02, 0x03, 0xfe}, 4}));
    QCBOREncode_CloseMap(&ECtx);
-   
+
    // text blobs
    QCBOREncode_AddText(&ECtx, UsefulBuf_FROM_SZ_LITERAL("bar bar foo bar"));
    QCBOREncode_AddSZString(&ECtx, "oof\n");
@@ -523,7 +523,7 @@
    QCBOREncode_AddB64Text(&ECtx, UsefulBuf_FROM_SZ_LITERAL("YW55IGNhcm5hbCBwbGVhc3VyZQ=="));
    QCBOREncode_AddRegex(&ECtx, UsefulBuf_FROM_SZ_LITERAL("[^abc]+"));
    QCBOREncode_AddMIMEData(&ECtx, UsefulBuf_FromSZ(szMIME));
-   
+
    // text blobs in maps
    QCBOREncode_OpenMap(&ECtx);
    QCBOREncode_AddTextToMap(&ECtx, "#####", UsefulBuf_FROM_SZ_LITERAL("foo bar foo foo"));
@@ -550,7 +550,7 @@
    QCBOREncode_AddDateStringToMap(&ECtx, "Bed time", "2003-12-13T18:30:02.25+01:00");
    QCBOREncode_AddDateStringToMapN(&ECtx, 88, "2003-12-13T18:30:02.25+01:00");
    QCBOREncode_CloseMap(&ECtx);
-   
+
    // true / false ...
    QCBOREncode_AddSimple(&ECtx, CBOR_SIMPLEV_UNDEF);
    QCBOREncode_OpenMap(&ECtx);
@@ -560,7 +560,7 @@
    QCBOREncode_AddBoolToMap(&ECtx, "uu", false);
    QCBOREncode_AddSimpleToMapN(&ECtx, 737634, CBOR_SIMPLEV_NULL);
    QCBOREncode_CloseMap(&ECtx);
-   
+
    // opening an array
    QCBOREncode_OpenArray(&ECtx);
    QCBOREncode_CloseArray(&ECtx);
@@ -574,9 +574,9 @@
    QCBOREncode_OpenArrayInMap(&ECtx, "alabl");
    QCBOREncode_CloseArray(&ECtx);
    QCBOREncode_OpenArrayInMapN(&ECtx, 42);
-   QCBOREncode_CloseArray(&ECtx); 
+   QCBOREncode_CloseArray(&ECtx);
    QCBOREncode_CloseMap(&ECtx);
- 
+
    // opening maps with labels and tagging
    QCBOREncode_OpenMap(&ECtx);
    QCBOREncode_OpenMapInMap(&ECtx, "in a map");
@@ -588,7 +588,7 @@
    QCBOREncode_CloseMap(&ECtx);
    QCBOREncode_CloseMap(&ECtx);
    QCBOREncode_CloseMap(&ECtx);
-   
+
 
    // Extended simple values (these are not standard...)
    QCBOREncode_OpenMap(&ECtx);
@@ -606,7 +606,7 @@
    QCBOREncode_AddTag(&ECtx, 88);
    QCBOREncode_AddSimple(&ECtx, 19);
    QCBOREncode_CloseMap(&ECtx);
-   
+
    // UUIDs
    static const uint8_t ppppUUID[] = {0x53, 0x4D, 0x41, 0x52, 0x54, 0x43, 0x53, 0x4C, 0x54, 0x54, 0x43, 0x46, 0x49, 0x43, 0x41, 0x32};
    const UsefulBufC XXUUID = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(ppppUUID);
@@ -615,7 +615,7 @@
    QCBOREncode_AddBinaryUUIDToMap(&ECtx, "UUUU", XXUUID);
    QCBOREncode_AddBinaryUUIDToMapN(&ECtx, 99, XXUUID);
    QCBOREncode_CloseMap(&ECtx);
-   
+
    // Bool
    QCBOREncode_AddBool(&ECtx, true);
    QCBOREncode_AddBool(&ECtx, false);
@@ -635,19 +635,19 @@
    QCBOREncode_AddNegativeBignumToMap(&ECtx, "BN-", BIGNUM);
    QCBOREncode_AddNegativeBignumToMapN(&ECtx, -64, BIGNUM);
    QCBOREncode_CloseMap(&ECtx);
-   
+
    QCBOREncode_CloseArray(&ECtx);
 
    UsefulBufC Enc;
-   
+
    if(QCBOREncode_Finish(&ECtx, &Enc)) {
       nReturn = -1;
       goto Done;
    }
-   
+
    if(CheckResults(Enc, spExpectedEncodedAll))
       nReturn = -2;
-   
+
 Done:
    return nReturn;
 }
@@ -729,19 +729,19 @@
    0xff, 0xff};
 
 /*
- 
+
   Test the generation of integers. This also ends up testing
   encoding of all the different lengths. It encodes integers
   of many lengths and values, especially around the boundaries
   for different types of integers.  It compares the output
   to expected values generated from http://cbor.me.
- 
+
  */
 int IntegerValuesTest1()
 {
    QCBOREncodeContext ECtx;
    int nReturn = 0;
-   
+
    QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
    QCBOREncode_OpenArray(&ECtx);
 
@@ -792,17 +792,17 @@
    QCBOREncode_AddInt64(&ECtx, 4294967297);
    QCBOREncode_AddInt64(&ECtx, 9223372036854775807LL);
    QCBOREncode_AddUInt64(&ECtx, 18446744073709551615ULL);
-   
+
    QCBOREncode_CloseArray(&ECtx);
-   
+
    UsefulBufC Enc;
    if(QCBOREncode_Finish(&ECtx, &Enc)) {
       nReturn = -1;
    }
-   
+
    if(CheckResults(Enc, spExpectedEncodedInts))
      return -2;
-   
+
    return(nReturn);
 }
 
@@ -825,7 +825,7 @@
 {
    QCBOREncodeContext ECtx;
    int nReturn = 0;
-   
+
    QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
    QCBOREncode_OpenArray(&ECtx);
 
@@ -833,22 +833,22 @@
    QCBOREncode_AddSimple(&ECtx, CBOR_SIMPLEV_FALSE);
    QCBOREncode_AddSimple(&ECtx, CBOR_SIMPLEV_NULL);
    QCBOREncode_AddSimple(&ECtx, CBOR_SIMPLEV_UNDEF);
-   
+
    QCBOREncode_OpenMap(&ECtx);
 
    QCBOREncode_AddSimpleToMap(&ECtx, "UNDef", CBOR_SIMPLEV_UNDEF);
    QCBOREncode_CloseMap(&ECtx);
 
    QCBOREncode_CloseArray(&ECtx);
-   
+
    UsefulBufC ECBOR;
    if(QCBOREncode_Finish(&ECtx, &ECBOR)) {
       nReturn = -1;
    }
-   
+
    if(CheckResults(ECBOR, spExpectedEncodedSimple))
       return -2;
-   
+
    return(nReturn);
 }
 
@@ -887,24 +887,24 @@
 {
    QCBOREncodeContext ECtx;
    int nReturn = 0;
-   
+
    QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
-   
+
    QCBOREncode_OpenArray(&ECtx);
 
-   
+
    QCBOREncode_AddDateString(&ECtx, "2013-03-21T20:04:00Z"); // from CBOR RFC
    QCBOREncode_AddDateEpoch(&ECtx, 1363896240); // from CBOR RFC
 
-   
+
    QCBOREncode_OpenMap(&ECtx);
 
    QCBOREncode_AddDateStringToMap(&ECtx, "Sample Date from RFC 3339", "1985-04-12T23:20:50.52Z");
-   
+
    QCBOREncode_AddDateEpochToMap(&ECtx, "SD", 999);
-   
+
    QCBOREncode_CloseMap(&ECtx);
-   
+
    QCBOREncode_CloseArray(&ECtx);
 
    UsefulBufC ECBOR;
@@ -912,10 +912,10 @@
    if(QCBOREncode_Finish(&ECtx, &ECBOR)) {
       nReturn = -1;
    }
-   
+
    if(CheckResults(ECBOR, spExpectedEncodedDates))
       return -2;
-   
+
    return(nReturn);
 }
 
@@ -925,7 +925,7 @@
    QCBOREncodeContext ECtx;
    int i;
    int nReturn = 0;
-   
+
    QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
    for(i = QCBOR_MAX_ARRAY_NESTING; i; i--) {
       QCBOREncode_OpenArray(&ECtx);
@@ -948,7 +948,7 @@
    QCBOREncodeContext ECtx;
    int i;
    int nReturn = 0;
-   
+
    QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
    for(i = QCBOR_MAX_ARRAY_NESTING+1; i; i--) {
       QCBOREncode_OpenArray(&ECtx);
@@ -956,12 +956,12 @@
    for(i = QCBOR_MAX_ARRAY_NESTING; i; i--) {
       QCBOREncode_CloseArray(&ECtx);
    }
-   
+
    UsefulBufC Encoded;
    if(QCBOREncode_Finish(&ECtx, &Encoded) != QCBOR_ERR_ARRAY_NESTING_TOO_DEEP) {
       nReturn = -1;
    }
-   
+
    return(nReturn);
 }
 
@@ -972,7 +972,7 @@
    QCBOREncodeContext ECtx;
    int i;
    int nReturn = 0;
-   
+
    QCBOREncode_Init(&ECtx, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
    for(i = QCBOR_MAX_ARRAY_NESTING; i; i--) {
       QCBOREncode_OpenArray(&ECtx);
@@ -984,7 +984,7 @@
    if(QCBOREncode_Finish(&ECtx, &Encoded) != QCBOR_ERR_TOO_MANY_CLOSES) {
       nReturn = -1;
    }
-   
+
    return(nReturn);
 }
 
@@ -1091,17 +1091,17 @@
    QCBOREncode_AddEncoded(&ECtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spFiveArrarys));
    QCBOREncode_AddEncoded(&ECtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spExpectedEncodedInts));
    QCBOREncode_CloseArray(&ECtx);
-   
+
    UsefulBufC EncodedRawTest;
-   
+
    if(QCBOREncode_Finish(&ECtx, &EncodedRawTest)) {
       return -4;
    }
-   
+
    if(CheckResults(EncodedRawTest, spEncodeRawExpected)) {
       return -5;
    }
-   
+
    return 0;
 }
 
@@ -1112,11 +1112,11 @@
 {
    QCBOREncodeContext ECtx;
    int nReturn = -1;
-   
+
    *pEncoded = NULL;
    *pEncodedLen = INT32_MAX;
    size_t uFirstSizeEstimate = 0;
-   
+
    // loop runs CBOR encoding twice. First with no buffer to
    // calucate the length so buffer can be allocated correctly,
    // and last with the buffer to do the actual encoding
@@ -1135,7 +1135,7 @@
       QCBOREncode_AddTextToMap(&ECtx, "text 2", ((UsefulBufC) {"lies, damn lies and statistics", 30}));
       QCBOREncode_CloseMap(&ECtx);
       QCBOREncode_CloseMap(&ECtx);
-      
+
       if(QCBOREncode_FinishGetSize(&ECtx, pEncodedLen))
          goto Done;
       if(*pEncoded != NULL) {
@@ -1148,9 +1148,9 @@
       }
       *pEncoded = spBigBuf;
       uFirstSizeEstimate = *pEncodedLen;
-      
+
    } while(1);
-   
+
  Done:
    return(nReturn);
 }
@@ -1209,38 +1209,38 @@
 {
    uint8_t *pEncodedMaps;
    size_t nEncodedMapLen;
-   
+
    if(CreateMap(&pEncodedMaps, &nEncodedMapLen)) {
       return -1;
    }
-   
+
    int nReturn = 0;
    if(memcmp(spValidMapEncoded, pEncodedMaps, sizeof(spValidMapEncoded)))
       nReturn = 2;
-   
+
    return(nReturn);
 }
 
 
 /*
  @brief  Encode the RTIC results
- 
+
  @param[in]     nRResult        CBOR_SIMPLEV_TRUE, CBOR_SIMPLEV_FALSE or CBOR_SIMPLEV_NULL
  @param[in]     time            Time stamp in UNIX epoch time or 0 for no time stamp
  @param[in]     szAlexString    Diagnostic code.
  @param[in[     pOut            Buffer to put the result in
  @param[in/out] pnLen           Size of pOut buffer when called; length of data output in buffer on return
- 
+
  @return
  One of the CBOR encoder errors. QCBOR_SUCCESS, which is has value 0, if no error.
- 
+
  The size of pOut should be 30 bytes plus the length of pnLen.  If you make it too
- short an error will be returned. This function will never write off the end 
+ short an error will be returned. This function will never write off the end
  of the buffer passed to it.
- 
+
  If the result is 0, then the correct encoded CBOR is in pOut and *pnLen is the
  length of the encoded CBOR.
- 
+
  */
 
 static UsefulBufC FormatRTICResults(int nRResult, uint64_t time, const char *szType, const char *szAlexString, UsefulBuf Storage)
@@ -1248,17 +1248,17 @@
    // Buffer that the result will be written in to
    // It is fixed size and small that a stack variable will be fine
    // QCBOREncode will never write off the end of this buffer. If it won't fit QCBOREncode_Finish will return an error.
-   
+
    // Context for the encoder
    QCBOREncodeContext ECtx;
    QCBOREncode_Init(&ECtx, Storage);
-   
+
    // All the RTIC results are grouped in a CBOR Map which will get turned into a JSON Object
    // Contents are label / value pairs
    QCBOREncode_OpenMap(&ECtx);
-   
+
    { // Brace / indention just to show CBOR encoding nesting
-      
+
       // The result: 0 if scan happened and found nothing; 1 if it happened and found something wrong; 2 if it didn't happen
       QCBOREncode_AddSimpleToMap(&ECtx, "integrity", nRResult);
 
@@ -1277,7 +1277,7 @@
       QCBOREncode_OpenMapInMap(&ECtx, "telemetry");
 
       { // Brace / indention just to show CBOR encoding nesting
-         
+
          // Add a few fake integers and buffers for now.
          QCBOREncode_AddInt64ToMap(&ECtx, "Shoe Size", 12);
 
@@ -1287,21 +1287,21 @@
          // Add a few fake integers and buffers for now.
          static const uint8_t pPV[] = {0x66, 0x67, 0x00, 0x56, 0xaa, 0xbb, 0x01, 0x01};
          const UsefulBufC WSPV = {pPV, sizeof(pPV)};
-            
+
          QCBOREncode_AddBytesToMap(&ECtx, "WhaleSharkPatternVector", WSPV);
       }
    }
-   
+
    // Close the telemetry map
    QCBOREncode_CloseMap(&ECtx);
-   
+
    // Close the map
    QCBOREncode_CloseMap(&ECtx);
-   
+
    UsefulBufC Result;
-   
+
    QCBOREncode_Finish(&ECtx, &Result);
-   
+
    return Result;
 }
 
@@ -1360,12 +1360,12 @@
    if(UsefulBuf_IsNULLC(Encoded)) {
       return -1;
    }
-   
+
    if(CheckResults(Encoded, spExpectedRTIC)) {
       return -2;
    }
-   
-   return 0;  
+
+   return 0;
 }
 
 
@@ -1383,29 +1383,29 @@
 int BstrWrapTest()
 {
    QCBOREncodeContext EC;
-   
+
    QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
-   
+
    QCBOREncode_OpenArray(&EC);
    QCBOREncode_AddUInt64(&EC, 451);
-   
+
    QCBOREncode_BstrWrap(&EC);
    QCBOREncode_AddUInt64(&EC, 466);
-   
+
    UsefulBufC Wrapped;
    QCBOREncode_CloseBstrWrap(&EC, &Wrapped);
-   
+
    QCBOREncode_CloseArray(&EC);
-   
+
    UsefulBufC Encoded;
    if(QCBOREncode_Finish(&EC, &Encoded)) {
       return -1;
    }
-   
+
    if(CheckResults(Encoded, spExpectedBstrWrap)) {
       return -2;
    }
-   
+
    return 0;
 }
 
@@ -1415,48 +1415,48 @@
 {
    // -------------- Test closing a bstrwrap when it is an array that is open -----------
    QCBOREncodeContext EC;
-   
+
    QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
-   
+
    QCBOREncode_OpenArray(&EC);
    QCBOREncode_AddUInt64(&EC, 451);
-   
+
    QCBOREncode_BstrWrap(&EC);
    QCBOREncode_AddUInt64(&EC, 466);
    QCBOREncode_OpenArray(&EC);
-   
+
    UsefulBufC Wrapped;
    QCBOREncode_CloseBstrWrap(&EC, &Wrapped);
-   
+
    QCBOREncode_CloseArray(&EC);
-   
+
    UsefulBufC Encoded2;
    if(QCBOREncode_Finish(&EC, &Encoded2) != QCBOR_ERR_CLOSE_MISMATCH) {
       return -1;
    }
-   
+
    // ----------- test closing a bstrwrap when nothing is open ---------------------
    QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
    QCBOREncode_CloseBstrWrap(&EC, &Wrapped);
    if(QCBOREncode_Finish(&EC, &Encoded2) != QCBOR_ERR_TOO_MANY_CLOSES) {
       return -2;
    }
-   
+
    // --------------- test nesting too deep ----------------------------------
    QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
    for(int i = 1; i < 18; i++) {
       QCBOREncode_BstrWrap(&EC);
    }
    QCBOREncode_AddBool(&EC, true);
-   
+
    for(int i = 1; i < 18; i++) {
       QCBOREncode_CloseBstrWrap(&EC, &Wrapped);
    }
-   
+
    if(QCBOREncode_Finish(&EC, &Encoded2) != QCBOR_ERR_ARRAY_NESTING_TOO_DEEP) {
       return -3;
    }
-   
+
    return 0;
 }
 
@@ -1502,8 +1502,8 @@
  18 31 integer value 31
  18 41 integer label 41
  65 68 65 6C 6C 6F text string hello
- 
- 
+
+
  */
 
 
@@ -1538,7 +1538,7 @@
    int nReturn;
    QCBORDecodeContext DC;
    QCBORDecode_Init(&DC, Wrapped, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORItem Item;
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
@@ -1547,7 +1547,7 @@
    if(Item.uDataType != QCBOR_TYPE_INT64) {
       return -12;
    }
-   
+
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn == QCBOR_ERR_HIT_END) {
       return 0;
@@ -1559,7 +1559,7 @@
    if(nReturn) {
       return nReturn;
    }
-   
+
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
       return -14;
@@ -1567,11 +1567,11 @@
    if(Item.uDataType != QCBOR_TYPE_INT64) {
       return -15;
    }
-   
+
    if(QCBORDecode_Finish(&DC)) {
       return -16;
    }
-   
+
    return 0;
 }
 
@@ -1581,7 +1581,7 @@
    int nReturn;
    QCBORDecodeContext DC;
    QCBORDecode_Init(&DC, Wrapped, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORItem Item;
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
@@ -1590,7 +1590,7 @@
    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
       return -12;
    }
-   
+
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
       return -11;
@@ -1598,7 +1598,7 @@
    if(Item.uDataType != QCBOR_TYPE_INT64) {
       return -12;
    }
-   
+
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
       return -11;
@@ -1606,7 +1606,7 @@
    if(Item.uDataType != QCBOR_TYPE_MAP) {
       return 0;
    }
-   
+
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
       return -11;
@@ -1618,7 +1618,7 @@
    if(nReturn) {
       return nReturn;
    }
-   
+
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
       return -11;
@@ -1633,11 +1633,11 @@
    if(Item.uDataType != QCBOR_TYPE_INT64) {
       return -12;
    }
-   
+
    if(QCBORDecode_Finish(&DC)) {
       return -16;
    }
-   
+
    return 0;
 }
 
@@ -1646,29 +1646,29 @@
 {
    QCBOREncodeContext EC;
    QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
-   
+
    // ---- Make a complicated nested CBOR structure ---
 #define BSTR_TEST_DEPTH 10
-   
+
    QCBOREncode_OpenArray(&EC);
 
    for(int i = 0; i < BSTR_TEST_DEPTH-2; i++) {
       QCBOREncode_BstrWrap(&EC);
       QCBOREncode_AddUInt64(&EC, i);
    }
-   
+
    for(int i = 0; i < BSTR_TEST_DEPTH-2; i++) {
       QCBOREncode_CloseBstrWrap(&EC, NULL);
       QCBOREncode_AddUInt64(&EC, i);
    }
-   
+
    for(int i = 0; i < (BSTR_TEST_DEPTH-2)/3; i++) {
       QCBOREncode_OpenMap(&EC);
       QCBOREncode_BstrWrapInMapN(&EC, i+0x20);
       QCBOREncode_OpenArray(&EC);
       QCBOREncode_AddUInt64(&EC, i+0x10);
    }
-   
+
    for(int i = 0; i < (BSTR_TEST_DEPTH-2)/3; i++) {
       QCBOREncode_CloseArray(&EC);
       QCBOREncode_AddUInt64(&EC, i+0x30);
@@ -1677,38 +1677,38 @@
       QCBOREncode_CloseMap(&EC);
    }
    QCBOREncode_CloseArray(&EC);
-   
+
    UsefulBufC Encoded;
    if(QCBOREncode_Finish(&EC, &Encoded)) {
       return -1;
    }
-   
+
    // ---Compare it to expected. Expected was hand checked with use of CBOR playground ----
    if(UsefulBuf_Compare(UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spExpectedDeepBstr), Encoded)) {
       return -25;
    }
-   
-   
+
+
    // ---- Decode it and see if it is OK ------
    QCBORDecodeContext DC;
    QCBORDecode_Init(&DC, Encoded, QCBOR_DECODE_MODE_NORMAL);
-   
+
    QCBORItem Item;
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_ARRAY || Item.val.uCount != 3) {
       return -2;
    }
-   
+
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_BYTE_STRING) {
       return -3;
    }
-   
+
    int nReturn = DecodeNextNested(Item.val.string);
    if(nReturn) {
       return nReturn;
    }
-   
+
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
       return -11;
@@ -1716,12 +1716,12 @@
    if(Item.uDataType != QCBOR_TYPE_INT64) {
       return -12;
    }
-   
+
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_MAP || Item.val.uCount != 2) {
       return -2;
    }
-   
+
    QCBORDecode_GetNext(&DC, &Item);
    if(Item.uDataType != QCBOR_TYPE_BYTE_STRING) {
       return -3;
@@ -1730,7 +1730,7 @@
    if(nReturn) {
       return nReturn;
    }
-   
+
    nReturn = QCBORDecode_GetNext(&DC, &Item);
    if(nReturn) {
       return -11;
@@ -1738,11 +1738,11 @@
    if(Item.uDataType != QCBOR_TYPE_TEXT_STRING) {
       return -12;
    }
-   
+
    if(QCBORDecode_Finish(&DC)) {
       return -16;
    }
-   
+
    return 0;
 }
 
@@ -1803,52 +1803,52 @@
    // a COSE implementation like COSE-C. It has been checked
    // against the CBOR playground.
    const UsefulBufC Signature = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spSignature);
-   
+
    QCBOREncodeContext EC;
    QCBOREncode_Init(&EC, UsefulBuf_FROM_BYTE_ARRAY(spBigBuf));
-   
+
    // top level array for cose sign1, 18 is the tag for COSE sign
    QCBOREncode_AddTag(&EC, CBOR_TAG_COSE_SIGN1);
    QCBOREncode_OpenArray(&EC);
-   
+
    // Add protected headers
    QCBOREncode_AddBytes(&EC, ProtectedHeaders);
-   
+
    // Empty map with unprotected headers
    QCBOREncode_OpenMap(&EC);
    QCBOREncode_AddBytesToMapN(&EC, 4, Kid);
    QCBOREncode_CloseMap(&EC);
-   
+
    // The payload
    UsefulBufC WrappedPayload;
    QCBOREncode_BstrWrap(&EC);
    QCBOREncode_AddEncoded(&EC, Payload); // Payload is not actually CBOR in example C.2.1
    QCBOREncode_CloseBstrWrap(&EC, &WrappedPayload);
-   
+
    // Check we got back the actual payload expected
    if(UsefulBuf_Compare(WrappedPayload, Payload)) {
       return -1;
    }
-   
+
    // The signature
    QCBOREncode_AddBytes(&EC, Signature);
    QCBOREncode_CloseArray(&EC);
-   
+
    // Finish and check the results
    UsefulBufC COSE_Sign1;
    if(QCBOREncode_Finish(&EC, &COSE_Sign1)) {
       return -2;
    }
-   
+
    // 98 is the size from RFC 8152 C.2.1
    if(COSE_Sign1.len != 98) {
       return -3;
    }
-   
+
    if(CheckResults(COSE_Sign1, spExpected)) {
       return -4;
    }
-   
+
    return 0;
 }
 
diff --git a/test/qcbor_encode_tests.h b/test/qcbor_encode_tests.h
index 5575e10..ed2fa75 100644
--- a/test/qcbor_encode_tests.h
+++ b/test/qcbor_encode_tests.h
@@ -2,7 +2,7 @@
  Copyright (c) 2016-2018, The Linux Foundation.
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -16,7 +16,7 @@
       contributors, nor the name "Laurence Lundblade" may be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -36,16 +36,16 @@
 #include "qcbor.h"
 
 
-/* 
+/*
  Notes:
- 
+
  - All the functions in qcbor.h are called once in the aggregation of all the tests below.
- 
+
  - All the types that are supported are given as input and parsed by these tests
- 
+
  - There is some hostile input such as invalid lengths and CBOR too complex
    and types this parser doesn't handle
- 
+
  */
 
 
diff --git a/test/qcbor_encode_tests.o b/test/qcbor_encode_tests.o
new file mode 100644
index 0000000..8bd84fe
--- /dev/null
+++ b/test/qcbor_encode_tests.o
Binary files differ
diff --git a/test/run_tests.c b/test/run_tests.c
index dea81d7..2b0288f 100644
--- a/test/run_tests.c
+++ b/test/run_tests.c
@@ -1,10 +1,10 @@
 
 /*==============================================================================
  run_tests.c -- test aggregator and results reporting
- 
+
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -17,7 +17,7 @@
     * The name "Laurence Lundblade" may not be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
@@ -57,10 +57,10 @@
 const char *NumToString(int32_t nNum, UsefulBuf StringMem)
 {
     const int32_t nMax = 1000000000;
-    
+
     UsefulOutBuf OutBuf;
     UsefulOutBuf_Init(&OutBuf, StringMem);
-    
+
     if(nNum < 0) {
         UsefulOutBuf_AppendByte(&OutBuf, '-');
         nNum = -nNum;
@@ -68,7 +68,7 @@
     if(nNum > nMax-1) {
         return "XXX";
     }
-    
+
     bool bDidSomeOutput = false;
     for(int n = nMax; n > 0; n/=10) {
         int x = nNum/n;
@@ -82,7 +82,7 @@
         UsefulOutBuf_AppendByte(&OutBuf, '0');
     }
     UsefulOutBuf_AppendByte(&OutBuf, '\0');
-    
+
     return UsefulOutBuf_GetError(&OutBuf) ? "" : StringMem.ptr;
 }
 
@@ -167,7 +167,7 @@
 
     test_entry2 *t2;
     const test_entry2 *s_tests2_end = s_tests2 + sizeof(s_tests2)/sizeof(test_entry2);
-    
+
     for(t2 = s_tests2; t2 < s_tests2_end; t2++) {
         if(szTestName && strcmp(szTestName, t2->szTestName)) {
             continue;
@@ -177,7 +177,7 @@
         if(output) {
             (*output)(t2->szTestName, poutCtx);
         }
-        
+
         if(x) {
             if(output) {
                 (*output)(" FAILED (returned ", poutCtx);
@@ -191,11 +191,11 @@
             }
         }
     }
-    
-    
+
+
     test_entry *t;
     const test_entry *s_tests_end = s_tests + sizeof(s_tests)/sizeof(test_entry);
-    
+
     for(t = s_tests; t < s_tests_end; t++) {
         if(szTestName && strcmp(szTestName, t->szTestName)) {
             continue;
@@ -205,7 +205,7 @@
         if(output) {
             (*output)(t->szTestName, poutCtx);
         }
-        
+
         if(x) {
             if(output) {
                 (*output)(" FAILED (returned ", poutCtx);
@@ -219,11 +219,11 @@
             }
         }
     }
-    
+
     if(pNumTestsRun) {
         *pNumTestsRun = nTestsRun;
     }
-    
+
     if(output) {
         (*output)( "SUMMARY: ", poutCtx);
         (*output)( NumToString(nTestsRun, StringStorage), poutCtx);
@@ -231,6 +231,6 @@
         (*output)( NumToString(nTestsFailed, StringStorage), poutCtx);
         (*output)( " tests failed\n", poutCtx);
     }
-    
+
     return nTestsFailed;
 }
diff --git a/test/run_tests.h b/test/run_tests.h
index 498554e..431ef22 100644
--- a/test/run_tests.h
+++ b/test/run_tests.h
@@ -1,10 +1,10 @@
 
 /*==============================================================================
  run_tests.c -- test aggregator and results reporting
-  
+
  Copyright (c) 2018, Laurence Lundblade.
  All rights reserved.
- 
+
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 met:
@@ -17,7 +17,7 @@
     * The name "Laurence Lundblade" may not be used to
       endorse or promote products derived from this software without
       specific prior written permission.
- 
+
 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
diff --git a/test/run_tests.o b/test/run_tests.o
new file mode 100644
index 0000000..8aac1ed
--- /dev/null
+++ b/test/run_tests.o
Binary files differ