blob: 7130d8a4013bfbf4fc90f414284bd6873832913d [file] [log] [blame]
Jens Geyer154d1542022-09-10 14:30:15 +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 2: bool read
23 3: bool write
24}
25
26enum Maybe {
27 JUST = 1,
28 TRUE = 2,
29 FALSE = 3
30}
31
32enum Either {
33 LEFT = 1,
34 RIGHT = 2
35}
36
37struct foldr {
38 1: string id
39}
40
41struct of {
42 1: string let
43 2: string where
44}
45
46struct ofOf {
47 1: of Of
48}
49
50
51struct ClassAndProp {
52 1: bool ClassAndProp
53 2: bool ClassAndProp_
54 3: bool ClassAndProp__
55 4: bool ClassAndProper
56}
57
58struct second_chance {
59 1: bool SECOND_CHANCE
60 2: bool SECOND_CHANCE_
61 3: bool SECOND_CHANCE__
62 4: bool SECOND_CHANCES
63}
64
65struct NOW_EAT_THIS {
66 1: bool now_eat_this
67 2: bool now_eat_this_
68 3: bool now_eat_this__
69 4: bool now_eat_this_and_this
70}
71
72struct TheEdgeCase {
73 1: bool theEdgeCase
74 2: bool theEdgeCase_
75 3: bool theEdgeCase__
76 4: bool TheEdgeCase
77 5: bool TheEdgeCase_
78 6: bool TheEdgeCase__
79}
80
81struct Tricky_ {
82 1: bool tricky
83 2: bool Tricky
84}
85
86struct Nested {
87 1: ClassAndProp ClassAndProp
88 2: second_chance second_chance
89 3: NOW_EAT_THIS NOW_EAT_THIS
90 4: TheEdgeCase TheEdgeCase
91 5: Tricky_ Tricky_
92 6: Nested Nested
93}
94
95exception Problem_ {
96 1: bool problem
97 2: bool Problem
98}
99
100struct Thrift5626 {
101 1: i8 i8
102 2: i16 i16
103 3: i32 i32
104 4: i64 i64
105 //5: uuid uuid
106 6: string string
107 7: binary binary
108 8: bool bool
109 9: byte byte
110 10: list<string> list
111 11: set<string> set
112 12: map<string,string> map
113}
114
115service extern {
116 delegate event(1: partial get)
117 void Foo(1: Nested Foo_args) throws (1: Problem_ Foo_result)
118}
119
120service qualified {
121 Maybe maybe(1: Maybe foldr)
122 Either either(1: foldr of)
123}
124// eof