diff options
Diffstat (limited to 'test/mocks/matrix.hpp')
-rw-r--r-- | test/mocks/matrix.hpp | 31 |
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)); +}; |