added booleans decode test case
diff --git a/test/qcbor_decode_tests.c b/test/qcbor_decode_tests.c
index 6e1cc3b..dc31661 100644
--- a/test/qcbor_decode_tests.c
+++ b/test/qcbor_decode_tests.c
@@ -7766,3 +7766,28 @@
return 0;
}
+
+
+static const uint8_t spBooleansInMap[] =
+{
+ 0xa3, 0x08, 0xf5
+};
+
+int32_t BoolTest(void)
+{
+ QCBORDecodeContext DCtx;
+ bool b;
+
+ QCBORDecode_Init(&DCtx, UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spBooleansInMap), 0);
+
+ QCBORDecode_EnterMap(&DCtx, NULL);
+ QCBORDecode_GetBool(&DCtx, &b);
+ if(QCBORDecode_GetError(&DCtx) || !b) {
+ return 1;
+ }
+
+ // TODO: add more tests
+
+
+ return 0;
+}
diff --git a/test/qcbor_decode_tests.h b/test/qcbor_decode_tests.h
index 53f6bd2..54e125a 100644
--- a/test/qcbor_decode_tests.h
+++ b/test/qcbor_decode_tests.h
@@ -308,5 +308,10 @@
int32_t PeekAndRewindTest(void);
+/*
+Test decoding of booleans
+*/
+int32_t BoolTest(void);
+
#endif /* defined(__QCBOR__qcbort_decode_tests__) */
diff --git a/test/run_tests.c b/test/run_tests.c
index cc9c70b..53d83f6 100644
--- a/test/run_tests.c
+++ b/test/run_tests.c
@@ -137,6 +137,7 @@
TEST_ENTRY(ExponentAndMantissaEncodeTests),
#endif /* QCBOR_DISABLE_EXP_AND_MANTISSA */
TEST_ENTRY(ParseEmptyMapInMapTest),
+ TEST_ENTRY(BoolTest)
};