2013-01-28 15:17:20 +08:00
|
|
|
#ifndef __FILEUTILSTEST_H__
|
|
|
|
#define __FILEUTILSTEST_H__
|
|
|
|
|
|
|
|
#include "../testBasic.h"
|
2013-06-07 08:12:28 +08:00
|
|
|
#include "../BaseTest.h"
|
|
|
|
|
2013-01-28 15:17:20 +08:00
|
|
|
USING_NS_CC;
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class FileUtilsTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
2013-06-07 08:12:28 +08:00
|
|
|
class FileUtilsDemo : public BaseTest
|
2013-01-28 15:17:20 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual string title();
|
|
|
|
virtual string subtitle();
|
2013-07-26 06:53:24 +08:00
|
|
|
void backCallback(Object* sender);
|
|
|
|
void nextCallback(Object* sender);
|
|
|
|
void restartCallback(Object* 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);
|
|
|
|
|
2013-01-28 15:17:20 +08:00
|
|
|
virtual void onEnter();
|
|
|
|
virtual void onExit();
|
|
|
|
virtual string title();
|
|
|
|
virtual string subtitle();
|
|
|
|
private:
|
2013-06-15 14:03:30 +08:00
|
|
|
vector<string> _defaultSearchPathArray;
|
|
|
|
vector<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);
|
|
|
|
|
2013-01-28 15:17:20 +08:00
|
|
|
virtual void onEnter();
|
|
|
|
virtual void onExit();
|
|
|
|
virtual string title();
|
|
|
|
virtual string subtitle();
|
|
|
|
private:
|
2013-06-15 14:03:30 +08:00
|
|
|
vector<string> _defaultSearchPathArray;
|
|
|
|
vector<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);
|
|
|
|
|
2013-01-28 15:17:20 +08:00
|
|
|
virtual void onEnter();
|
|
|
|
virtual void onExit();
|
|
|
|
virtual string title();
|
|
|
|
virtual string subtitle();
|
|
|
|
};
|
|
|
|
|
2013-02-01 22:18:43 +08:00
|
|
|
class TestIsFileExist : public FileUtilsDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 07:55:36 +08:00
|
|
|
CREATE_FUNC(TestIsFileExist);
|
|
|
|
|
2013-02-01 22:18:43 +08:00
|
|
|
virtual void onEnter();
|
|
|
|
virtual void onExit();
|
|
|
|
virtual string title();
|
|
|
|
virtual string subtitle();
|
|
|
|
};
|
2013-01-28 15:17:20 +08:00
|
|
|
|
2013-04-28 00:36:37 +08:00
|
|
|
class TextWritePlist : public FileUtilsDemo
|
|
|
|
{
|
|
|
|
public:
|
2013-11-14 07:55:36 +08:00
|
|
|
CREATE_FUNC(TextWritePlist);
|
|
|
|
|
2013-04-28 00:36:37 +08:00
|
|
|
virtual void onEnter();
|
|
|
|
virtual void onExit();
|
|
|
|
virtual string title();
|
|
|
|
virtual string subtitle();
|
|
|
|
};
|
|
|
|
|
2013-01-28 15:17:20 +08:00
|
|
|
#endif /* __FILEUTILSTEST_H__ */
|