summaryrefslogtreecommitdiffstats
path: root/src/tests/common/ring_buffer.cpp
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2021-02-06 20:13:03 +0100
committerMerryMage <MerryMage@users.noreply.github.com>2021-02-06 20:16:00 +0100
commit8d002659987cd45cb77896fbb173159398138e73 (patch)
tree35d6d7a67ebccfbc78f6e0d07600ea9ceb0d909b /src/tests/common/ring_buffer.cpp
parentarm_dynarmic_32: Print out CPSR.T on exception (diff)
downloadyuzu-8d002659987cd45cb77896fbb173159398138e73.tar
yuzu-8d002659987cd45cb77896fbb173159398138e73.tar.gz
yuzu-8d002659987cd45cb77896fbb173159398138e73.tar.bz2
yuzu-8d002659987cd45cb77896fbb173159398138e73.tar.lz
yuzu-8d002659987cd45cb77896fbb173159398138e73.tar.xz
yuzu-8d002659987cd45cb77896fbb173159398138e73.tar.zst
yuzu-8d002659987cd45cb77896fbb173159398138e73.zip
Diffstat (limited to 'src/tests/common/ring_buffer.cpp')
-rw-r--r--src/tests/common/ring_buffer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/common/ring_buffer.cpp b/src/tests/common/ring_buffer.cpp
index 54def22da..903626e4b 100644
--- a/src/tests/common/ring_buffer.cpp
+++ b/src/tests/common/ring_buffer.cpp
@@ -14,7 +14,7 @@
namespace Common {
TEST_CASE("RingBuffer: Basic Tests", "[common]") {
- RingBuffer<char, 4, 1> buf;
+ RingBuffer<char, 4> buf;
// Pushing values into a ring buffer with space should succeed.
for (std::size_t i = 0; i < 4; i++) {
@@ -77,7 +77,7 @@ TEST_CASE("RingBuffer: Basic Tests", "[common]") {
}
TEST_CASE("RingBuffer: Threaded Test", "[common]") {
- RingBuffer<char, 4, 2> buf;
+ RingBuffer<char, 8> buf;
const char seed = 42;
const std::size_t count = 1000000;
std::size_t full = 0;
@@ -92,8 +92,8 @@ TEST_CASE("RingBuffer: Threaded Test", "[common]") {
std::array<char, 2> value = {seed, seed};
std::size_t i = 0;
while (i < count) {
- if (const std::size_t c = buf.Push(&value[0], 1); c > 0) {
- REQUIRE(c == 1U);
+ if (const std::size_t c = buf.Push(&value[0], 2); c > 0) {
+ REQUIRE(c == 2U);
i++;
next_value(value);
} else {
@@ -107,7 +107,7 @@ TEST_CASE("RingBuffer: Threaded Test", "[common]") {
std::array<char, 2> value = {seed, seed};
std::size_t i = 0;
while (i < count) {
- if (const std::vector<char> v = buf.Pop(1); v.size() > 0) {
+ if (const std::vector<char> v = buf.Pop(2); v.size() > 0) {
REQUIRE(v.size() == 2U);
REQUIRE(v[0] == value[0]);
REQUIRE(v[1] == value[1]);