initial commit with refactored mqtt commands

This commit is contained in:
proddy
2020-08-03 23:14:43 +02:00
parent 56c4e043fe
commit 6154ff38f2
41 changed files with 1208 additions and 1351 deletions

View File

@@ -22,11 +22,6 @@ static void check(const JsonObject object, const char (&expected_data)[N]) {
check(object, expected_data, expected_len);
}
// TODO: used by the commented test
// static void check(const JsonObject object, const std::string& expected) {
// check(object, expected.data(), expected.length());
//}
TEST_CASE("serialize MsgPack object") {
DynamicJsonDocument doc(4096);
JsonObject object = doc.to<JsonObject>();
@@ -54,23 +49,6 @@ TEST_CASE("serialize MsgPack object") {
"iC\x0C\xA2iD\x0D\xA2iE\x0E\xA2iF\x0F");
}
// TODO: improve performance and uncomment
// SECTION("map 32") {
// std::string expected("\xDF\x00\x01\x00\x00", 5);
//
// for (int i = 0; i < 65536; ++i) {
// char kv[16];
// sprintf(kv, "%04x", i);
// object[kv] = kv;
// expected += '\xA4';
// expected += kv;
// expected += '\xA4';
// expected += kv;
// }
//
// check(object, expected);
// }
SECTION("serialized(const char*)") {
object["hello"] = serialized("\xDB\x00\x01\x00\x00", 5);
check(object, "\x81\xA5hello\xDB\x00\x01\x00\x00");

View File

@@ -10323,7 +10323,6 @@ namespace Catch {
virtual void testGroupEnded( TestGroupStats const& testGroupStats ) CATCH_OVERRIDE {
StreamingReporterBase::testGroupEnded( testGroupStats );
// TODO: Check testGroupStats.aborting and act accordingly.
m_xml.scopedElement( "OverallResults" )
.writeAttribute( "successes", testGroupStats.totals.assertions.passed )
.writeAttribute( "failures", testGroupStats.totals.assertions.failed )

View File

@@ -23,7 +23,6 @@ class MsgPackDeserializer {
TStringStorage stringStorage)
: _pool(&pool), _reader(reader), _stringStorage(stringStorage) {}
// TODO: add support for filter
DeserializationError parse(VariantData &variant, AllowAllFilter,
NestingLimit nestingLimit) {
return parse(variant, nestingLimit);
@@ -40,7 +39,6 @@ class MsgPackDeserializer {
}
if ((code & 0xe0) == 0xe0) {
// TODO: add setNegativeInteger()
variant.setSignedInteger(static_cast<int8_t>(code));
return DeserializationError::Ok;
}