blob: 337be07e7b72aa5036b621cd19b36dbd101d64ba [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
Jens Geyercc4ac492014-10-01 21:13:39 +020079struct theEdgeCase {
80 1: bool theEdgeCase
81 2: bool theEdgeCase_
82 3: bool theEdgeCase__
83 4: bool TheEdgeCase
84 5: bool TheEdgeCase_
85 6: bool TheEdgeCase__
86}
87
Jens Geyer6f86f9a2014-07-08 21:31:52 +020088struct Tricky_ {
89 1: bool tricky
90 2: bool Tricky
91}
92
93struct Nested {
Jens Geyeraaa89472014-10-03 20:22:28 +020094 1: ClassAndProp ClassAndProp
95 2: second_chance second_chance
96 3: NOW_EAT_THIS NOW_EAT_THIS
97 4: TheEdgeCase TheEdgeCase
98 5: Tricky_ Tricky_
Jens Geyer6f86f9a2014-07-08 21:31:52 +020099 6: Nested Nested
100}
101
102exception Problem_ {
103 1: bool problem
104 2: bool Problem
105}
106
107
108service extern {
Jens Geyeraaa89472014-10-03 20:22:28 +0200109 delegate event(1: partial get)
110 void Foo(1: Nested Foo_args) throws (1: Problem_ Foo_result)
Jens Geyer6f86f9a2014-07-08 21:31:52 +0200111}
112
Roger Meier16c164e2014-08-07 03:09:23 +0200113service qualified {
Jens Geyeraaa89472014-10-03 20:22:28 +0200114 Maybe maybe(1: Maybe foldr)
115 Either either(1: foldr of)
Roger Meier16c164e2014-08-07 03:09:23 +0200116}
Jens Geyer6f86f9a2014-07-08 21:31:52 +0200117// eof