blob: 6f722160487dd611314d121dc8e1f46813fe2f05 [file] [log] [blame]
Mark Sleee8540632006-05-30 09:24:40 +00001enum Numberz
2{
3 ONE = 1,
4 TWO,
5 THREE,
6 FIVE = 5,
7 SIX,
8 EIGHT = 8
9}
10
Mark Slee6e536442006-06-30 18:28:50 +000011typedef i64 UserId
Mark Sleee8540632006-05-30 09:24:40 +000012
13struct Xtruct
14{
15 string string_thing = 0,
16 byte byte_thing = 1,
Mark Sleee8540632006-05-30 09:24:40 +000017 i32 i32_thing = 3,
Mark Sleee8540632006-05-30 09:24:40 +000018 i64 i64_thing = 5
19}
20
21struct Xtruct2
22{
23 byte byte_thing = 0,
24 Xtruct struct_thing = 1,
25 i32 i32_thing = 2
26}
27
28struct Insanity
29{
30 map<Numberz, UserId> userMap = 0,
31 list<Xtruct> xtructs = 1
32}
33
34service ThriftTest
35{
36 void testVoid()
37 string testString(string thing = 0)
38 byte testByte(byte thing = 0)
Mark Sleee8540632006-05-30 09:24:40 +000039 i32 testI32(i32 thing = 0)
Mark Sleee8540632006-05-30 09:24:40 +000040 i64 testI64(i64 thing = 0)
41 Xtruct testStruct(Xtruct thing = 0)
42 Xtruct2 testNest(Xtruct2 thing = 0)
43 map<i32,i32> testMap(map<i32,i32> thing = 0)
44 set<i32> testSet(set<i32> thing = 0)
45 list<i32> testList(list<i32> thing = 0)
46 Numberz testEnum(Numberz thing = 0)
47 UserId testTypedef(UserId thing = 0)
48
49 map<i32,map<i32,i32>> testMapMap(i32 hello = 0)
50
51 /* So you think you've got this all worked, out eh? */
52 map<UserId, map<Numberz,Insanity>> testInsanity(Insanity argument = 0)
53}