Skip to content

Conversation

@kpraveenkumar
Copy link

Circular Buffer is implemented with compile time fixed size and static memory allocation.
Supports Generic Data type,as template is used.
It has two put data behavior,
-Override
-Discard
The function 'PushBack' has two arguments:
-data
-override flag(which is set to true by Default).

If the user wants to override old data, when the circular buffer is full, PushBack shall be called with 'data' as argument to be pushed back.
If the user wants to discard new data, when the circular buffer is full, PushBack shall be called with two arguments 'data' and 'false'.

Test cases:

Google Test framework is used for test cases.
Test cases are implemented as Value Parameterised test cases.
GTest chooses the given values and automatically forms the test cases and executes them.
TYPED_TEST cannot be implemented, as GTest shows valid compile errors as keyword 'auto' is not supported.
Test cases are written to support all int,long data types,eventhough the Circular buffer supports all generic data types.
There is an using directive to change 'Type' in testcases.

@kpraveenkumar kpraveenkumar changed the title WIP: Circular Buffer Implementation Circular Buffer Implementation Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant