Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tests for queue functions #3

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Adding tests for queue functions #3

merged 1 commit into from
Apr 16, 2024

Conversation

Yuka-Furuta
Copy link

@Yuka-Furuta Yuka-Furuta commented Apr 16, 2024

Add tests for csp_queue functions

This commit adds simple test code for csp_queue_enqueue,
csp_queue_dequeue, csp_queue_size, and csp_queue_free.
test_queue_enqueue_dequeue_one is a basic test that verifies the
dequeued content is exactly the same as what was enqueued.
test_queue_enqueue_dequeue_full checks that enqueue and dequeue
operations can be performed for the entire allocated queue size.
test_queue_enqueue_overflow and test_queue_dequeue_underflow check if
overflow during enqueue and underflow during dequeue trigger errors.
test_queue_size and test_queue_free ensure that size and free
operations reflect an increment and decrement after one enqueue and
one dequeue operation, respectively.

This commit adds simple test code for csp_queue_enqueue,
csp_queue_dequeue, csp_queue_size, and csp_queue_free.

test_queue_enqueue_dequeue_one is a basic test that verifies the
dequeued content is exactly the same as what was enqueued.

test_queue_enqueue_dequeue_full checks that enqueue and dequeue
operations can be performed for the entire allocated queue size.

test_queue_enqueue_overflow and test_queue_dequeue_underflow check if
overflow during enqueue and underflow during dequeue trigger errors.

test_queue_size and test_queue_free ensure that size and free
operations reflect an increment and decrement after one enqueue and
one dequeue operation, respectively.

Signed-off-by: Yuka Furuta <[email protected]>
@yashi yashi merged commit b551870 into libcsp:main Apr 16, 2024
3 checks passed
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.

2 participants