vfs: check userland buffers before reading them.
[haiku.git] / src / tests / kits / app / bmessage / MessageInt16ItemTest.h
blob4f8cdb27198e4536a5c6a13876f7d5c31002a3a5
1 //------------------------------------------------------------------------------
2 // MessageInt16ItemTest.h
3 //
4 //------------------------------------------------------------------------------
6 #ifndef MESSAGEINT16ITEMTEST_H
7 #define MESSAGEINT16ITEMTEST_H
9 // Standard Includes -----------------------------------------------------------
11 // System Includes -------------------------------------------------------------
13 // Project Includes ------------------------------------------------------------
15 // Local Includes --------------------------------------------------------------
16 #include "MessageItemTest.h"
18 // Local Defines ---------------------------------------------------------------
20 // Globals ---------------------------------------------------------------------
22 typedef TMessageItemFuncPolicy
24 int16,
25 &BMessage::AddInt16,
26 &BMessage::FindInt16,
27 &BMessage::FindInt16,
28 &BMessage::FindInt16,
29 &BMessage::HasInt16,
30 &BMessage::ReplaceInt16
32 TInt16FuncPolicy;
34 struct TInt16InitPolicy : public ArrayTypeBase<int16>
36 inline static int16 Zero() { return 0; }
37 inline static int16 Test1() { return 1234; }
38 inline static int16 Test2() { return 5678; }
39 inline static size_t SizeOf(const int16&) { return sizeof (int16); }
40 inline static ArrayType Array()
42 ArrayType array;
43 array.push_back(123);
44 array.push_back(456);
45 array.push_back(789);
46 return array;
50 typedef TMessageItemAssertPolicy
52 int16
54 TInt16AssertPolicy;
56 typedef TMessageItemTest
58 int16,
59 B_INT16_TYPE,
60 TInt16FuncPolicy,
61 TInt16InitPolicy,
62 TInt16AssertPolicy
64 TMessageInt16ItemTest;
67 #endif // MESSAGEINT16ITEMTEST_H
70 * $Log $
72 * $Id $