Skip to content

Commit

Permalink
Fix spelling and formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromehue committed Jul 31, 2024
1 parent 45633c6 commit 06729c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .codespell-ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tust
fram
framlayout
framBuffer
13 changes: 6 additions & 7 deletions Tests/UnitTests/FramRingBuffer.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TEST_CASE("Initial State ringbuffer")
fram::RingBuffer<int, 10, fram::Address{0}> buffer;

REQUIRE(buffer.Size() == 0);
REQUIRE(buffer.Capacity() == 10); // Fixed from 0 to 10 to reflect actual buffer capacity
REQUIRE(buffer.Capacity() == 10); // Fixed from 0 to 10 to reflect actual buffer capacity
}

TEST_CASE("FramRingBuffer Push function")
Expand Down Expand Up @@ -156,14 +156,14 @@ TEST_CASE("FramRingBuffer and ETL Circular Buffer")
fram::RingBuffer<int, 5U, 0U> framBuffer;
etl::circular_buffer<int, 5U> etlBuffer;

for (int i = 0; i < 5; ++i)
for(int i = 0; i < 5; ++i)
{
framBuffer.Push(i);
etlBuffer.push(i);
}

REQUIRE(framBuffer.Size() == etlBuffer.size());
for (size_t i = 0; i < framBuffer.Size(); ++i)
for(size_t i = 0; i < framBuffer.Size(); ++i)
{
REQUIRE(framBuffer[i] == etlBuffer[i]);
}
Expand All @@ -183,14 +183,14 @@ TEST_CASE("FramRingBuffer Stress Test")

fram::RingBuffer<int, 10000, 0U> buffer;

for (int i = 0; i < 10000; ++i)
for(int i = 0; i < 10000; ++i)
{
buffer.Push(i);
}

REQUIRE(buffer.Size() == 10000);

for (size_t i = 0; i < 10000; ++i)
for(size_t i = 0; i < 10000; ++i)
{
REQUIRE(buffer[i] == static_cast<int>(i));
}
Expand All @@ -203,8 +203,7 @@ TEST_CASE("Custom Type")
fram::Initialize();


fram::RingBuffer<sts1cobcsw::edu::ProgramStatusHistoryEntry,
10U, 0U> buffer;
fram::RingBuffer<sts1cobcsw::edu::ProgramStatusHistoryEntry, 10U, 0U> buffer;

auto pshEntry = sts1cobcsw::edu::ProgramStatusHistoryEntry{
.programId = sts1cobcsw::ProgramId(0),
Expand Down

0 comments on commit 06729c0

Please sign in to comment.