PuzzleSDK
FileUtilsTest.h
浏览该文件的文档.
1/****************************************************************************
2 Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
3
4 http://www.cocos2d-x.org
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 ****************************************************************************/
24
25#ifndef __FILEUTILSTEST_H__
26#define __FILEUTILSTEST_H__
27
28#include "../BaseTest.h"
29
30
31DEFINE_TEST_SUITE(FileUtilsTests);
32
33class FileUtilsDemo : public TestCase
34{
35public:
36};
37
39{
40public:
42
43 virtual void onEnter() override;
44 virtual void onExit() override;
45 virtual std::string title() const override;
46 virtual std::string subtitle() const override;
47private:
48 std::vector<std::string> _defaultSearchPathArray;
49 std::vector<std::string> _defaultResolutionsOrderArray;
50};
51
53{
54public:
56
57 virtual void onEnter() override;
58 virtual void onExit() override;
59 virtual std::string title() const override;
60 virtual std::string subtitle() const override;
61private:
62 std::vector<std::string> _defaultSearchPathArray;
63 std::vector<std::string> _defaultResolutionsOrderArray;
64};
65
67{
68public:
70
71 virtual void onEnter() override;
72 virtual void onExit() override;
73 virtual std::string title() const override;
74};
75
77{
78public:
80
81 virtual void onEnter() override;
82 virtual void onExit() override;
83 virtual std::string title() const override;
84 virtual std::string subtitle() const override;
85};
86
88{
89public:
91
92 virtual void onEnter() override;
93 virtual void onExit() override;
94 virtual std::string title() const override;
95 virtual std::string subtitle() const override;
96};
97
99{
100public:
102
103 virtual void onEnter() override;
104 virtual std::string title() const override;
105 virtual std::string subtitle() const override;
106};
107
109{
110public:
112
113 virtual void onEnter() override;
114 virtual std::string title() const override;
115 virtual std::string subtitle() const override;
116};
117
119{
120public:
122
123 virtual void onEnter() override;
124 virtual void onExit() override;
125 virtual std::string title() const override;
126 virtual std::string subtitle() const override;
127};
128
130{
131public:
133
134 virtual void onEnter() override;
135 virtual void onExit() override;
136 virtual std::string title() const override;
137 virtual std::string subtitle() const override;
138private:
139 std::string _generatedFile;
140};
141
143{
144public:
146
147 virtual void onEnter() override;
148 virtual void onExit() override;
149 virtual std::string title() const override;
150 virtual std::string subtitle() const override;
151};
152
154{
155public:
157
158 virtual void onEnter() override;
159 virtual void onExit() override;
160 virtual std::string title() const override;
161 virtual std::string subtitle() const override;
162};
163
165{
166public:
168
169 virtual void onEnter() override;
170 virtual void onExit() override;
171 virtual std::string title() const override;
172 virtual std::string subtitle() const override;
173};
174
176{
177public:
179
180 virtual void onEnter() override;
181 virtual void onExit() override;
182 virtual std::string title() const override;
183 virtual std::string subtitle() const override;
184};
185
187{
188public:
190
191 virtual void onEnter() override;
192 virtual void onExit() override;
193 virtual std::string title() const override;
194 virtual std::string subtitle() const override;
195};
196
198{
199public:
201
202 virtual void onEnter() override;
203 virtual void onExit() override;
204 virtual std::string title() const override;
205 virtual std::string subtitle() const override;
206};
207
209{
210public:
212
213 virtual void onEnter() override;
214 virtual std::string title() const override;
215 virtual std::string subtitle() const override;
216};
217
219{
220public:
222
223 virtual void onEnter() override;
224 virtual std::string title() const override;
225 virtual std::string subtitle() const override;
226};
227
229{
230public:
232
233 virtual void onEnter() override;
234 virtual void onExit() override;
235 virtual std::string title() const override;
236 virtual std::string subtitle() const override;
237};
238
240{
241public:
243
244 virtual void onEnter() override;
245 virtual void onExit() override;
246 virtual std::string title() const override;
247 virtual std::string subtitle() const override;
248};
249
251{
252public:
254
255 virtual void onEnter() override;
256 virtual void onExit() override;
257 virtual std::string title() const override;
258 virtual std::string subtitle() const override;
259};
260
262{
263public:
265
266 virtual void onEnter() override;
267 virtual void onExit() override;
268 virtual std::string title() const override;
269 virtual std::string subtitle() const override;
270};
271
272#endif /* __FILEUTILSTEST_H__ */
DEFINE_TEST_SUITE(FileUtilsTests)
CREATE_FUNC(TestDirectoryFuncsAsync)
virtual void onEnter() override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual void onEnter() override
CREATE_FUNC(TestDirectoryFuncs)
virtual std::string subtitle() const override
CREATE_FUNC(TestFileFuncsAsync)
virtual std::string title() const override
virtual void onEnter() override
virtual void onEnter() override
CREATE_FUNC(TestFileFuncs)
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual void onExit() override
virtual void onEnter() override
CREATE_FUNC(TestFilenameLookup)
std::string _generatedFile
virtual std::string title() const override
virtual std::string subtitle() const override
virtual void onExit() override
CREATE_FUNC(TestGetContents)
virtual void onEnter() override
virtual void onEnter() override
virtual void onExit() override
virtual std::string title() const override
virtual std::string subtitle() const override
CREATE_FUNC(TestIsDirectoryExistAsync)
virtual std::string title() const override
CREATE_FUNC(TestIsDirectoryExist)
virtual void onEnter() override
virtual void onExit() override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual void onEnter() override
virtual void onExit() override
virtual std::string subtitle() const override
CREATE_FUNC(TestIsFileExistAsync)
virtual std::string title() const override
virtual void onEnter() override
virtual void onExit() override
virtual std::string subtitle() const override
CREATE_FUNC(TestIsFileExist)
virtual void onEnter() override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual void onExit() override
CREATE_FUNC(TestIsFileExistRejectFolder)
virtual std::string title() const override
virtual void onEnter() override
virtual void onExit() override
virtual std::string subtitle() const override
CREATE_FUNC(TestListFiles)
std::vector< std::string > _defaultResolutionsOrderArray
Definition: FileUtilsTest.h:49
virtual std::string subtitle() const override
CREATE_FUNC(TestResolutionDirectories)
std::vector< std::string > _defaultSearchPathArray
Definition: FileUtilsTest.h:48
virtual std::string title() const override
virtual void onExit() override
virtual void onEnter() override
CREATE_FUNC(TestSearchPath)
virtual std::string title() const override
std::vector< std::string > _defaultSearchPathArray
Definition: FileUtilsTest.h:62
std::vector< std::string > _defaultResolutionsOrderArray
Definition: FileUtilsTest.h:63
virtual void onEnter() override
virtual std::string subtitle() const override
virtual void onExit() override
virtual std::string subtitle() const override
CREATE_FUNC(TestUnicodePath)
virtual std::string title() const override
virtual void onExit() override
virtual void onEnter() override
virtual void onExit() override
virtual void onEnter() override
virtual std::string title() const override
virtual std::string subtitle() const override
CREATE_FUNC(TestWriteDataAsync)
virtual void onExit() override
CREATE_FUNC(TestWriteData)
virtual std::string subtitle() const override
virtual void onEnter() override
virtual std::string title() const override
virtual void onExit() override
CREATE_FUNC(TestWriteStringAsync)
virtual std::string subtitle() const override
virtual void onEnter() override
virtual std::string title() const override
virtual void onExit() override
virtual std::string subtitle() const override
virtual void onEnter() override
virtual std::string title() const override
CREATE_FUNC(TestWriteString)
virtual std::string title() const override
virtual void onEnter() override
virtual std::string subtitle() const override
CREATE_FUNC(TestWriteValueMap)
virtual void onExit() override
virtual std::string subtitle() const override
virtual void onExit() override
virtual std::string title() const override
CREATE_FUNC(TestWriteValueVector)
virtual void onEnter() override