blob: d3efb474cbd6ec2979ec7f7223e3a127d2dfc84e [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 {
Jens Geyeraaa89472014-10-03 20:22:28 +02007 1: double single
8 2: double integer
Jens Geyer6f86f9a2014-07-08 21:31:52 +02009}
10
11struct delegate {
Jens Geyeraaa89472014-10-03 20:22:28 +020012 1: string partial
13 2: delegate delegate
Jens Geyer6f86f9a2014-07-08 21:31:52 +020014}
15
16struct get {
Jens Geyeraaa89472014-10-03 20:22:28 +020017 1: bool sbyte
Jens Geyer6f86f9a2014-07-08 21:31:52 +020018}
19
20struct partial {
Jens Geyeraaa89472014-10-03 20:22:28 +020021 1: using using
henrique2f34da72015-02-05 12:39:34 +110022 2: bool read
23 3: bool write
Jens Geyer6f86f9a2014-07-08 21:31:52 +020024}
25
Roger Meier16c164e2014-08-07 03:09:23 +020026enum 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}
Jens Geyer6f86f9a2014-07-08 21:31:52 +020045
alisdair sullivanca44a622014-08-07 06:32:37 -070046struct ofOf {
47 1: of Of
48}
49
Jens Geyer6f86f9a2014-07-08 21:31:52 +020050
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 {
Jens Geyeraaa89472014-10-03 20:22:28 +020087 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_
Jens Geyer6f86f9a2014-07-08 21:31:52 +020092 6: Nested Nested
93}
94
95exception Problem_ {
96 1: bool problem
97 2: bool Problem
98}
99
100
101service extern {
Jens Geyeraaa89472014-10-03 20:22:28 +0200102 delegate event(1: partial get)
103 void Foo(1: Nested Foo_args) throws (1: Problem_ Foo_result)
Jens Geyer6f86f9a2014-07-08 21:31:52 +0200104}
105
Roger Meier16c164e2014-08-07 03:09:23 +0200106service qualified {
Jens Geyeraaa89472014-10-03 20:22:28 +0200107 Maybe maybe(1: Maybe foldr)
108 Either either(1: foldr of)
Roger Meier16c164e2014-08-07 03:09:23 +0200109}
Jens Geyer6f86f9a2014-07-08 21:31:52 +0200110// eof