fold basic and indefinite length tests in with the others; fix up Makefile
diff --git a/test/basic_test.c b/test/basic_test.c
deleted file mode 100644
index 645cce6..0000000
--- a/test/basic_test.c
+++ /dev/null
@@ -1,261 +0,0 @@
-/*==============================================================================
- basic_test.c -- most basic test for QCBOR
- 
- Copyright 2018 Laurence Lundblade
- 
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
- 
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- 
- (This is the MIT license)
- ==============================================================================*/
-//  Created by Laurence Lundblade on 9/13/18.
-
-
-#include "basic_test.h"
-#include "qcbor.h"
-
-
-/*
- Some very minimal tests until the full test suite is open sourced and available.
- Return codes here don't mean much (yet).
- */
-int basic_test_one()
-{
-    // Very simple CBOR, a map with one boolean that is true in it
-    UsefulBuf_MakeStackUB(MemoryForEncoded, 100);
-    QCBOREncodeContext EC;
-    
-    QCBOREncode_Init(&EC, MemoryForEncoded);
-    
-    QCBOREncode_OpenMap(&EC);
-    QCBOREncode_AddBoolToMapN(&EC, 66, true);
-    QCBOREncode_CloseMap(&EC);
-    
-    UsefulBufC Encoded;
-    if(QCBOREncode_Finish2(&EC, &Encoded)) {
-        return -3;
-    }
-    
-    
-    // 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 -1;
-    }
-
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_TRUE) {
-        return -1;
-    }
-    
-    if(QCBORDecode_Finish(&DC)) {
-        return -2;
-    }
-    
-    
-    // Make another encoded message with the CBOR from the previous put into this one
-    UsefulBuf_MakeStackUB(MemoryForEncoded2, 100);
-    QCBOREncode_Init(&EC, MemoryForEncoded2);
-    QCBOREncode_OpenArray(&EC);
-    QCBOREncode_AddUInt64(&EC, 451);
-    QCBOREncode_AddEncoded(&EC, Encoded);
-    QCBOREncode_OpenMap(&EC);
-    QCBOREncode_AddEncodedToMapN(&EC, -70000, Encoded);
-    QCBOREncode_CloseMap(&EC);
-    QCBOREncode_CloseArray(&EC);
-    
-    UsefulBufC Encoded2;
-    if(QCBOREncode_Finish2(&EC, &Encoded2)) {
-        return -3;
-    }
-    /*
-     [                // 0    1:3
-        451,          // 1    1:2
-        {             // 1    1:2   2:1
-          66: true    // 2    1:1
-        },
-        {             // 1    1:1   2:1
-          -70000: {   // 2    1:1   2:1   3:1
-            66: true  // 3    XXXXXX
-          }
-        }
-     ]
-     
-     
-     
-      83                # array(3)
-         19 01C3        # unsigned(451)
-         A1             # map(1)
-            18 42       # unsigned(66)
-            F5          # primitive(21)
-         A1             # map(1)
-            3A 0001116F # negative(69999)
-            A1          # map(1)
-               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 -1;
-    }
-   
-    // 1    1:2
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_INT64 || Item.val.uint64 != 451) {
-        return -1;
-    }
-
-    // 1    1:2   2:1
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_MAP || Item.val.uCount != 1) {
-        return -1;
-    }
-   
-    // 2    1:1
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_TRUE) {
-        return -1;
-    }
-
-    // 1    1:1   2:1
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_MAP || Item.val.uCount != 1) {
-        return -1;
-    }
-   
-    // 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 -1;
-    }
-
-    // 3    XXXXXX
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_TRUE || Item.uLabelType != QCBOR_TYPE_INT64 || Item.label.int64 != 66) {
-        return -1;
-    }
-    
-    if(QCBORDecode_Finish(&DC)) {
-        return -2;
-    }
-   
-    return 0;
-}
-
-
-
-static const uint8_t pIndefiniteLenString[] = {
-   0x81, // Array of length one
-   0x7f, // text string marked with indefinite length
-      0x65, 0x73, 0x74, 0x72, 0x65, 0x61, // first segment
-      0x64, 0x6d, 0x69, 0x6e, 0x67, // second segment
-   0xff // ending break
-};
-
-static const uint8_t pIndefiniteArray[] = {0x9f, 0x01, 0x82, 0x02, 0x03, 0xff};
-
-// [1, [2, 3]]
-
-
-//0x9f018202039f0405ffff
-
-int indefinite_length_decode_test()
-{
-    UsefulBufC IndefLen = UsefulBuf_FromByteArrayLiteral(pIndefiniteArray);
-    
-    
-    // Decode it and see if it is OK
-   UsefulBuf_MakeStackUB(MemPool, 200);
-    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) {
-        return -1;
-    }
-
-   QCBORDecode_GetNext(&DC, &Item);
-   if(Item.uDataType != QCBOR_TYPE_INT64) {
-      return -1;
-   }
-   
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
-        return -1;
-    }
-    
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_INT64) {
-        return -1;
-    }
-    
-    QCBORDecode_GetNext(&DC, &Item);
-    if(Item.uDataType != QCBOR_TYPE_INT64) {
-        return -1;
-    }
-   
-   if(QCBORDecode_Finish(&DC)) {
-      return -2;
-   }
-    
-    return 0;
-}
-
-int indefinite_length_decode_string_test() {
-   UsefulBufC IndefLen = UsefulBuf_FromByteArrayLiteral(pIndefiniteLenString);
-   
-   
-   // Decode it and see if it is OK
-   QCBORDecodeContext DC;
-   QCBORItem Item;
-   UsefulBuf_MakeStackUB(MemPool, 200);
-
-   QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
-   
-   QCBORDecode_SetMemPool(&DC,  MemPool, false);
-
-   
-   QCBORDecode_GetNext(&DC, &Item);
-   if(Item.uDataType != QCBOR_TYPE_ARRAY) {
-      return -1;
-   }
-   
-   QCBORDecode_GetNext(&DC, &Item);
-   if(Item.uDataType != QCBOR_TYPE_TEXT_STRING) {
-      return -1;
-   }
-   
-   return 0;
-}
-
-
diff --git a/test/basic_test.h b/test/basic_test.h
deleted file mode 100644
index 6f3dd66..0000000
--- a/test/basic_test.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*==============================================================================
- basic_test.h -- most basic test for QCBOR
- 
- Copyright 2018 Laurence Lundblade
- 
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
- 
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
- */
-
-//  Created by Laurence Lundblade on 9/13/18.
-
-#ifndef basic_test_h
-#define basic_test_h
-
-int basic_test_one(void);
-
-int indefinite_length_decode_test(void);
-int indefinite_length_decode_string_test(void);
-
-#endif /* basic_test_h */
diff --git a/test/qcbor_decode_tests.c b/test/qcbor_decode_tests.c
index 41532b7..778bca9 100644
--- a/test/qcbor_decode_tests.c
+++ b/test/qcbor_decode_tests.c
@@ -1537,6 +1537,101 @@
 }
 
 
