1// FileTest.h
2
3#ifndef __sk_file_test_h__
4#define __sk_file_test_h__
5
6#include "NodeTest.h"
7
8class FileTest : public NodeTest
9{
10public:
11	static Test* Suite();
12
13	virtual void CreateRONodes(TestNodes& testEntries);
14	virtual void CreateRWNodes(TestNodes& testEntries);
15	virtual void CreateUninitializedNodes(TestNodes& testEntries);
16
17	// This function called before *each* test added in Suite()
18	void setUp();
19
20	// This function called after *each* test added in Suite()
21	void tearDown();
22
23	// test methods
24
25	void InitTest1();
26	void InitTest2();
27	void RWAbleTest();
28	void RWTest();
29	void PositionTest();
30	void SizeTest();
31	void AssignmentTest();
32
33	// helper functions
34
35	struct InitTestCase {
36		const char *	filename;
37		uint32			rwmode;
38		uint32			createFile;
39		uint32			failIfExists;
40		uint32			eraseFile;
41		bool			removeAfterTest;
42		status_t		initCheck;
43	};
44
45	static	const InitTestCase	initTestCases[];
46	static	const int32			initTestCasesCount;
47};
48
49#endif	// __sk_file_test_h__
50