diff --git a/tests/auto/utils/bytearray/tst_bytearray.cpp b/tests/auto/utils/bytearray/tst_bytearray.cpp index aac3085..4cef05f 100644 --- a/tests/auto/utils/bytearray/tst_bytearray.cpp +++ b/tests/auto/utils/bytearray/tst_bytearray.cpp @@ -11,6 +11,7 @@ #include #include +#include using namespace KDUtils; @@ -442,7 +443,7 @@ TEST_SUITE("ByteArray") } } - TEST_CASE("checkToAndFromBase64") + void testArrayBase64(const std::vector array) { auto test = [](const std::vector &data) { // GIVEN @@ -456,7 +457,7 @@ TEST_SUITE("ByteArray") CHECK(t == t2); }; - for (int32_t len = 1; len < 128; ++len) { + for (const auto len : array) { std::vector data; data.resize(len); @@ -469,6 +470,21 @@ TEST_SUITE("ByteArray") } } + TEST_CASE("checkToAndFromBase64") + { + const std::vector testedLengths = { 1, 2, 64, 65, 128 }; + testArrayBase64(testedLengths); + } + + TEST_CASE("checkToAndFromBase64Full" + * doctest::skip(true)) + { + std::vector data(127); + std::iota(data.begin(), data.end(), 1); + + testArrayBase64(data); + } + TEST_CASE("checkOperatorPlusEqual") { // GIVEN