aboutsummaryrefslogtreecommitdiff
path: root/test/mocks/matrix.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-06-02 19:51:54 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:57:00 +0200
commiteecf4b1e666211a13afa56f93477c55e8fd01621 (patch)
tree410510d6e058995174d5a5b0f535fb457a0c3542 /test/mocks/matrix.hpp
parent87f55120f96d0f4f80b497dc9006d89df2dda125 (diff)
feat: implement game of lifev0.1.0
Diffstat (limited to 'test/mocks/matrix.hpp')
-rw-r--r--test/mocks/matrix.hpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/mocks/matrix.hpp b/test/mocks/matrix.hpp
new file mode 100644
index 0000000..1602ebf
--- /dev/null
+++ b/test/mocks/matrix.hpp
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "interfaces/matrix.hpp"
+
+#include <gmock/gmock.h>
+
+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)
+ MOCK_METHOD(Element, get, (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)
+ MOCK_METHOD(uint32_t, get_row_cnt, (), (const, noexcept, override));
+
+ // NOLINTNEXTLINE(modernize-use-trailing-return-type)
+ MOCK_METHOD(uint32_t, get_column_cnt, (), (const, noexcept, override));
+
+ // NOLINTNEXTLINE(modernize-use-trailing-return-type)
+ MOCK_METHOD(MatrixIterator<Element>, begin, (), (const, noexcept, override));
+
+ // NOLINTNEXTLINE(modernize-use-trailing-return-type)
+ MOCK_METHOD(MatrixIterator<Element>, end, (), (const, noexcept));
+};