colobot/test/unit/ui/mocks/text_mock.h

36 lines
1.1 KiB
C
Raw Normal View History

#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 ch,
Gfx::FontType type,
float size,
float offset));
2013-03-27 22:48:44 +00:00
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(std::string text,
Gfx::FontType font,
float size));
MOCK_METHOD4(GetStringWidth, float(Gfx::UTF8Char ch,
Gfx::FontType font,
float size,
float offset));
};