aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_lfringbuffer11.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-11-02 16:11:33 +0100
committerSven Gothel <[email protected]>2021-11-02 16:11:33 +0100
commit02ccb9426604763d1ed69c62c5d6af8e72192c1b (patch)
treed1052f385c36b1b657b9c9cd8f64fa5c08f3d7b8 /test/test_lfringbuffer11.cpp
parent68ed3fb1192c141cc343bcf998cc7a0c40be88b5 (diff)
ringbuffer: Add notion of operating threading mode for more efficancyv0.7.0
Add notion of operating threading mode for more efficancy: - One producer-thread and one consumer-thread (default) - Multiple producer-threads and multiple consumer-threads
Diffstat (limited to 'test/test_lfringbuffer11.cpp')
-rw-r--r--test/test_lfringbuffer11.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_lfringbuffer11.cpp b/test/test_lfringbuffer11.cpp
index 694112a..7a7a709 100644
--- a/test/test_lfringbuffer11.cpp
+++ b/test/test_lfringbuffer11.cpp
@@ -132,6 +132,8 @@ class TestRingbuffer11 {
INFO_STR("\n\ntest01a_Read1Write1\n");
jau::nsize_t capacity = 100;
TrivialTypeRingbuffer rb = createEmpty(capacity);
+
+ fprintf(stderr, "test01a_Read1Write1: %s\n", rb.get_info().c_str());
REQUIRE_MSG("empty size "+rb.toString(), 0 == rb.size());
REQUIRE_MSG("empty "+rb.toString(), rb.isEmpty());
@@ -148,6 +150,8 @@ class TestRingbuffer11 {
INFO_STR("\n\ntest01b_Read1Write1_Range\n");
jau::nsize_t capacity = 100;
TrivialTypeRingbuffer rb = createEmpty(capacity);
+
+ fprintf(stderr, "test01b_Read1Write1_Range: %s\n", rb.get_info().c_str());
REQUIRE_MSG("empty size "+rb.toString(), 0 == rb.size());
REQUIRE_MSG("empty "+rb.toString(), rb.isEmpty());
@@ -164,6 +168,9 @@ class TestRingbuffer11 {
INFO_STR("\n\ntest02a_Read4Write1\n");
jau::nsize_t capacity = 400;
TrivialTypeRingbuffer rb = createEmpty(capacity);
+ rb.setMultiPCEnabled(true);
+
+ fprintf(stderr, "test02a_Read4Write1: %s\n", rb.get_info().c_str());
REQUIRE_MSG("empty size "+rb.toString(), 0 == rb.size());
REQUIRE_MSG("empty "+rb.toString(), rb.isEmpty());
@@ -186,6 +193,9 @@ class TestRingbuffer11 {
INFO_STR("\n\ntest02b_Read4Write1_Range\n");
jau::nsize_t capacity = 400;
TrivialTypeRingbuffer rb = createEmpty(capacity);
+ rb.setMultiPCEnabled(true);
+
+ fprintf(stderr, "test02b_Read4Write1_Range: %s\n", rb.get_info().c_str());
REQUIRE_MSG("empty size "+rb.toString(), 0 == rb.size());
REQUIRE_MSG("empty "+rb.toString(), rb.isEmpty());
@@ -208,6 +218,9 @@ class TestRingbuffer11 {
INFO_STR("\n\ntest03a_Read8Write2\n");
jau::nsize_t capacity = 800;
TrivialTypeRingbuffer rb = createEmpty(capacity);
+ rb.setMultiPCEnabled(true);
+
+ fprintf(stderr, "test03a_Read8Write2: %s\n", rb.get_info().c_str());
REQUIRE_MSG("empty size "+rb.toString(), 0 == rb.size());
REQUIRE_MSG("empty "+rb.toString(), rb.isEmpty());
@@ -242,6 +255,9 @@ class TestRingbuffer11 {
INFO_STR("\n\ntest03b_Read8Write2_Range\n");
jau::nsize_t capacity = 800;
TrivialTypeRingbuffer rb = createEmpty(capacity);
+ rb.setMultiPCEnabled(true);
+
+ fprintf(stderr, "test03b_Read8Write2_Range: %s\n", rb.get_info().c_str());
REQUIRE_MSG("empty size "+rb.toString(), 0 == rb.size());
REQUIRE_MSG("empty "+rb.toString(), rb.isEmpty());