diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-16 19:01:13 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-16 21:26:04 +0200 |
commit | 01b6e1cbf28f54793e22cc40affac7fb03511180 (patch) | |
tree | 5ac27527b2c5f36384f2c42d3907f12fa96067af /test/test_pcm_util.hxx | |
parent | eefc0f5d80fbcb485db230c3df090b69994a75ce (diff) |
test: use GTest instead of cppunit
Diffstat (limited to 'test/test_pcm_util.hxx')
-rw-r--r-- | test/test_pcm_util.hxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_pcm_util.hxx b/test/test_pcm_util.hxx index ec7b7e36a..ae8206230 100644 --- a/test/test_pcm_util.hxx +++ b/test/test_pcm_util.hxx @@ -19,6 +19,8 @@ #include "util/ConstBuffer.hxx" +#include <gtest/gtest.h> + #include <array> #include <random> @@ -92,13 +94,13 @@ template<typename T> bool AssertEqualWithTolerance(const T &a, const T &b, unsigned tolerance) { - CPPUNIT_ASSERT_EQUAL(a.size(), b.size()); + EXPECT_EQ(a.size(), b.size()); for (unsigned i = 0; i < a.size(); ++i) { int64_t x = a[i], y = b[i]; - CPPUNIT_ASSERT(x >= y - int64_t(tolerance)); - CPPUNIT_ASSERT(x <= y + int64_t(tolerance)); + EXPECT_GE(x, y - int64_t(tolerance)); + EXPECT_LE(x, y + int64_t(tolerance)); } return true; |