tests: fix warnings exposed by -Werror and a non-recursive Storage copy
This commit is contained in:
1 parent
2c8d853af0
commit
92d60231e5
5 files changed
+10
-18
No files matched your search
@@ -44,7 +44,7 @@ Void::Testing::Test spsc_full_push_returns_false()
|
||||
Void::Testing::Test spsc_fifo_order()
|
||||
{
|
||||
Void::Ring::SpscRing<int, 8> ring;
|
||||
for (int i = 0; i < 5; ++i) ring.push(i);
|
||||
for (int i = 0; i < 5; ++i) (void)ring.push(i);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
const auto v = ring.pop();
|
||||
Void::Testing::expect(v.has_value());
|
||||
@@ -61,14 +61,14 @@ Void::Testing::Test spsc_capacity_is_n_minus_one()
|
||||
Void::Testing::Test spsc_full_flag()
|
||||
{
|
||||
Void::Ring::SpscRing<int, 4> ring;
|
||||
ring.push(1); ring.push(2); ring.push(3);
|
||||
(void)ring.push(1); (void)ring.push(2); (void)ring.push(3);
|
||||
Void::Testing::expect(ring.full());
|
||||
}
|
||||
|
||||
Void::Testing::Test spsc_string_values()
|
||||
{
|
||||
Void::Ring::SpscRing<std::string, 4> ring;
|
||||
ring.push(std::string{"hello"});
|
||||
(void)ring.push(std::string{"hello"});
|
||||
const auto v = ring.pop();
|
||||
Void::Testing::expect(v.has_value());
|
||||
Void::Testing::expect_eq(*v, std::string{"hello"});
|
||||
|
||||
Reference in new issue
Block a user