fix bug in using string allocator for all strings; tests for string allocator for all strings; documentation for..
diff --git a/cmd_line_main.c b/cmd_line_main.c
index cacc095..f46799d 100644
--- a/cmd_line_main.c
+++ b/cmd_line_main.c
@@ -28,8 +28,8 @@
// Created by Laurence Lundblade on 9/13/18.
#include <stdio.h>
-
#include "run_tests.h"
+#include "qcbor.h" // to print sizes of the structures.
int fputs_wrapper(const char *szString, void *ctx)
@@ -42,7 +42,12 @@
{
(void)argc; // Suppress unused warning
(void)argv; // Suppress unused warning
-
+
+ printf("sizeof(QCBOREncodeContext) %d\n", (uint32_t)sizeof(QCBOREncodeContext));
+ printf("sizeof(QCBORDecodeContext) %d\n", (uint32_t)sizeof(QCBORDecodeContext));
+ printf("sizeof(QCBORItem) %d\n", (uint32_t)sizeof(QCBORItem));
+ printf("sizeof(QCBORStringAllocator) %d\n\n", (uint32_t)sizeof(QCBORStringAllocator));
+
int nNumTestsFailed = run_tests(&fputs_wrapper, stdout, NULL);
return nNumTestsFailed;