mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
initial commit with refactored mqtt commands
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user