mirror of https://github.com/axmolengine/axmol.git
Fix ci
This commit is contained in:
parent
f79530837b
commit
d8aa943ed9
|
@ -30,7 +30,6 @@ FileUtilsTests::FileUtilsTests()
|
|||
{
|
||||
ADD_TEST_CASE(TestResolutionDirectories);
|
||||
ADD_TEST_CASE(TestSearchPath);
|
||||
ADD_TEST_CASE(TestFilenameLookup);
|
||||
ADD_TEST_CASE(TestIsFileExist);
|
||||
ADD_TEST_CASE(TestIsDirectoryExist);
|
||||
ADD_TEST_CASE(TestFileFuncs);
|
||||
|
@ -208,44 +207,6 @@ std::string TestSearchPath::subtitle() const
|
|||
return "See the console, can see a orange box and a 'about' picture, except Android";
|
||||
}
|
||||
|
||||
// TestFilenameLookup
|
||||
|
||||
void TestFilenameLookup::onEnter()
|
||||
{
|
||||
FileUtilsDemo::onEnter();
|
||||
|
||||
auto sharedFileUtils = FileUtils::getInstance();
|
||||
|
||||
ValueMap dict;
|
||||
dict["grossini.bmp"] = Value("Images/grossini.png");
|
||||
dict["grossini.xcf"] = Value("Images/grossini.png");
|
||||
|
||||
sharedFileUtils->setFilenameLookupDictionary(dict);
|
||||
|
||||
// Instead of loading carlitos.xcf, it will load grossini.png
|
||||
auto sprite = Sprite::create("grossini.xcf");
|
||||
this->addChild(sprite);
|
||||
|
||||
auto s = Director::getInstance()->getWinSize();
|
||||
sprite->setPosition(s.width / 2, s.height / 2);
|
||||
}
|
||||
|
||||
void TestFilenameLookup::onExit()
|
||||
{
|
||||
|
||||
FileUtils* sharedFileUtils = FileUtils::getInstance();
|
||||
|
||||
// reset filename lookup
|
||||
sharedFileUtils->setFilenameLookupDictionary(ValueMap());
|
||||
|
||||
FileUtilsDemo::onExit();
|
||||
}
|
||||
|
||||
std::string TestFilenameLookup::title() const
|
||||
{
|
||||
return "FileUtils: filename lookup";
|
||||
}
|
||||
|
||||
// TestIsFileExist
|
||||
|
||||
void TestIsFileExist::onEnter()
|
||||
|
@ -276,9 +237,6 @@ void TestIsFileExist::onExit()
|
|||
|
||||
FileUtils* sharedFileUtils = FileUtils::getInstance();
|
||||
|
||||
// reset filename lookup
|
||||
sharedFileUtils->setFilenameLookupDictionary(ValueMap());
|
||||
|
||||
FileUtilsDemo::onExit();
|
||||
}
|
||||
|
||||
|
@ -997,7 +955,6 @@ void TestUnicodePath::onExit()
|
|||
|
||||
FileUtils* sharedFileUtils = FileUtils::getInstance();
|
||||
sharedFileUtils->purgeCachedEntries();
|
||||
sharedFileUtils->setFilenameLookupDictionary(ValueMap());
|
||||
FileUtilsDemo::onExit();
|
||||
}
|
||||
|
||||
|
@ -1037,12 +994,6 @@ void TestIsFileExistAsync::onEnter()
|
|||
|
||||
void TestIsFileExistAsync::onExit()
|
||||
{
|
||||
|
||||
FileUtils* sharedFileUtils = FileUtils::getInstance();
|
||||
|
||||
// reset filename lookup
|
||||
sharedFileUtils->setFilenameLookupDictionary(ValueMap());
|
||||
|
||||
FileUtilsDemo::onExit();
|
||||
}
|
||||
|
||||
|
|
|
@ -64,16 +64,6 @@ private:
|
|||
std::vector<std::string> _defaultResolutionsOrderArray;
|
||||
};
|
||||
|
||||
class TestFilenameLookup : public FileUtilsDemo
|
||||
{
|
||||
public:
|
||||
CREATE_FUNC(TestFilenameLookup);
|
||||
|
||||
virtual void onEnter() override;
|
||||
virtual void onExit() override;
|
||||
virtual std::string title() const override;
|
||||
};
|
||||
|
||||
class TestIsFileExist : public FileUtilsDemo
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -80,7 +80,6 @@ FontTests::FontTests()
|
|||
});
|
||||
}
|
||||
ADD_TEST_CASE(FontNoReplacementTest);
|
||||
ADD_TEST_CASE(FontReplacementTest);
|
||||
}
|
||||
|
||||
void FontTest::showFont(std::string_view fontFile)
|
||||
|
@ -162,7 +161,6 @@ FontNoReplacementTest* FontNoReplacementTest::create()
|
|||
|
||||
FontNoReplacementTest::FontNoReplacementTest()
|
||||
{
|
||||
_replace = false;
|
||||
}
|
||||
|
||||
FontNoReplacementTest::~FontNoReplacementTest()
|
||||
|
@ -176,7 +174,6 @@ FontNoReplacementTest::~FontNoReplacementTest()
|
|||
FontFreeType::releaseFont("fonts/Abduction.ttf");
|
||||
FontAtlasCache::unloadFontAtlasTTF("fonts/Schwarzwald.ttf");
|
||||
FontFreeType::releaseFont("fonts/Schwarzwald.ttf");
|
||||
FileUtils::getInstance()->setFilenameLookupDictionary(ValueMap());
|
||||
}
|
||||
|
||||
void FontNoReplacementTest::onEnter()
|
||||
|
@ -184,17 +181,6 @@ void FontNoReplacementTest::onEnter()
|
|||
TestCase::onEnter();
|
||||
|
||||
std::string suffix;
|
||||
if (_replace)
|
||||
{
|
||||
ValueMap dict{{"fonts/A Damn Mess.ttf", Value("fonts/arial.ttf")},
|
||||
{"fonts/Abberancy.ttf", Value("fonts/arial.ttf")},
|
||||
{"fonts/Abduction.ttf", Value("fonts/arial.ttf")},
|
||||
{"fonts/Schwarzwald.ttf", Value("fonts/arial.ttf")}};
|
||||
|
||||
FileUtils::getInstance()->setFilenameLookupDictionary(dict);
|
||||
suffix = " replaced by arial.ttf";
|
||||
}
|
||||
|
||||
auto s = Director::getInstance()->getWinSize();
|
||||
|
||||
auto blockSize = Size(s.width / 3, 200);
|
||||
|
@ -253,29 +239,3 @@ std::string FontNoReplacementTest::title() const
|
|||
{
|
||||
return "Font no replacement test";
|
||||
}
|
||||
|
||||
FontReplacementTest* FontReplacementTest::create()
|
||||
{
|
||||
auto ret = new FontReplacementTest;
|
||||
if (ret->init())
|
||||
{
|
||||
ret->autorelease();
|
||||
}
|
||||
else
|
||||
{
|
||||
delete ret;
|
||||
ret = nullptr;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
FontReplacementTest::FontReplacementTest()
|
||||
{
|
||||
_replace = true;
|
||||
}
|
||||
|
||||
std::string FontReplacementTest::title() const
|
||||
{
|
||||
return "Font replacement test";
|
||||
}
|
||||
|
|
|
@ -65,18 +65,6 @@ public:
|
|||
|
||||
protected:
|
||||
FontNoReplacementTest();
|
||||
|
||||
bool _replace;
|
||||
};
|
||||
|
||||
class FontReplacementTest : public FontNoReplacementTest
|
||||
{
|
||||
public:
|
||||
static FontReplacementTest* create();
|
||||
virtual std::string title() const override;
|
||||
|
||||
protected:
|
||||
FontReplacementTest();
|
||||
};
|
||||
|
||||
#endif // _FONT_TEST_H_
|
||||
|
|
Loading…
Reference in New Issue