compiling

This commit is contained in:
Dmitry Borisenko
2021-12-13 00:58:42 +01:00
parent 7486ba7438
commit b8a8290928
188 changed files with 14925 additions and 45 deletions

View File

@@ -0,0 +1,30 @@
// StreamUtils - github.com/bblanchon/ArduinoStreamUtils
// Copyright Benoit Blanchon 2019-2021
// MIT License
#include "SpyingAllocator.hpp"
#include "StreamUtils/Streams/HammingStream.hpp"
#include "StreamUtils/Streams/MemoryStream.hpp"
#include "doctest.h"
using namespace StreamUtils;
TEST_CASE("HammingStream") {
MemoryStream upstream(64);
HammingStream<7, 4> stream{upstream};
SUBCASE("read() decodes") {
upstream.print("Tq");
CHECK(stream.read() == 'A');
}
SUBCASE("write() encodes") {
stream.write('A');
CHECK(upstream.readString() == "Tq");
}
}