2021-08-02 15:47:12 +02:00
|
|
|
#include "fsfw-tests/internal/globalfunctions/TestArrayPrinter.h"
|
2021-01-15 16:56:36 +01:00
|
|
|
|
|
|
|
void arrayprinter::testArrayPrinter() {
|
2021-01-15 18:07:32 +01:00
|
|
|
{
|
|
|
|
const std::array<uint8_t, 5> testDataSmall = {0x01, 0x02, 0x03, 0x04, 0x05};
|
|
|
|
arrayprinter::print(testDataSmall.data(), testDataSmall.size());
|
|
|
|
arrayprinter::print(testDataSmall.data(), testDataSmall.size(), OutputType::DEC);
|
|
|
|
arrayprinter::print(testDataSmall.data(), testDataSmall.size(), OutputType::BIN);
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
std::array<uint8_t, 16> testDataMed;
|
|
|
|
for(size_t idx = 0; idx < testDataMed.size(); idx ++) {
|
|
|
|
testDataMed[idx] = testDataMed.size() - idx;
|
|
|
|
}
|
|
|
|
arrayprinter::print(testDataMed.data(), testDataMed.size());
|
|
|
|
arrayprinter::print(testDataMed.data(), testDataMed.size(), OutputType::DEC, 8);
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
std::array<uint8_t, 32> testDataLarge;
|
|
|
|
for(size_t idx = 0; idx < testDataLarge.size(); idx ++) {
|
|
|
|
testDataLarge[idx] = idx;
|
|
|
|
}
|
|
|
|
arrayprinter::print(testDataLarge.data(), testDataLarge.size());
|
|
|
|
arrayprinter::print(testDataLarge.data(), testDataLarge.size(), OutputType::DEC);
|
|
|
|
}
|
|
|
|
|
2021-01-15 16:56:36 +01:00
|
|
|
}
|