diff options
Diffstat (limited to 'test/unit/ui/mocks/text_mock.h')
-rw-r--r-- | test/unit/ui/mocks/text_mock.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/unit/ui/mocks/text_mock.h b/test/unit/ui/mocks/text_mock.h new file mode 100644 index 0000000..f38b977 --- /dev/null +++ b/test/unit/ui/mocks/text_mock.h @@ -0,0 +1,25 @@ +#include "common/logger.h" + +#include "graphics/engine/text.h" + +#include <gmock/gmock.h> + +class CTextMock : public Gfx::CText +{ +public: + CTextMock(Gfx::CEngine* engine) : CText(engine) + { + } + + virtual ~CTextMock() + { + }; + + MOCK_METHOD4(GetCharWidth, float(Gfx::UTF8Char, Gfx::FontType, float, float)); + MOCK_METHOD4(GetStringWidth, float(const std::string &text, + std::vector<Gfx::FontMetaChar>::iterator format, + std::vector<Gfx::FontMetaChar>::iterator end, float size)); + MOCK_METHOD3(GetStringWidth, float(const std::string &, Gfx::FontType, float)); + +}; + |