2011-07-29 15:57:27 +08:00
|
|
|
#ifndef _FONT_TEST_H_
|
|
|
|
#define _FONT_TEST_H_
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
#include "cocos2d.h"
|
2013-06-07 08:12:28 +08:00
|
|
|
#include "../BaseTest.h"
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
DEFINE_TEST_SUITE(FontTests);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
class FontTest : public TestCase
|
2011-07-29 15:57:27 +08:00
|
|
|
{
|
|
|
|
public:
|
2015-04-03 14:31:03 +08:00
|
|
|
static FontTest* create(const std::string& fontFile)
|
|
|
|
{
|
|
|
|
auto ret = new (std::nothrow) FontTest;
|
|
|
|
if (ret && ret->init())
|
|
|
|
{
|
|
|
|
ret->showFont(fontFile);
|
|
|
|
ret->autorelease();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
delete ret;
|
|
|
|
ret = nullptr;
|
|
|
|
}
|
2011-07-29 15:57:27 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void showFont(const std::string& fontFile);
|
2011-07-29 15:57:27 +08:00
|
|
|
|
2015-04-03 14:31:03 +08:00
|
|
|
virtual std::string title() const override;
|
2011-07-29 15:57:27 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _FONT_TEST_H_
|