1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 04:07:34 +00:00

AK: Add CircularBuffer

The class is very similar to `CircularDuplexStream` in its behavior.
Main differences are that `CircularBuffer`:
 - does not inherit from `AK::Stream`
 - uses `ErrorOr` for its API
 - is heap allocated (and OOM-Safe)

 This patch also add some tests.
This commit is contained in:
Lucas CHOLLET 2022-12-08 22:44:46 +01:00 committed by Andrew Kaster
parent 3454891d38
commit f12e81b74a
6 changed files with 488 additions and 0 deletions

View file

@ -14,6 +14,7 @@ set(AK_TEST_SOURCES
TestByteBuffer.cpp
TestCharacterTypes.cpp
TestChecked.cpp
TestCircularBuffer.cpp
TestCircularDeque.cpp
TestCircularDuplexStream.cpp
TestCircularQueue.cpp