From 482ce29d0a3c0cb006182748c7fafef508055a62 Mon Sep 17 00:00:00 2001 From: Djordje Nedic Date: Mon, 26 Feb 2024 01:44:33 +0100 Subject: [PATCH] change(tests): Give tests names that reflect the data structure tested to more easily identify them --- tests/mpmc/priority_queue.cpp | 12 ++++--- tests/mpmc/queue.cpp | 13 +++---- tests/spsc/bipartite_buf.cpp | 34 +++++++++++------- tests/spsc/priority_queue.cpp | 15 ++++---- tests/spsc/queue.cpp | 15 ++++---- tests/spsc/ring_buf.cpp | 68 ++++++++++++++++++++--------------- 6 files changed, 91 insertions(+), 66 deletions(-) diff --git a/tests/mpmc/priority_queue.cpp b/tests/mpmc/priority_queue.cpp index 6b175dd..7f2c7f0 100644 --- a/tests/mpmc/priority_queue.cpp +++ b/tests/mpmc/priority_queue.cpp @@ -5,7 +5,7 @@ #include "lockfree.hpp" -TEST_CASE("Write to empty, lowest priority and read back", +TEST_CASE("mpmc::PriorityQueue - Write to empty, lowest priority and read back", "[mpmc_pq_write_empty_lowest]") { lockfree::mpmc::PriorityQueue queue; @@ -18,8 +18,9 @@ TEST_CASE("Write to empty, lowest priority and read back", REQUIRE(read == -1024); } -TEST_CASE("Write to empty, highest priority and read back", - "[mpmc_pq_write_empty_highest]") { +TEST_CASE( + "mpmc::PriorityQueue - Write to empty, highest priority and read back", + "[mpmc_pq_write_empty_highest]") { lockfree::mpmc::PriorityQueue queue; bool const push_success = queue.Push(-1024, 2); @@ -31,7 +32,8 @@ TEST_CASE("Write to empty, highest priority and read back", REQUIRE(read == -1024); } -TEST_CASE("Write multiple with different priority and read back ensuring " +TEST_CASE("mpmc::PriorityQueue - Write multiple with different priority and " + "read back ensuring " "proper sequence", "[mpmc_pq_write_multiple_read_multiple]") { lockfree::mpmc::PriorityQueue queue; @@ -66,7 +68,7 @@ TEST_CASE("Write multiple with different priority and read back ensuring " REQUIRE(read == 1024); } -TEST_CASE("Optional API", "[mpmc_pq_optional_api]") { +TEST_CASE("mpmc::PriorityQueue - Optional API", "[mpmc_pq_optional_api]") { lockfree::mpmc::PriorityQueue queue; bool const push_success = queue.Push(-1024, 0); diff --git a/tests/mpmc/queue.cpp b/tests/mpmc/queue.cpp index 259dd56..3c9399a 100644 --- a/tests/mpmc/queue.cpp +++ b/tests/mpmc/queue.cpp @@ -5,7 +5,8 @@ #include "lockfree.hpp" -TEST_CASE("Write to empty and read back", "[mpmc_q_write_empty]") { +TEST_CASE("mpmc::Queue - Write to empty and read back", + "[mpmc_q_write_empty]") { lockfree::mpmc::Queue queue; bool const push_success = queue.Push(-1024); @@ -17,7 +18,7 @@ TEST_CASE("Write to empty and read back", "[mpmc_q_write_empty]") { REQUIRE(pop_success); } -TEST_CASE("Read empty", "[mpmc_q_read_empty]") { +TEST_CASE("mpmc::Queue - Read empty", "[mpmc_q_read_empty]") { lockfree::mpmc::Queue queue; uint8_t read = 0; @@ -25,7 +26,7 @@ TEST_CASE("Read empty", "[mpmc_q_read_empty]") { REQUIRE(!pop_success); } -TEST_CASE("Write full", "[mpmc_q_write_full]") { +TEST_CASE("mpmc::Queue - Write full", "[mpmc_q_write_full]") { lockfree::mpmc::Queue queue; bool push_success = queue.Push(1U); @@ -37,7 +38,7 @@ TEST_CASE("Write full", "[mpmc_q_write_full]") { REQUIRE(!push_success); } -TEST_CASE("Write multiple to empty and read back", +TEST_CASE("mpmc::Queue - Write multiple to empty and read back", "[mpmc_q_write_empty_multiple]") { lockfree::mpmc::Queue queue; @@ -59,7 +60,7 @@ TEST_CASE("Write multiple to empty and read back", REQUIRE(pop_success); } -TEST_CASE("Write with overflow and read back from start", +TEST_CASE("mpmc::Queue - Write with overflow and read back from start", "[mpmc_q_write_overflow]") { lockfree::mpmc::Queue queue; @@ -81,7 +82,7 @@ TEST_CASE("Write with overflow and read back from start", REQUIRE(read == 1000); } -TEST_CASE("Optional API", "[mpmc_q_optional_api]") { +TEST_CASE("mpmc::Queue - Optional API", "[mpmc_q_optional_api]") { lockfree::mpmc::Queue queue; REQUIRE(!queue.PopOptional()); diff --git a/tests/spsc/bipartite_buf.cpp b/tests/spsc/bipartite_buf.cpp index f90c34f..64bcae3 100644 --- a/tests/spsc/bipartite_buf.cpp +++ b/tests/spsc/bipartite_buf.cpp @@ -4,7 +4,8 @@ #include "lockfree.hpp" -TEST_CASE("Write to the beginning", "[bb_write_beginning]") { +TEST_CASE("spsc::BipartiteBuf - Write to the beginning", + "[bb_write_beginning]") { lockfree::spsc::BipartiteBuf bb; const uint8_t test_data[320] = {0xE5U}; @@ -23,13 +24,15 @@ TEST_CASE("Write to the beginning", "[bb_write_beginning]") { REQUIRE(std::equal(std::begin(test_data), std::end(test_data), read.first)); } -TEST_CASE("Try to acquire too much data", "[bb_acquire_too_much]") { +TEST_CASE("spsc::BipartiteBuf - Try to acquire too much data", + "[bb_acquire_too_much]") { lockfree::spsc::BipartiteBuf bb; auto *write_location = bb.WriteAcquire(512U + rand()); REQUIRE(write_location == nullptr); } -TEST_CASE("Try to acquire read with an empty buffer", "[bb_read_empty]") { +TEST_CASE("spsc::BipartiteBuf - Try to acquire read with an empty buffer", + "[bb_read_empty]") { lockfree::spsc::BipartiteBuf bb; auto read = bb.ReadAcquire(); @@ -37,7 +40,8 @@ TEST_CASE("Try to acquire read with an empty buffer", "[bb_read_empty]") { REQUIRE(read.second == 0); } -TEST_CASE("Write with overflow condition", "[bb_write_overflow]") { +TEST_CASE("spsc::BipartiteBuf - Write with overflow condition", + "[bb_write_overflow]") { lockfree::spsc::BipartiteBuf bb; const uint32_t test_data[320] = {0xE5A1D2C3U}; @@ -66,8 +70,9 @@ TEST_CASE("Write with overflow condition", "[bb_write_overflow]") { std::equal(std::begin(test_data2), std::end(test_data2), read.first)); } -TEST_CASE("Read data written after overflow condition write", - "[bb_read_after_overflow_write]") { +TEST_CASE( + "spsc::BipartiteBuf - Read data written after overflow condition write", + "[bb_read_after_overflow_write]") { lockfree::spsc::BipartiteBuf bb; const int16_t test_data[320] = {-222}; @@ -105,7 +110,7 @@ TEST_CASE("Read data written after overflow condition write", std::equal(std::begin(test_data3), std::end(test_data3), read.first)); } -TEST_CASE("Interleaved write and read with enough space", +TEST_CASE("spsc::BipartiteBuf - Interleaved write and read with enough space", "[bb_interleaved_success]") { lockfree::spsc::BipartiteBuf bb; const double test_data[320] = {42.4242}; @@ -132,7 +137,7 @@ TEST_CASE("Interleaved write and read with enough space", REQUIRE(std::equal(std::begin(test_data), std::end(test_data), read.first)); } -TEST_CASE("Interleaved write and read with enough space 2", +TEST_CASE("spsc::BipartiteBuf - Interleaved write and read with enough space 2", "[bb_interleaved_success2]") { lockfree::spsc::BipartiteBuf bb; const char test_data[320] = {'A'}; @@ -156,8 +161,9 @@ TEST_CASE("Interleaved write and read with enough space 2", REQUIRE(std::equal(std::begin(test_data), std::end(test_data), read.first)); } -TEST_CASE("Interleaved write and read without enough space", - "[bb_interleaved_fail]") { +TEST_CASE( + "spsc::BipartiteBuf - Interleaved write and read without enough space", + "[bb_interleaved_fail]") { lockfree::spsc::BipartiteBuf bb; const uint8_t test_data[320] = {0xE5U}; @@ -178,7 +184,8 @@ TEST_CASE("Interleaved write and read without enough space", REQUIRE(write_location == nullptr); } -TEST_CASE("Test keeping the chunk of data when write ends exactly in the end " +TEST_CASE("spsc::BipartiteBuf - Test keeping the chunk of data when write ends " + "exactly in the end " "of the buffer.", "[bb_exact_end_write_release_proper_invalidation_test]") { constexpr size_t size = 8; @@ -199,7 +206,7 @@ TEST_CASE("Test keeping the chunk of data when write ends exactly in the end " REQUIRE((read_buf_second_half - base) == (write_buf_second_half - base)); } -TEST_CASE("std::span API test", "[bb_std_span_api]") { +TEST_CASE("spsc::BipartiteBuf - std::span API test", "[bb_std_span_api]") { lockfree::spsc::BipartiteBuf bb; auto *write_ptr = bb.WriteAcquire(320); @@ -236,7 +243,8 @@ TEST_CASE("std::span API test", "[bb_std_span_api]") { REQUIRE(read_pair.first == read_span.data()); } -TEST_CASE("Multithreaded read/write multiple", "[bb_multithread_multiple]") { +TEST_CASE("spsc::BipartiteBuf - Multithreaded read/write multiple", + "[bb_multithread_multiple]") { std::vector threads; lockfree::spsc::BipartiteBuf bb; std::vector written; diff --git a/tests/spsc/priority_queue.cpp b/tests/spsc/priority_queue.cpp index 5f15e5f..bd97dc4 100644 --- a/tests/spsc/priority_queue.cpp +++ b/tests/spsc/priority_queue.cpp @@ -6,7 +6,7 @@ #include "lockfree.hpp" -TEST_CASE("Write to empty, lowest priority and read back", +TEST_CASE("spsc::PriorityQueue - Write to empty, lowest priority and read back", "[pq_write_empty_lowest]") { lockfree::spsc::PriorityQueue queue; @@ -19,8 +19,9 @@ TEST_CASE("Write to empty, lowest priority and read back", REQUIRE(read == -1024); } -TEST_CASE("Write to empty, highest priority and read back", - "[pq_write_empty_highest]") { +TEST_CASE( + "spsc::PriorityQueue - Write to empty, highest priority and read back", + "[pq_write_empty_highest]") { lockfree::spsc::PriorityQueue queue; bool const push_success = queue.Push(-1024, 2); @@ -32,7 +33,8 @@ TEST_CASE("Write to empty, highest priority and read back", REQUIRE(read == -1024); } -TEST_CASE("Write multiple with different priority and read back ensuring " +TEST_CASE("spsc::PriorityQueue - Write multiple with different priority and " + "read back ensuring " "proper sequence", "[pq_write_multiple_read_multiple]") { lockfree::spsc::PriorityQueue queue; @@ -67,7 +69,8 @@ TEST_CASE("Write multiple with different priority and read back ensuring " REQUIRE(read == 1024); } -TEST_CASE("Multithreaded read/write", "[pq_multithreaded]") { +TEST_CASE("spsc::PriorityQueue - Multithreaded read/write", + "[pq_multithreaded]") { lockfree::spsc::PriorityQueue queue; std::vector threads; std::vector written; @@ -139,7 +142,7 @@ TEST_CASE("Multithreaded read/write", "[pq_multithreaded]") { } } -TEST_CASE("Optional API", "[pq_optional_api]") { +TEST_CASE("spsc::PriorityQueue - Optional API", "[pq_optional_api]") { lockfree::spsc::PriorityQueue queue; bool const push_success = queue.Push(-1024, 0); diff --git a/tests/spsc/queue.cpp b/tests/spsc/queue.cpp index 6b6480f..3099c24 100644 --- a/tests/spsc/queue.cpp +++ b/tests/spsc/queue.cpp @@ -6,7 +6,7 @@ #include "lockfree.hpp" -TEST_CASE("Write to empty and read back", "[q_write_empty]") { +TEST_CASE("spsc::Queue - Write to empty and read back", "[q_write_empty]") { lockfree::spsc::Queue queue; bool const push_success = queue.Push(-1024); @@ -18,7 +18,7 @@ TEST_CASE("Write to empty and read back", "[q_write_empty]") { REQUIRE(pop_success); } -TEST_CASE("Read empty", "[q_read_empty]") { +TEST_CASE("spsc::Queue - Read empty", "[q_read_empty]") { lockfree::spsc::Queue queue; uint8_t read = 0; @@ -26,7 +26,7 @@ TEST_CASE("Read empty", "[q_read_empty]") { REQUIRE(!pop_success); } -TEST_CASE("Write full", "[q_write_full]") { +TEST_CASE("spsc::Queue - Write full", "[q_write_full]") { lockfree::spsc::Queue queue; bool push_success = queue.Push(1U); @@ -37,7 +37,8 @@ TEST_CASE("Write full", "[q_write_full]") { REQUIRE(!push_success); } -TEST_CASE("Write multiple to empty and read back", "[q_write_empty_multiple]") { +TEST_CASE("spsc::Queue - Write multiple to empty and read back", + "[q_write_empty_multiple]") { lockfree::spsc::Queue queue; bool push_success = queue.Push(2.7183F); @@ -58,7 +59,7 @@ TEST_CASE("Write multiple to empty and read back", "[q_write_empty_multiple]") { REQUIRE(pop_success); } -TEST_CASE("Write with overflow and read back from start", +TEST_CASE("spsc::Queue - Write with overflow and read back from start", "[q_write_overflow]") { lockfree::spsc::Queue queue; @@ -80,7 +81,7 @@ TEST_CASE("Write with overflow and read back from start", REQUIRE(read == 1000); } -TEST_CASE("Optional API", "[q_optional_api]") { +TEST_CASE("spsc::Queue - Optional API", "[q_optional_api]") { lockfree::spsc::Queue queue; REQUIRE(!queue.PopOptional()); @@ -89,7 +90,7 @@ TEST_CASE("Optional API", "[q_optional_api]") { REQUIRE(queue.PopOptional() == -1024); } -TEST_CASE("Multithreaded read/write", "[q_multithread]") { +TEST_CASE("spsc::Queue - Multithreaded read/write", "[q_multithread]") { std::vector threads; lockfree::spsc::Queue queue; std::vector written; diff --git a/tests/spsc/ring_buf.cpp b/tests/spsc/ring_buf.cpp index 8e2f45f..e1901b3 100644 --- a/tests/spsc/ring_buf.cpp +++ b/tests/spsc/ring_buf.cpp @@ -4,14 +4,15 @@ #include "lockfree.hpp" -TEST_CASE("Get free with an empty buffer", "[rb_get_free_empty]") { +TEST_CASE("spsc::RingBuf - Get free with an empty buffer", + "[rb_get_free_empty]") { lockfree::spsc::RingBuf const rb; const float test_data[120] = {2.71828F}; REQUIRE(rb.GetFree() == 1024U - 1U); } -TEST_CASE("Get free after a write", "[rb_get_free]") { +TEST_CASE("spsc::RingBuf - Get free after a write", "[rb_get_free]") { lockfree::spsc::RingBuf rb; const float test_data[120] = {2.71828F}; @@ -21,7 +22,8 @@ TEST_CASE("Get free after a write", "[rb_get_free]") { 1024U - 1U - sizeof(test_data) / sizeof(test_data[0])); } -TEST_CASE("Get free when the buffer is full", "[rb_get_free_full]") { +TEST_CASE("spsc::RingBuf - Get free when the buffer is full", + "[rb_get_free_full]") { lockfree::spsc::RingBuf rb; const float test_data[1023] = {2.71828F}; @@ -30,7 +32,8 @@ TEST_CASE("Get free when the buffer is full", "[rb_get_free_full]") { REQUIRE(rb.GetFree() == 0); } -TEST_CASE("Get free after a wrapping write", "[rb_get_free_wrapped]") { +TEST_CASE("spsc::RingBuf - Get free after a wrapping write", + "[rb_get_free_wrapped]") { lockfree::spsc::RingBuf rb; const float test_data[360] = {2.71828F}; @@ -46,13 +49,14 @@ TEST_CASE("Get free after a wrapping write", "[rb_get_free_wrapped]") { 1024U - 1U - sizeof(test_data2) / sizeof(test_data2[0])); } -TEST_CASE("Get available with an empty buffer", "[rb_get_available_empty]") { +TEST_CASE("spsc::RingBuf - Get available with an empty buffer", + "[rb_get_available_empty]") { lockfree::spsc::RingBuf const rb; REQUIRE(rb.GetAvailable() == 0); } -TEST_CASE("Get available after a write", "[rb_get_available]") { +TEST_CASE("spsc::RingBuf - Get available after a write", "[rb_get_available]") { lockfree::spsc::RingBuf rb; const double test_data[120] = {123.123123}; @@ -61,7 +65,8 @@ TEST_CASE("Get available after a write", "[rb_get_available]") { REQUIRE(rb.GetAvailable() == sizeof(test_data) / sizeof(test_data[0])); } -TEST_CASE("Get available when the buffer is full", "[rb_get_available_full]") { +TEST_CASE("spsc::RingBuf - Get available when the buffer is full", + "[rb_get_available_full]") { lockfree::spsc::RingBuf rb; const double test_data[1023] = {123.123123}; @@ -70,7 +75,7 @@ TEST_CASE("Get available when the buffer is full", "[rb_get_available_full]") { REQUIRE(rb.GetAvailable() == 1024U - 1U); } -TEST_CASE("Get available after a wrapping write", +TEST_CASE("spsc::RingBuf - Get available after a wrapping write", "[rb_get_available_wrapped]") { lockfree::spsc::RingBuf rb; const double test_data[360] = {123.123123}; @@ -86,7 +91,7 @@ TEST_CASE("Get available after a wrapping write", REQUIRE(rb.GetAvailable() == sizeof(test_data2) / sizeof(test_data2[0])); } -TEST_CASE("Skip from the beginning", "[rb_skip]") { +TEST_CASE("spsc::RingBuf - Skip from the beginning", "[rb_skip]") { lockfree::spsc::RingBuf rb; const int32_t test_data[60] = {-125}; @@ -97,7 +102,7 @@ TEST_CASE("Skip from the beginning", "[rb_skip]") { REQUIRE(rb.GetFree() == 100U - 1U); } -TEST_CASE("Skip after wrapping", "[rb_skip_wrapping]") { +TEST_CASE("spsc::RingBuf - Skip after wrapping", "[rb_skip_wrapping]") { lockfree::spsc::RingBuf rb; const int32_t test_data[60] = {-125}; @@ -111,7 +116,8 @@ TEST_CASE("Skip after wrapping", "[rb_skip_wrapping]") { REQUIRE(rb.GetFree() == 100U - 1U); } -TEST_CASE("Try to skip with an empty buffer", "[rb_skip_empty]") { +TEST_CASE("spsc::RingBuf - Try to skip with an empty buffer", + "[rb_skip_empty]") { lockfree::spsc::RingBuf rb; bool const skip_success = rb.Skip(1); @@ -119,7 +125,7 @@ TEST_CASE("Try to skip with an empty buffer", "[rb_skip_empty]") { REQUIRE(!skip_success); } -TEST_CASE("Write to the beginning", "[rb_write_beginning]") { +TEST_CASE("spsc::RingBuf - Write to the beginning", "[rb_write_beginning]") { lockfree::spsc::RingBuf rb; const uint8_t test_data[320] = {0xE5U}; @@ -128,7 +134,7 @@ TEST_CASE("Write to the beginning", "[rb_write_beginning]") { REQUIRE(write_success); } -TEST_CASE("Write with wrapping", "[rb_write_wrapping]") { +TEST_CASE("spsc::RingBuf - Write with wrapping", "[rb_write_wrapping]") { lockfree::spsc::RingBuf rb; const uint8_t test_data[320] = {0xE5U}; @@ -141,7 +147,8 @@ TEST_CASE("Write with wrapping", "[rb_write_wrapping]") { REQUIRE(write_success); } -TEST_CASE("Write when there is not enough space", "[rb_write_no_space]") { +TEST_CASE("spsc::RingBuf - Write when there is not enough space", + "[rb_write_no_space]") { lockfree::spsc::RingBuf rb; const uint8_t test_data[320] = {0xE5U}; @@ -152,7 +159,7 @@ TEST_CASE("Write when there is not enough space", "[rb_write_no_space]") { REQUIRE(!write_success); } -TEST_CASE("Write full capacity", "[rb_write_max_size]") { +TEST_CASE("spsc::RingBuf - Write full capacity", "[rb_write_max_size]") { lockfree::spsc::RingBuf rb; const uint8_t test_data[511] = {0xE5U}; @@ -161,7 +168,7 @@ TEST_CASE("Write full capacity", "[rb_write_max_size]") { REQUIRE(write_success); } -TEST_CASE("Write std::array", "[rb_write_std_array]") { +TEST_CASE("spsc::RingBuf - Write std::array", "[rb_write_std_array]") { lockfree::spsc::RingBuf rb; const std::array test_data = {0xE5U}; @@ -169,7 +176,7 @@ TEST_CASE("Write std::array", "[rb_write_std_array]") { REQUIRE(write_success); } -TEST_CASE("Write std::span", "[rb_write_span]") { +TEST_CASE("spsc::RingBuf - Write std::span", "[rb_write_span]") { lockfree::spsc::RingBuf rb; const uint8_t test_data[320] = {0xE5U}; @@ -178,7 +185,7 @@ TEST_CASE("Write std::span", "[rb_write_span]") { REQUIRE(write_success); } -TEST_CASE("Read from the beginning", "[rb_read_beginning]") { +TEST_CASE("spsc::RingBuf - Read from the beginning", "[rb_read_beginning]") { lockfree::spsc::RingBuf rb; const uint64_t test_data[320] = {0xE5U}; @@ -193,7 +200,7 @@ TEST_CASE("Read from the beginning", "[rb_read_beginning]") { std::begin(test_data_read))); } -TEST_CASE("Read wrapping", "[rb_read_wrapping]") { +TEST_CASE("spsc::RingBuf - Read wrapping", "[rb_read_wrapping]") { lockfree::spsc::RingBuf rb; const uint64_t test_data[320] = {0xE5U}; @@ -213,7 +220,8 @@ TEST_CASE("Read wrapping", "[rb_read_wrapping]") { std::begin(test_data_read))); } -TEST_CASE("Try to read from an empty buffer", "[rb_read_empty]") { +TEST_CASE("spsc::RingBuf - Try to read from an empty buffer", + "[rb_read_empty]") { lockfree::spsc::RingBuf rb; uint64_t test_data_read[320] = {0}; @@ -223,7 +231,7 @@ TEST_CASE("Try to read from an empty buffer", "[rb_read_empty]") { REQUIRE(!read_success); } -TEST_CASE("Read std::array", "[rb_read_std_array]") { +TEST_CASE("spsc::RingBuf - Read std::array", "[rb_read_std_array]") { lockfree::spsc::RingBuf rb; const std::array test_data = {0xE5U}; @@ -237,7 +245,7 @@ TEST_CASE("Read std::array", "[rb_read_std_array]") { std::equal(test_data.begin(), test_data.end(), test_data_read.begin())); } -TEST_CASE("Read std::span", "[rb_read_span]") { +TEST_CASE("spsc::RingBuf - Read std::span", "[rb_read_span]") { lockfree::spsc::RingBuf rb; const uint64_t test_data[320] = {0xE5U}; @@ -251,7 +259,7 @@ TEST_CASE("Read std::span", "[rb_read_span]") { std::begin(test_data_read))); } -TEST_CASE("Peek from the beginning", "[rb_peek_beginning]") { +TEST_CASE("spsc::RingBuf - Peek from the beginning", "[rb_peek_beginning]") { lockfree::spsc::RingBuf rb; const uint64_t test_data[320] = {0xE5U}; @@ -266,7 +274,7 @@ TEST_CASE("Peek from the beginning", "[rb_peek_beginning]") { std::begin(test_data_read))); } -TEST_CASE("Peek wrapping", "[rb_peek_wrapping]") { +TEST_CASE("spsc::RingBuf - Peek wrapping", "[rb_peek_wrapping]") { lockfree::spsc::RingBuf rb; const uint64_t test_data[320] = {0xE5U}; @@ -286,7 +294,8 @@ TEST_CASE("Peek wrapping", "[rb_peek_wrapping]") { std::begin(test_data_read))); } -TEST_CASE("Try to peek from an empty buffer", "[rb_peek_empty]") { +TEST_CASE("spsc::RingBuf - Try to peek from an empty buffer", + "[rb_peek_empty]") { lockfree::spsc::RingBuf const rb; uint64_t test_data_read[320] = {0}; @@ -296,7 +305,7 @@ TEST_CASE("Try to peek from an empty buffer", "[rb_peek_empty]") { REQUIRE(!peek_success); } -TEST_CASE("Peek std::array", "[rb_peek_std_array]") { +TEST_CASE("spsc::RingBuf - Peek std::array", "[rb_peek_std_array]") { lockfree::spsc::RingBuf rb; const std::array test_data = {0xE5U}; @@ -310,7 +319,7 @@ TEST_CASE("Peek std::array", "[rb_peek_std_array]") { std::equal(test_data.begin(), test_data.end(), test_data_read.begin())); } -TEST_CASE("Peek std::span", "[rb_peek_span]") { +TEST_CASE("spsc::RingBuf - Peek std::span", "[rb_peek_span]") { lockfree::spsc::RingBuf rb; const uint64_t test_data[320] = {0xE5U}; @@ -324,7 +333,7 @@ TEST_CASE("Peek std::span", "[rb_peek_span]") { std::begin(test_data_read))); } -TEST_CASE("Multithreaded read/write", "[rb_multithread]") { +TEST_CASE("spsc::RingBuf - Multithreaded read/write", "[rb_multithread]") { std::vector threads; lockfree::spsc::RingBuf rb; std::vector written; @@ -358,7 +367,8 @@ TEST_CASE("Multithreaded read/write", "[rb_multithread]") { std::equal(std::begin(written), std::end(written), std::begin(read))); } -TEST_CASE("Multithreaded read/write multiple", "[rb_multithread_multiple]") { +TEST_CASE("spsc::RingBuf - Multithreaded read/write multiple", + "[rb_multithread_multiple]") { std::vector threads; lockfree::spsc::RingBuf rb; std::vector written;