blob: 4960f548026ac221f4ce66a4e32cbf7b3e01977f [file] [log] [blame]
Jens Geyer6f86f9a2014-07-08 21:31:52 +02001// Naming testcases, sepcifically for these tickets (but not limited to them)
2// THRIFT-2508 Uncompileable C# code due to language keywords in IDL
3// THRIFT-2557 error CS0542 member names cannot be the same as their enclosing type
4
5
6struct using {
7 1: double single
8 2: double integer
9}
10
11struct delegate {
12 1: string partial
13 2: delegate delegate
14}
15
16struct get {
17 1: bool sbyte
18}
19
20struct partial {
21 1: using using
22}
23
Roger Meier16c164e2014-08-07 03:09:23 +020024enum Maybe {
25 JUST = 1,
26 TRUE = 2,
27 FALSE = 3
28}
29
30enum Either {
31 LEFT = 1,
32 RIGHT = 2
33}
34
35struct foldr {
36 1: string id
37}
38
39struct of {
40 1: string let
41 2: string where
42}
Jens Geyer6f86f9a2014-07-08 21:31:52 +020043
alisdair sullivanca44a622014-08-07 06:32:37 -070044struct ofOf {
45 1: of Of
46}
47
Jens Geyer6f86f9a2014-07-08 21:31:52 +020048
49struct ClassAndProp {
50 1: bool ClassAndProp
51 2: bool ClassAndProp_
52 3: bool ClassAndProp__
53 4: bool ClassAndProper
54}
55
56struct second_chance {
57 1: bool SECOND_CHANCE
58 2: bool SECOND_CHANCE_
59 3: bool SECOND_CHANCE__
60 4: bool SECOND_CHANCES
61}
62
63struct NOW_EAT_THIS {
64 1: bool now_eat_this
65 2: bool now_eat_this_
66 3: bool now_eat_this__
67 4: bool now_eat_this_and_this
68}
69
70struct TheEdgeCase {
71 1: bool theEdgeCase
72 2: bool theEdgeCase_
73 3: bool theEdgeCase__
74 4: bool TheEdgeCase
75 5: bool TheEdgeCase_
76 6: bool TheEdgeCase__
77}
78
79struct Tricky_ {
80 1: bool tricky
81 2: bool Tricky
82}
83
84struct Nested {
85 1: ClassAndProp ClassAndProp
86 2: second_chance second_chance
87 3: NOW_EAT_THIS NOW_EAT_THIS
88 4: TheEdgeCase TheEdgeCase
89 5: Tricky_ Tricky_
90 6: Nested Nested
91}
92
93exception Problem_ {
94 1: bool problem
95 2: bool Problem
96}
97
98
99service extern {
100 delegate event(1: partial get)
101 void Foo(1: Nested Foo_args) throws (1: Problem_ Foo_result)
102}
103
Roger Meier16c164e2014-08-07 03:09:23 +0200104service qualified {
105 Maybe maybe(1: Maybe foldr)
106 Either either(1: foldr of)
107}
Jens Geyer6f86f9a2014-07-08 21:31:52 +0200108// eof