2013-02-03 19:03:36 +00:00
|
|
|
#include "common/logger.h"
|
2013-02-16 21:37:43 +00:00
|
|
|
|
2013-02-03 19:03:36 +00:00
|
|
|
#include "graphics/engine/text.h"
|
2012-10-11 21:09:29 +00:00
|
|
|
|
2013-02-03 19:03:36 +00:00
|
|
|
#include <gmock/gmock.h>
|
2012-10-11 21:09:29 +00:00
|
|
|
|
|
|
|
class CTextMock : public Gfx::CText
|
|
|
|
{
|
|
|
|
public:
|
2013-02-16 21:37:43 +00:00
|
|
|
CTextMock(Gfx::CEngine* engine) : CText(engine)
|
2012-10-11 21:09:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ~CTextMock()
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2013-12-20 19:18:30 +00:00
|
|
|
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,
|
2013-12-20 19:18:30 +00:00
|
|
|
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));
|
2012-10-11 21:09:29 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|