From e7de75c3e5a120fc9bd363c7d02c693aa68ab93b Mon Sep 17 00:00:00 2001 From: kamilchmela Date: Mon, 16 Sep 2024 12:51:43 +0000 Subject: [PATCH] Adjust fram test --- Tests/UnitTests/Fram.test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/UnitTests/Fram.test.cpp b/Tests/UnitTests/Fram.test.cpp index 9fb08a73..6281fd8a 100644 --- a/Tests/UnitTests/Fram.test.cpp +++ b/Tests/UnitTests/Fram.test.cpp @@ -48,7 +48,7 @@ TEST_CASE("Mocked functions do nothing by default") auto writeData = std::array{0xAA_b, 0xBB_b, 0xCC_b, 0xDD_b}; fram::WriteTo(address, Span(writeData), 0 * s); - readData = fram::ReadFrom(address, *s); + readData = fram::ReadFrom(address, 0 * s); CHECK(readData == decltype(readData){}); } } @@ -69,16 +69,16 @@ TEST_CASE("Mocking FRAM in RAM") auto address = fram::Address(GENERATE(take(1, random(0U, value_of(fram::memorySize) - 10)))); auto readData = std::array{0x01_b, 0x02_b, 0x03_b, 0x04_b}; - fram::ReadFrom(address, Span(&readData), 0); + fram::ReadFrom(address, Span(&readData), 0 * s); CHECK(readData == decltype(readData){}); auto writeData = std::array{0xAA_b, 0xBB_b, 0xCC_b, 0xDD_b}; - fram::WriteTo(address, Span(writeData), 0); + fram::WriteTo(address, Span(writeData), 0 * s); CHECK(fram::ram::memory[value_of(address)] == writeData[0]); CHECK(fram::ram::memory[value_of(address) + 1] == writeData[1]); CHECK(fram::ram::memory[value_of(address) + 2] == writeData[2]); CHECK(fram::ram::memory[value_of(address) + 3] == writeData[3]); - readData = fram::ReadFrom(address, 0); + readData = fram::ReadFrom(address, 0 * s); CHECK(readData == writeData); }