axmol/tests/cpp-tests/Classes/FileUtilsTest/FileUtilsTest.h

107 lines
2.5 KiB
C
Raw Normal View History

2013-01-28 15:17:20 +08:00
#ifndef __FILEUTILSTEST_H__
#define __FILEUTILSTEST_H__
#include "../testBasic.h"
#include "../BaseTest.h"
2013-01-28 15:17:20 +08:00
USING_NS_CC;
class FileUtilsTestScene : public TestScene
{
public:
virtual void runThisTest();
};
class FileUtilsDemo : public BaseTest
2013-01-28 15:17:20 +08:00
{
public:
virtual void onEnter() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
void backCallback(Ref* sender);
void nextCallback(Ref* sender);
void restartCallback(Ref* sender);
2013-01-28 15:17:20 +08:00
};
class TestResolutionDirectories : public FileUtilsDemo
{
public:
2013-11-14 07:55:36 +08:00
CREATE_FUNC(TestResolutionDirectories);
virtual void onEnter() override;
virtual void onExit() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
2013-01-28 15:17:20 +08:00
private:
std::vector<std::string> _defaultSearchPathArray;
std::vector<std::string> _defaultResolutionsOrderArray;
2013-01-28 15:17:20 +08:00
};
class TestSearchPath : public FileUtilsDemo
{
public:
2013-11-14 07:55:36 +08:00
CREATE_FUNC(TestSearchPath);
virtual void onEnter() override;
virtual void onExit() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
2013-01-28 15:17:20 +08:00
private:
std::vector<std::string> _defaultSearchPathArray;
std::vector<std::string> _defaultResolutionsOrderArray;
2013-01-28 15:17:20 +08:00
};
class TestFilenameLookup : public FileUtilsDemo
{
public:
2013-11-14 07:55:36 +08:00
CREATE_FUNC(TestFilenameLookup);
virtual void onEnter() override;
virtual void onExit() override;
virtual std::string title() const override;
2013-01-28 15:17:20 +08:00
};
class TestIsFileExist : public FileUtilsDemo
{
public:
2013-11-14 07:55:36 +08:00
CREATE_FUNC(TestIsFileExist);
virtual void onEnter() override;
virtual void onExit() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
2013-01-28 15:17:20 +08:00
class TestFileFuncs : public FileUtilsDemo
{
public:
CREATE_FUNC(TestFileFuncs);
virtual void onEnter() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class TestDirectoryFuncs : public FileUtilsDemo
{
public:
CREATE_FUNC(TestDirectoryFuncs);
virtual void onEnter() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
class TextWritePlist : public FileUtilsDemo
{
public:
2013-11-14 07:55:36 +08:00
CREATE_FUNC(TextWritePlist);
virtual void onEnter() override;
virtual void onExit() override;
virtual std::string title() const override;
virtual std::string subtitle() const override;
};
2013-01-28 15:17:20 +08:00
#endif /* __FILEUTILSTEST_H__ */