summaryrefslogtreecommitdiffstats
path: root/test/unit/ui/mocks/text_mock.h
blob: b9af6d3101f39f7769bb9698e9eb5b79ec4c957a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#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));
    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));

};