alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 1 | %% |
| 2 | %% Licensed to the Apache Software Foundation (ASF) under one |
| 3 | %% or more contributor license agreements. See the NOTICE file |
| 4 | %% distributed with this work for additional information |
| 5 | %% regarding copyright ownership. The ASF licenses this file |
| 6 | %% to you under the Apache License, Version 2.0 (the |
| 7 | %% "License"); you may not use this file except in compliance |
| 8 | %% with the License. You may obtain a copy of the License at |
| 9 | %% |
| 10 | %% http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | %% |
| 12 | %% Unless required by applicable law or agreed to in writing, |
| 13 | %% software distributed under the License is distributed on an |
| 14 | %% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | %% KIND, either express or implied. See the License for the |
| 16 | %% specific language governing permissions and limitations |
| 17 | %% under the License. |
| 18 | %% |
| 19 | |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 20 | -module(name_conflict_test). |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 21 | -compile(export_all). |
| 22 | |
| 23 | -include_lib("eunit/include/eunit.hrl"). |
| 24 | |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 25 | -include("name_conflict_test_constants.hrl"). |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 26 | |
| 27 | record_generation_test_() -> |
| 28 | [ |
| 29 | {"using record", ?_assertMatch( |
| 30 | {using, _, _}, |
| 31 | #using{single=null,integer=null} |
| 32 | )}, |
| 33 | {"delegate record", ?_assertMatch( |
| 34 | {delegate, _, _}, |
| 35 | #delegate{partial=null,delegate=null} |
| 36 | )}, |
| 37 | {"get record", ?_assertMatch( |
| 38 | {get, _}, |
| 39 | #get{sbyte=null} |
| 40 | )}, |
| 41 | {"partial record", ?_assertMatch( |
| 42 | {partial, _}, |
| 43 | #partial{using=null} |
| 44 | )}, |
| 45 | {"ClassAndProp record", ?_assertMatch( |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 46 | {'ClassAndProp', _, _, _, _}, |
| 47 | #'ClassAndProp'{ |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 48 | 'ClassAndProp'=null, |
| 49 | 'ClassAndProp_'=null, |
| 50 | 'ClassAndProp__'=null, |
| 51 | 'ClassAndProper'=null |
| 52 | } |
| 53 | )}, |
| 54 | {"second_chance record", ?_assertMatch( |
| 55 | {second_chance, _, _, _, _}, |
| 56 | #second_chance{ |
| 57 | 'SECOND_CHANCE'=null, |
| 58 | 'SECOND_CHANCE_'=null, |
| 59 | 'SECOND_CHANCE__'=null, |
| 60 | 'SECOND_CHANCES'=null |
| 61 | } |
| 62 | )}, |
| 63 | {"NOW_EAT_THIS record", ?_assertMatch( |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 64 | {'NOW_EAT_THIS', _, _, _, _}, |
| 65 | #'NOW_EAT_THIS'{ |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 66 | now_eat_this=null, |
| 67 | now_eat_this_=null, |
| 68 | now_eat_this__=null, |
| 69 | now_eat_this_and_this=null |
| 70 | } |
| 71 | )}, |
| 72 | {"TheEdgeCase record", ?_assertMatch( |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 73 | {'TheEdgeCase', _, _, _, _, _, _}, |
| 74 | #'TheEdgeCase'{ |
| 75 | theEdgeCase=null, |
| 76 | theEdgeCase_=null, |
| 77 | theEdgeCase__=null, |
| 78 | 'TheEdgeCase'=null, |
| 79 | 'TheEdgeCase_'=null, |
| 80 | 'TheEdgeCase__'=null |
| 81 | } |
| 82 | )}, |
| 83 | {"theEdgeCase record", ?_assertMatch( |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 84 | {theEdgeCase, _, _, _, _, _, _}, |
| 85 | #theEdgeCase{ |
| 86 | theEdgeCase=null, |
| 87 | theEdgeCase_=null, |
| 88 | theEdgeCase__=null, |
| 89 | 'TheEdgeCase'=null, |
| 90 | 'TheEdgeCase_'=null, |
| 91 | 'TheEdgeCase__'=null |
| 92 | } |
| 93 | )}, |
| 94 | {"Tricky_ record", ?_assertMatch( |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 95 | {'Tricky_', _, _}, |
| 96 | #'Tricky_'{tricky=null,'Tricky'=null} |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 97 | )}, |
| 98 | {"Nested record", ?_assertMatch( |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 99 | {'Nested', _, _, _, _, _, _}, |
| 100 | #'Nested'{ |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 101 | 'ClassAndProp'=null, |
| 102 | second_chance=null, |
| 103 | 'NOW_EAT_THIS'=null, |
| 104 | 'TheEdgeCase'=null, |
| 105 | 'Tricky_'=null, |
| 106 | 'Nested'=null |
| 107 | } |
| 108 | )}, |
| 109 | {"Problem_ record", ?_assertMatch( |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 110 | {'Problem_', _, _}, |
| 111 | #'Problem_'{problem=null,'Problem'=null} |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 112 | )} |
| 113 | ]. |
| 114 | |
| 115 | struct_info_test_() -> |
| 116 | [ |
| 117 | {"using definition", ?_assertEqual( |
| 118 | {struct, [{1, double},{2, double}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 119 | name_conflict_test_types:struct_info(using) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 120 | )}, |
| 121 | {"delegate definition", ?_assertEqual( |
| 122 | {struct, [ |
| 123 | {1, string}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 124 | {2, {struct, {name_conflict_test_types, delegate}}} |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 125 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 126 | name_conflict_test_types:struct_info(delegate) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 127 | )}, |
| 128 | {"get definition", ?_assertEqual( |
| 129 | {struct, [{1, bool}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 130 | name_conflict_test_types:struct_info(get) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 131 | )}, |
| 132 | {"partial definition", ?_assertEqual( |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 133 | {struct, [{1, {struct, {name_conflict_test_types, using}}}]}, |
| 134 | name_conflict_test_types:struct_info(partial) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 135 | )}, |
| 136 | {"ClassAndProp definition", ?_assertEqual( |
| 137 | {struct, [{1, bool},{2, bool},{3, bool},{4, bool}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 138 | name_conflict_test_types:struct_info('ClassAndProp') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 139 | )}, |
| 140 | {"second_chance definition", ?_assertEqual( |
| 141 | {struct, [{1, bool},{2, bool},{3, bool},{4, bool}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 142 | name_conflict_test_types:struct_info(second_chance) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 143 | )}, |
| 144 | {"NOW_EAT_THIS definition", ?_assertEqual( |
| 145 | {struct, [{1, bool},{2, bool},{3, bool},{4, bool}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 146 | name_conflict_test_types:struct_info('NOW_EAT_THIS') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 147 | )}, |
| 148 | {"TheEdgeCase definition", ?_assertEqual( |
| 149 | {struct, [{1, bool},{2, bool},{3, bool},{4, bool},{5, bool},{6, bool}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 150 | name_conflict_test_types:struct_info('TheEdgeCase') |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 151 | )}, |
| 152 | {"theEdgeCase definition", ?_assertEqual( |
| 153 | {struct, [{1, bool},{2, bool},{3, bool},{4, bool},{5, bool},{6, bool}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 154 | name_conflict_test_types:struct_info(theEdgeCase) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 155 | )}, |
| 156 | {"Tricky_ definition", ?_assertEqual( |
| 157 | {struct, [{1, bool},{2, bool}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 158 | name_conflict_test_types:struct_info('Tricky_') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 159 | )}, |
| 160 | {"Nested definition", ?_assertEqual( |
| 161 | {struct, [ |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 162 | {1, {struct, {name_conflict_test_types, 'ClassAndProp'}}}, |
| 163 | {2, {struct, {name_conflict_test_types, second_chance}}}, |
| 164 | {3, {struct, {name_conflict_test_types, 'NOW_EAT_THIS'}}}, |
| 165 | {4, {struct, {name_conflict_test_types, 'TheEdgeCase'}}}, |
| 166 | {5, {struct, {name_conflict_test_types, 'Tricky_'}}}, |
| 167 | {6, {struct, {name_conflict_test_types, 'Nested'}}} |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 168 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 169 | name_conflict_test_types:struct_info('Nested') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 170 | )}, |
| 171 | {"Problem_ definition", ?_assertEqual( |
| 172 | {struct, [{1, bool},{2, bool}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 173 | name_conflict_test_types:struct_info('Problem_') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 174 | )}, |
| 175 | {"using extended definition", ?_assertEqual( |
| 176 | {struct, [ |
| 177 | {1, undefined, double, single, undefined}, |
| 178 | {2, undefined, double, integer, undefined} |
| 179 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 180 | name_conflict_test_types:struct_info_ext(using) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 181 | )}, |
| 182 | {"delegate extended definition", ?_assertEqual( |
| 183 | {struct, [ |
| 184 | {1, undefined, string, partial, undefined}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 185 | {2, undefined, {struct, {name_conflict_test_types, delegate}}, delegate, undefined} |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 186 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 187 | name_conflict_test_types:struct_info_ext(delegate) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 188 | )}, |
| 189 | {"get extended definition", ?_assertEqual( |
| 190 | {struct, [{1, undefined, bool, sbyte, undefined}]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 191 | name_conflict_test_types:struct_info_ext(get) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 192 | )}, |
| 193 | {"partial extended definition", ?_assertEqual( |
| 194 | {struct, [ |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 195 | {1, undefined, {struct, {name_conflict_test_types, using}}, using, #using{}} |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 196 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 197 | name_conflict_test_types:struct_info_ext(partial) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 198 | )}, |
| 199 | {"ClassAndProp extended definition", ?_assertEqual( |
| 200 | {struct, [ |
| 201 | {1, undefined, bool, 'ClassAndProp', undefined}, |
| 202 | {2, undefined, bool, 'ClassAndProp_', undefined}, |
| 203 | {3, undefined, bool, 'ClassAndProp__', undefined}, |
| 204 | {4, undefined, bool, 'ClassAndProper', undefined} |
| 205 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 206 | name_conflict_test_types:struct_info_ext('ClassAndProp') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 207 | )}, |
| 208 | {"second_chance extended definition", ?_assertEqual( |
| 209 | {struct, [ |
| 210 | {1, undefined, bool, 'SECOND_CHANCE', undefined}, |
| 211 | {2, undefined, bool, 'SECOND_CHANCE_', undefined}, |
| 212 | {3, undefined, bool, 'SECOND_CHANCE__', undefined}, |
| 213 | {4, undefined, bool, 'SECOND_CHANCES', undefined} |
| 214 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 215 | name_conflict_test_types:struct_info_ext(second_chance) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 216 | )}, |
| 217 | {"NOW_EAT_THIS extended definition", ?_assertEqual( |
| 218 | {struct, [ |
| 219 | {1, undefined, bool, now_eat_this, undefined}, |
| 220 | {2, undefined, bool, now_eat_this_, undefined}, |
| 221 | {3, undefined, bool, now_eat_this__, undefined}, |
| 222 | {4, undefined, bool, now_eat_this_and_this, undefined} |
| 223 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 224 | name_conflict_test_types:struct_info_ext('NOW_EAT_THIS') |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 225 | )}, |
| 226 | {"TheEdgeCase extended definition", ?_assertEqual( |
| 227 | {struct, [ |
| 228 | {1, undefined, bool, theEdgeCase, undefined}, |
| 229 | {2, undefined, bool, theEdgeCase_, undefined}, |
| 230 | {3, undefined, bool, theEdgeCase__, undefined}, |
| 231 | {4, undefined, bool, 'TheEdgeCase', undefined}, |
| 232 | {5, undefined, bool, 'TheEdgeCase_', undefined}, |
| 233 | {6, undefined, bool, 'TheEdgeCase__', undefined} |
| 234 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 235 | name_conflict_test_types:struct_info_ext('TheEdgeCase') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 236 | )}, |
| 237 | {"TheEdgeCase extended definition", ?_assertEqual( |
| 238 | {struct, [ |
| 239 | {1, undefined, bool, theEdgeCase, undefined}, |
| 240 | {2, undefined, bool, theEdgeCase_, undefined}, |
| 241 | {3, undefined, bool, theEdgeCase__, undefined}, |
| 242 | {4, undefined, bool, 'TheEdgeCase', undefined}, |
| 243 | {5, undefined, bool, 'TheEdgeCase_', undefined}, |
| 244 | {6, undefined, bool, 'TheEdgeCase__', undefined} |
| 245 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 246 | name_conflict_test_types:struct_info_ext(theEdgeCase) |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 247 | )}, |
| 248 | {"Tricky_ extended definition", ?_assertEqual( |
| 249 | {struct, [ |
| 250 | {1, undefined, bool, tricky, undefined}, |
| 251 | {2, undefined, bool, 'Tricky', undefined} |
| 252 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 253 | name_conflict_test_types:struct_info_ext('Tricky_') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 254 | )}, |
| 255 | {"Nested extended definition", ?_assertEqual( |
| 256 | {struct, [ |
| 257 | {1, undefined, {struct, { |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 258 | name_conflict_test_types, |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 259 | 'ClassAndProp' |
| 260 | }}, 'ClassAndProp', #'ClassAndProp'{}}, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 261 | {2, undefined, {struct, { |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 262 | name_conflict_test_types, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 263 | second_chance |
| 264 | }}, second_chance, #second_chance{}}, |
| 265 | {3, undefined, {struct, { |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 266 | name_conflict_test_types, |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 267 | 'NOW_EAT_THIS' |
| 268 | }}, 'NOW_EAT_THIS', #'NOW_EAT_THIS'{}}, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 269 | {4, undefined, {struct, { |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 270 | name_conflict_test_types, |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 271 | 'TheEdgeCase' |
| 272 | }}, 'TheEdgeCase', #'TheEdgeCase'{}}, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 273 | {5, undefined, {struct, { |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 274 | name_conflict_test_types, |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 275 | 'Tricky_' |
| 276 | }}, 'Tricky_', #'Tricky_'{}}, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 277 | {6, undefined, {struct, { |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 278 | name_conflict_test_types, |
Jens Geyer | cc4ac49 | 2014-10-01 21:13:39 +0200 | [diff] [blame] | 279 | 'Nested' |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 280 | }}, 'Nested', undefined} |
| 281 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 282 | name_conflict_test_types:struct_info_ext('Nested') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 283 | )}, |
| 284 | {"Problem_ extended definition", ?_assertEqual( |
| 285 | {struct, [ |
| 286 | {1, undefined, bool, problem, undefined}, |
| 287 | {2, undefined, bool, 'Problem', undefined} |
| 288 | ]}, |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 289 | name_conflict_test_types:struct_info_ext('Problem_') |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 290 | )} |
| 291 | ]. |
| 292 | |
| 293 | service_info_test_() -> |
| 294 | [ |
| 295 | {"event params", ?_assertEqual( |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 296 | {struct, [{1, {struct, {name_conflict_test_types, partial}}}]}, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 297 | extern_thrift:function_info(event, params_type) |
| 298 | )}, |
| 299 | {"event reply", ?_assertEqual( |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 300 | {struct, {name_conflict_test_types, delegate}}, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 301 | extern_thrift:function_info(event, reply_type) |
| 302 | )}, |
| 303 | {"event exceptions", ?_assertEqual( |
| 304 | {struct, []}, |
| 305 | extern_thrift:function_info(event, exceptions) |
| 306 | )}, |
| 307 | {"Foo params", ?_assertEqual( |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 308 | {struct, [{1, {struct, {name_conflict_test_types, 'Nested'}}}]}, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 309 | extern_thrift:function_info('Foo', params_type) |
| 310 | )}, |
| 311 | {"Foo reply", ?_assertEqual( |
| 312 | {struct, []}, |
| 313 | extern_thrift:function_info('Foo', reply_type) |
| 314 | )}, |
| 315 | {"Foo exceptions", ?_assertEqual( |
Jens Geyer | 6d15c30 | 2014-10-02 10:03:09 +0200 | [diff] [blame] | 316 | {struct, [{1, {struct, {name_conflict_test_types, 'Problem_'}}}]}, |
alisdair sullivan | fb6ed7e | 2014-07-22 23:40:44 -0700 | [diff] [blame] | 317 | extern_thrift:function_info('Foo', exceptions) |
| 318 | )} |
| 319 | ]. |