+
+
+
+
+
+static const uint8_t pIndefiniteLenString[] = {
+    0x81, // Array of length one
+    0x7f, // text string marked with indefinite length
+    0x65, 0x73, 0x74, 0x72, 0x65, 0x61, // first segment
+    0x64, 0x6d, 0x69, 0x6e, 0x67, // second segment
+    0xff // ending break
+};
+
+static const uint8_t pIndefiniteArray[] = {0x9f, 0x01, 0x82, 0x02, 0x03, 0xff};
+
+// [1, [2, 3]]
+
+
+//0x9f018202039f0405ffff
+
+int indefinite_length_decode_test()
+{
+    UsefulBufC IndefLen = UsefulBuf_FromByteArrayLiteral(pIndefiniteArray);
+    
+    
+    // Decode it and see if it is OK
+    UsefulBuf_MakeStackUB(MemPool, 200);
+    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) {
+        return -1;
+    }
+    
+    QCBORDecode_GetNext(&DC, &Item);
+    if(Item.uDataType != QCBOR_TYPE_INT64) {
+        return -1;
+    }
+    
+    QCBORDecode_GetNext(&DC, &Item);
+    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
+        return -1;
+    }
+    
+    QCBORDecode_GetNext(&DC, &Item);
+    if(Item.uDataType != QCBOR_TYPE_INT64) {
+        return -1;
+    }
+    
+    QCBORDecode_GetNext(&DC, &Item);
+    if(Item.uDataType != QCBOR_TYPE_INT64) {
+        return -1;
+    }
+    
+    if(QCBORDecode_Finish(&DC)) {
+        return -2;
+    }
+    
+    return 0;
+}
+
+int indefinite_length_decode_string_test() {
+    UsefulBufC IndefLen = UsefulBuf_FromByteArrayLiteral(pIndefiniteLenString);
+    
+    
+    // Decode it and see if it is OK
+    QCBORDecodeContext DC;
+    QCBORItem Item;
+    UsefulBuf_MakeStackUB(MemPool, 200);
+    
+    QCBORDecode_Init(&DC, IndefLen, QCBOR_DECODE_MODE_NORMAL);
+    
+    QCBORDecode_SetMemPool(&DC,  MemPool, false);
+    
+    
+    QCBORDecode_GetNext(&DC, &Item);
+    if(Item.uDataType != QCBOR_TYPE_ARRAY) {
+        return -1;
+    }
+    
+    QCBORDecode_GetNext(&DC, &Item);
+    if(Item.uDataType != QCBOR_TYPE_TEXT_STRING) {
+        return -1;
+    }
+    
+    return 0;
+}
+
+
+
 int mempool_test(void)
 {
     QCBORDecodeContext DC;
diff --git a/test/qcbor_decode_tests.h b/test/qcbor_decode_tests.h
index e6f1b68..751da8b 100644
--- a/test/qcbor_decode_tests.h
+++ b/test/qcbor_decode_tests.h
@@ -158,6 +158,10 @@
 int NestedMapTest(void);
 
 
+int indefinite_length_decode_test(void);
+int indefinite_length_decode_string_test(void);
+
+
 int mempool_test(void);
 
 
diff --git a/test/qcbor_encode_tests.c b/test/qcbor_encode_tests.c
index 000d416..ae94a7f 100644
--- a/test/qcbor_encode_tests.c
+++ b/test/qcbor_encode_tests.c
@@ -104,6 +104,144 @@
    Compare(Enc, (UsefulBufC){Expected, sizeof(Expected)})
 
 
+
+/*
+ Some very minimal tests.
+ */
+int basic_encode_test()
+{
+   // Very simple CBOR, a map with one boolean that is true in it
+   UsefulBuf_MakeStackUB(MemoryForEncoded, 100);
+   QCBOREncodeContext EC;
+   
+   QCBOREncode_Init(&EC, MemoryForEncoded);
+   
+   QCBOREncode_OpenMap(&EC);
+   QCBOREncode_AddBoolToMapN(&EC, 66, true);
+   QCBOREncode_CloseMap(&EC);
+   
+   UsefulBufC Encoded;
+   if(QCBOREncode_Finish2(&EC, &Encoded)) {
+      return -3;
+   }
+   
+   
+   // 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 -1;
+   }
+   
+   QCBORDecode_GetNext(&DC, &Item);
+   if(Item.uDataType != QCBOR_TYPE_TRUE) {
+      return -1;
+   }
+   
+   if(QCBORDecode_Finish(&DC)) {
+      return -2;
+   }
+   
+   
+   // Make another encoded message with the CBOR from the previous put into this one
+   UsefulBuf_MakeStackUB(MemoryForEncoded2, 100);
+   QCBOREncode_Init(&EC, MemoryForEncoded2);
+   QCBOREncode_OpenArray(&EC);
+   QCBOREncode_AddUInt64(&EC, 451);
+   QCBOREncode_AddEncoded(&EC, Encoded);
+   QCBOREncode_OpenMap(&EC);
+   QCBOREncode_AddEncodedToMapN(&EC, -70000, Encoded);
+   QCBOREncode_CloseMap(&EC);
+   QCBOREncode_CloseArray(&EC);
+   
+   UsefulBufC Encoded2;
+   if(QCBOREncode_Finish2(&EC, &Encoded2)) {
+      return -3;
+   }
+    /*
+     [                // 0    1:3
+        451,          // 1    1:2
+        {             // 1    1:2   2:1
+          66: true    // 2    1:1
+        },
+        {             // 1    1:1   2:1
+          -70000: {   // 2    1:1   2:1   3:1
+            66: true  // 3    XXXXXX
+          }
+        }
+     ]
+     
+     
+     
+      83                # array(3)
+         19 01C3        # unsigned(451)
+         A1             # map(1)
+            18 42       # unsigned(66)
+            F5          # primitive(21)
+         A1             # map(1)
+            3A 0001116F # negative(69999)
+            A1          # map(1)
+               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 -1;
+   }
+   
+   // 1    1:2
+   QCBORDecode_GetNext(&DC, &Item);
+   if(Item.uDataType != QCBOR_TYPE_INT64 || Item.val.uint64 != 451) {
+      return -1;
+   }
+   
+   // 1    1:2   2:1
+   QCBORDecode_GetNext(&DC, &Item);
+   if(Item.uDataType != QCBOR_TYPE_MAP || Item.val.uCount != 1) {
+      return -1;
+   }
+   
+   // 2    1:1
+   QCBORDecode_GetNext(&DC, &Item);
+   if(Item.uDataType != QCBOR_TYPE_TRUE) {
+      return -1;
+   }
+   
+   // 1    1:1   2:1
+   QCBORDecode_GetNext(&DC, &Item);
+   if(Item.uDataType != QCBOR_TYPE_MAP || Item.val.uCount != 1) {
+      return -1;
+   }
+   
+   // 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 -1;
+   }
+   
+   // 3    XXXXXX
+   QCBORDecode_GetNext(&DC, &Item);
+   if(Item.uDataType != QCBOR_TYPE_TRUE || Item.uLabelType != QCBOR_TYPE_INT64 || Item.label.int64 != 66) {
+      return -1;
+   }
+   
+   if(QCBORDecode_Finish(&DC)) {
+      return -2;
+   }
+   
+   return 0;
+}
+
+
+
 static const uint8_t pExpectedEncodedAll[] = {
    
  0x98, 0x29, 0x66, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x32, 0xd8,
diff --git a/test/qcbor_encode_tests.h b/test/qcbor_encode_tests.h
index fae9f4b..8625fe2 100644
--- a/test/qcbor_encode_tests.h
+++ b/test/qcbor_encode_tests.h
@@ -47,6 +47,12 @@
 
 
 /*
+ Most basic test.
+ */
+int basic_encode_test(void);
+
+
+/*
  Encode lots of integer values, particularly around the boundary and make sure they
  Match the expected binary output. Primarily an encoding test.
  */
diff --git a/test/run_tests.c b/test/run_tests.c
index a9317a2..ed58746 100644
--- a/test/run_tests.c
+++ b/test/run_tests.c
@@ -34,7 +34,6 @@
 #include <stdbool.h>
 
 #include "float_tests.h"
-#include "basic_test.h"
 #include "qcbor_decode_tests.h"
 #include "qcbor_encode_tests.h"
 #include "UsefulBuf_Tests.h"
@@ -127,7 +126,7 @@
     TEST_ENTRY(ComprehensiveInputTest),
     TEST_ENTRY(ParseMapTest),
     TEST_ENTRY(indefinite_length_decode_test),
-    TEST_ENTRY(basic_test_one),
+    TEST_ENTRY(basic_encode_test),
     TEST_ENTRY(NestedMapTest),
     TEST_ENTRY(BignumParseTest),
     TEST_ENTRY(OptTagParseTest),