aboutsummaryrefslogtreecommitdiff
path: root/test/mocks
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-06-25 16:20:51 +0200
committerHampusM <hampus@hampusmat.com>2022-06-25 16:20:51 +0200
commit9c868601591b60cf066eb576e85b0dbf4e1fd7ae (patch)
treec04cefa9297000df530865d0662da4a858527385 /test/mocks
parent696b97147c2e399be7a95cc5a983294eebc84ff0 (diff)
test: replace gtest with Catch2 & Trompeloeil
Diffstat (limited to 'test/mocks')
-rw-r--r--test/mocks/matrix.hpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/mocks/matrix.hpp b/test/mocks/matrix.hpp
index 1602ebf..4b193b2 100644
--- a/test/mocks/matrix.hpp
+++ b/test/mocks/matrix.hpp
@@ -2,30 +2,30 @@
#include "interfaces/matrix.hpp"
-#include <gmock/gmock.h>
+#include <trompeloeil.hpp>
template <typename Element>
class MockMatrix : public IMatrix<Element>
{
public:
- // NOLINTNEXTLINE(modernize-use-trailing-return-type)
- MOCK_METHOD(void, fill, (Element element), (noexcept, override));
+ // NOLINTNEXTLINE(modernize-use-trailing-return-type, readability-identifier-length)
+ MAKE_MOCK1(fill, void(Element element), noexcept override);
- // NOLINTNEXTLINE(modernize-use-trailing-return-type)
- MOCK_METHOD(Element, get, (const Vector2 &pos), (const, noexcept, override));
+ // NOLINTNEXTLINE(modernize-use-trailing-return-type, readability-identifier-length)
+ MAKE_MOCK1(get, Element(const Vector2 &pos), const noexcept override);
- // NOLINTNEXTLINE(modernize-use-trailing-return-type)
- MOCK_METHOD(void, set, (const Vector2 &pos, Element element), (noexcept, override));
+ // NOLINTNEXTLINE(modernize-use-trailing-return-type, readability-identifier-length)
+ MAKE_MOCK2(set, void(const Vector2 &pos, Element element), noexcept override);
// NOLINTNEXTLINE(modernize-use-trailing-return-type)
- MOCK_METHOD(uint32_t, get_row_cnt, (), (const, noexcept, override));
+ MAKE_MOCK0(get_row_cnt, uint32_t(), const noexcept override);
// NOLINTNEXTLINE(modernize-use-trailing-return-type)
- MOCK_METHOD(uint32_t, get_column_cnt, (), (const, noexcept, override));
+ MAKE_MOCK0(get_column_cnt, uint32_t(), const noexcept override);
// NOLINTNEXTLINE(modernize-use-trailing-return-type)
- MOCK_METHOD(MatrixIterator<Element>, begin, (), (const, noexcept, override));
+ MAKE_MOCK0(begin, MatrixIterator<Element>(), const noexcept override);
// NOLINTNEXTLINE(modernize-use-trailing-return-type)
- MOCK_METHOD(MatrixIterator<Element>, end, (), (const, noexcept));
+ MAKE_MOCK0(end, MatrixIterator<Element>(), const noexcept override);
};