xref: /haiku/src/tests/kits/storage/QueryTest.h (revision 17889a8c70dbb3d59c1412f6431968753c767bab)
1 // QueryTest.h
2 
3 #ifndef __sk_query_test_h__
4 #define __sk_query_test_h__
5 
6 #include <cppunit/TestCaller.h>
7 #include <cppunit/TestSuite.h>
8 
9 #include <StorageDefs.h>
10 #include <SupportDefs.h>
11 
12 #include "BasicTest.h"
13 
14 class QueryTestEntry;
15 class BTestApp;
16 
17 class QueryTest : public BasicTest
18 {
19 public:
20 	static CppUnit::Test* Suite();
21 
22 	// This function is called before *each* test added in Suite()
23 	void setUp();
24 
25 	// This function is called after *each* test added in Suite()
26 	void tearDown();
27 
28 	//------------------------------------------------------------
29 	// Test functions
30 	//------------------------------------------------------------
31 	void PredicateTest();
32 	void ParameterTest();
33 	void FetchTest();
34 	void AddLiveEntries(QueryTestEntry **entries, int32 entryCount,
35 						QueryTestEntry **queryEntries, int32 queryEntryCount);
36 	void RemoveLiveEntries(QueryTestEntry **entries, int32 entryCount,
37 						   QueryTestEntry **queryEntries,
38 						   int32 queryEntryCount);
39 	void CheckUpdateMessages(uint32 opcode, QueryTestEntry **entries,
40 							 int32 entryCount);
41 	void LiveTest();
42 
43 private:
44 	BTestApp	*fApplication;
45 	bool		fVolumeCreated;
46 };
47 
48 #endif	// __sk_query_test_h__
49 
50 
51 
52 
53