summaryrefslogtreecommitdiffstats
path: root/src/ui/test/mocks
diff options
context:
space:
mode:
authorZaba999 <qrwfw5rp>2012-10-11 23:09:29 +0200
committerZaba999 <qrwfw5rp>2012-10-11 23:09:29 +0200
commit8a932fed3e5700af283017deab3cb1da11cb0dce (patch)
tree892d7a4068c843cb41bd202f078b042027a0a3d0 /src/ui/test/mocks
parent3f7f013168e62693601ab57108d329ffaa924439 (diff)
downloadcolobot-8a932fed3e5700af283017deab3cb1da11cb0dce.tar.gz
colobot-8a932fed3e5700af283017deab3cb1da11cb0dce.tar.bz2
colobot-8a932fed3e5700af283017deab3cb1da11cb0dce.zip
Added saving user scripts on game save. Fixed bug in writing script to file.
Diffstat (limited to 'src/ui/test/mocks')
-rw-r--r--src/ui/test/mocks/text_mock.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ui/test/mocks/text_mock.h b/src/ui/test/mocks/text_mock.h
new file mode 100644
index 0000000..59a6c48
--- /dev/null
+++ b/src/ui/test/mocks/text_mock.h
@@ -0,0 +1,21 @@
+#include "../../graphics/engine/text.h"
+#include <gmock/gmock.h>
+#include "../../common/logger.h"
+
+
+class CTextMock : public Gfx::CText
+{
+public:
+ CTextMock(CInstanceManager *iMan, Gfx::CEngine* engine) : CText(iMan, engine)
+ {
+ }
+
+ virtual ~CTextMock()
+ {
+ };
+
+ MOCK_METHOD4(GetCharWidth, float(Gfx::UTF8Char, Gfx::FontType, float, float));
+ MOCK_METHOD3(GetStringWidth, float(const std::string &, Gfx::FontType, float));
+
+};
+