xref: /haiku/src/tests/kits/app/bmessage/MessageInt64ItemTest.h (revision 1deede7388b04dbeec5af85cae7164735ea9e70d)
1 //------------------------------------------------------------------------------
2 //	MessageInt64ItemTest.h
3 //
4 //------------------------------------------------------------------------------
5 
6 #ifndef MESSAGEINT64ITEMTEST_H
7 #define MESSAGEINT64ITEMTEST_H
8 
9 // Standard Includes -----------------------------------------------------------
10 
11 // System Includes -------------------------------------------------------------
12 
13 // Project Includes ------------------------------------------------------------
14 
15 // Local Includes --------------------------------------------------------------
16 #include "MessageItemTest.h"
17 
18 // Local Defines ---------------------------------------------------------------
19 
20 // Globals ---------------------------------------------------------------------
21 
22 typedef TMessageItemFuncPolicy
23 <
24 	int64,
25 	&BMessage::AddInt64,
26 	&BMessage::FindInt64,
27 	&BMessage::FindInt64,
28 	&BMessage::FindInt64,
29 	&BMessage::HasInt64,
30 	&BMessage::ReplaceInt64
31 >
32 TInt64FuncPolicy;
33 
34 struct TInt64InitPolicy : public ArrayTypeBase<int64>
35 {
36 	inline static int64 Zero()	{ return 0; }
37 	inline static int64 Test1()	{ return 1234; }
38 	inline static int64 Test2()	{ return 5678; }
39 	inline static size_t SizeOf(const int64&)	{ return sizeof (int64); }
40 	inline static ArrayType Array()
41 	{
42 		ArrayType array;
43 		array.push_back(123);
44 		array.push_back(456);
45 		array.push_back(789);
46 		return array;
47 	}
48 };
49 
50 typedef TMessageItemAssertPolicy
51 <
52 	int64
53 >
54 TInt64AssertPolicy;
55 
56 typedef TMessageItemTest
57 <
58 	int64,
59 	B_INT64_TYPE,
60 	TInt64FuncPolicy,
61 	TInt64InitPolicy,
62 	TInt64AssertPolicy
63 >
64 TMessageInt64ItemTest;
65 
66 #endif	// MESSAGEINT64ITEMTEST_H
67 
68 /*
69  * $Log $
70  *
71  * $Id  $
72  *
73  */
74 
75