blob: e5140ddd6489869cb5e0415468a475eeeaddc46b [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
Jens Geyer6f86f9a2014-07-08 21:31:52 +020022}
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 {
Jens Geyeraaa89472014-10-03 20:22:28 +020085 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_
Jens Geyer6f86f9a2014-07-08 21:31:52 +020090 6: Nested Nested
91}
92
93exception Problem_ {
94 1: bool problem
95 2: bool Problem
96}
97
98
99service extern {
Jens Geyeraaa89472014-10-03 20:22:28 +0200100 delegate event(1: partial get)
101 void Foo(1: Nested Foo_args) throws (1: Problem_ Foo_result)
Jens Geyer6f86f9a2014-07-08 21:31:52 +0200102}
103
Roger Meier16c164e2014-08-07 03:09:23 +0200104service qualified {
Jens Geyeraaa89472014-10-03 20:22:28 +0200105 Maybe maybe(1: Maybe foldr)
106 Either either(1: foldr of)
Roger Meier16c164e2014-08-07 03:09:23 +0200107}
Jens Geyer6f86f9a2014-07-08 21:31:52 +0200108// eof