From d7d4e918e7a2ef893dff836554893dab6c833cc5 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 2 Oct 2026 15:21:05 +0200 Subject: kstd: ring_buffer: add missing push/pop API tests --- libs/kstd/kstd/ring_buffer.tests.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libs/kstd/kstd/ring_buffer.tests.cpp b/libs/kstd/kstd/ring_buffer.tests.cpp index 58037e1c..bd14223f 100644 --- a/libs/kstd/kstd/ring_buffer.tests.cpp +++ b/libs/kstd/kstd/ring_buffer.tests.cpp @@ -172,6 +172,26 @@ SCENARIO("Ring Buffer interface types", "[kstd][ring_buffer]") { STATIC_REQUIRE(std::is_same_v().crend())>); } + + THEN("the return type of push_back() is void") + { + STATIC_REQUIRE(std::is_same_v().push_back(std::declval()))>); + } + + THEN("the return type of try_push_back() is bool") + { + STATIC_REQUIRE(std::is_same_v().try_push_back(buffer::value_type{}))>); + } + + THEN("the return type of pop_front() is void") + { + STATIC_REQUIRE(std::is_same_v().pop_front())>); + } + + THEN("the return type of try_pop_front() is bool") + { + STATIC_REQUIRE(std::is_same_v().try_pop_front())>); + } } } -- cgit v1.2.3