OLD | NEW |
1 library googleapis_beta.speech.v1beta1.test; | 1 library googleapis_beta.speech.v1beta1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 return o; | 82 return o; |
83 } | 83 } |
84 | 84 |
85 checkEmpty(api.Empty o) { | 85 checkEmpty(api.Empty o) { |
86 buildCounterEmpty++; | 86 buildCounterEmpty++; |
87 if (buildCounterEmpty < 3) { | 87 if (buildCounterEmpty < 3) { |
88 } | 88 } |
89 buildCounterEmpty--; | 89 buildCounterEmpty--; |
90 } | 90 } |
91 | 91 |
92 buildUnnamed3384() { | 92 buildUnnamed3416() { |
93 var o = new core.List<api.Operation>(); | 93 var o = new core.List<api.Operation>(); |
94 o.add(buildOperation()); | 94 o.add(buildOperation()); |
95 o.add(buildOperation()); | 95 o.add(buildOperation()); |
96 return o; | 96 return o; |
97 } | 97 } |
98 | 98 |
99 checkUnnamed3384(core.List<api.Operation> o) { | 99 checkUnnamed3416(core.List<api.Operation> o) { |
100 unittest.expect(o, unittest.hasLength(2)); | 100 unittest.expect(o, unittest.hasLength(2)); |
101 checkOperation(o[0]); | 101 checkOperation(o[0]); |
102 checkOperation(o[1]); | 102 checkOperation(o[1]); |
103 } | 103 } |
104 | 104 |
105 core.int buildCounterListOperationsResponse = 0; | 105 core.int buildCounterListOperationsResponse = 0; |
106 buildListOperationsResponse() { | 106 buildListOperationsResponse() { |
107 var o = new api.ListOperationsResponse(); | 107 var o = new api.ListOperationsResponse(); |
108 buildCounterListOperationsResponse++; | 108 buildCounterListOperationsResponse++; |
109 if (buildCounterListOperationsResponse < 3) { | 109 if (buildCounterListOperationsResponse < 3) { |
110 o.nextPageToken = "foo"; | 110 o.nextPageToken = "foo"; |
111 o.operations = buildUnnamed3384(); | 111 o.operations = buildUnnamed3416(); |
112 } | 112 } |
113 buildCounterListOperationsResponse--; | 113 buildCounterListOperationsResponse--; |
114 return o; | 114 return o; |
115 } | 115 } |
116 | 116 |
117 checkListOperationsResponse(api.ListOperationsResponse o) { | 117 checkListOperationsResponse(api.ListOperationsResponse o) { |
118 buildCounterListOperationsResponse++; | 118 buildCounterListOperationsResponse++; |
119 if (buildCounterListOperationsResponse < 3) { | 119 if (buildCounterListOperationsResponse < 3) { |
120 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 120 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
121 checkUnnamed3384(o.operations); | 121 checkUnnamed3416(o.operations); |
122 } | 122 } |
123 buildCounterListOperationsResponse--; | 123 buildCounterListOperationsResponse--; |
124 } | 124 } |
125 | 125 |
126 buildUnnamed3385() { | 126 buildUnnamed3417() { |
127 var o = new core.Map<core.String, core.Object>(); | 127 var o = new core.Map<core.String, core.Object>(); |
128 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 128 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
129 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 129 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
130 return o; | 130 return o; |
131 } | 131 } |
132 | 132 |
133 checkUnnamed3385(core.Map<core.String, core.Object> o) { | 133 checkUnnamed3417(core.Map<core.String, core.Object> o) { |
134 unittest.expect(o, unittest.hasLength(2)); | 134 unittest.expect(o, unittest.hasLength(2)); |
135 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 135 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
136 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 136 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
137 } | 137 } |
138 | 138 |
139 buildUnnamed3386() { | 139 buildUnnamed3418() { |
140 var o = new core.Map<core.String, core.Object>(); | 140 var o = new core.Map<core.String, core.Object>(); |
141 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 141 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
142 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 142 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
143 return o; | 143 return o; |
144 } | 144 } |
145 | 145 |
146 checkUnnamed3386(core.Map<core.String, core.Object> o) { | 146 checkUnnamed3418(core.Map<core.String, core.Object> o) { |
147 unittest.expect(o, unittest.hasLength(2)); | 147 unittest.expect(o, unittest.hasLength(2)); |
148 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 148 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
149 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 149 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
150 } | 150 } |
151 | 151 |
152 core.int buildCounterOperation = 0; | 152 core.int buildCounterOperation = 0; |
153 buildOperation() { | 153 buildOperation() { |
154 var o = new api.Operation(); | 154 var o = new api.Operation(); |
155 buildCounterOperation++; | 155 buildCounterOperation++; |
156 if (buildCounterOperation < 3) { | 156 if (buildCounterOperation < 3) { |
157 o.done = true; | 157 o.done = true; |
158 o.error = buildStatus(); | 158 o.error = buildStatus(); |
159 o.metadata = buildUnnamed3385(); | 159 o.metadata = buildUnnamed3417(); |
160 o.name = "foo"; | 160 o.name = "foo"; |
161 o.response = buildUnnamed3386(); | 161 o.response = buildUnnamed3418(); |
162 } | 162 } |
163 buildCounterOperation--; | 163 buildCounterOperation--; |
164 return o; | 164 return o; |
165 } | 165 } |
166 | 166 |
167 checkOperation(api.Operation o) { | 167 checkOperation(api.Operation o) { |
168 buildCounterOperation++; | 168 buildCounterOperation++; |
169 if (buildCounterOperation < 3) { | 169 if (buildCounterOperation < 3) { |
170 unittest.expect(o.done, unittest.isTrue); | 170 unittest.expect(o.done, unittest.isTrue); |
171 checkStatus(o.error); | 171 checkStatus(o.error); |
172 checkUnnamed3385(o.metadata); | 172 checkUnnamed3417(o.metadata); |
173 unittest.expect(o.name, unittest.equals('foo')); | 173 unittest.expect(o.name, unittest.equals('foo')); |
174 checkUnnamed3386(o.response); | 174 checkUnnamed3418(o.response); |
175 } | 175 } |
176 buildCounterOperation--; | 176 buildCounterOperation--; |
177 } | 177 } |
178 | 178 |
179 core.int buildCounterRecognitionAudio = 0; | 179 core.int buildCounterRecognitionAudio = 0; |
180 buildRecognitionAudio() { | 180 buildRecognitionAudio() { |
181 var o = new api.RecognitionAudio(); | 181 var o = new api.RecognitionAudio(); |
182 buildCounterRecognitionAudio++; | 182 buildCounterRecognitionAudio++; |
183 if (buildCounterRecognitionAudio < 3) { | 183 if (buildCounterRecognitionAudio < 3) { |
184 o.content = "foo"; | 184 o.content = "foo"; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 unittest.expect(o.encoding, unittest.equals('foo')); | 219 unittest.expect(o.encoding, unittest.equals('foo')); |
220 unittest.expect(o.languageCode, unittest.equals('foo')); | 220 unittest.expect(o.languageCode, unittest.equals('foo')); |
221 unittest.expect(o.maxAlternatives, unittest.equals(42)); | 221 unittest.expect(o.maxAlternatives, unittest.equals(42)); |
222 unittest.expect(o.profanityFilter, unittest.isTrue); | 222 unittest.expect(o.profanityFilter, unittest.isTrue); |
223 unittest.expect(o.sampleRate, unittest.equals(42)); | 223 unittest.expect(o.sampleRate, unittest.equals(42)); |
224 checkSpeechContext(o.speechContext); | 224 checkSpeechContext(o.speechContext); |
225 } | 225 } |
226 buildCounterRecognitionConfig--; | 226 buildCounterRecognitionConfig--; |
227 } | 227 } |
228 | 228 |
229 buildUnnamed3387() { | 229 buildUnnamed3419() { |
230 var o = new core.List<core.String>(); | 230 var o = new core.List<core.String>(); |
231 o.add("foo"); | 231 o.add("foo"); |
232 o.add("foo"); | 232 o.add("foo"); |
233 return o; | 233 return o; |
234 } | 234 } |
235 | 235 |
236 checkUnnamed3387(core.List<core.String> o) { | 236 checkUnnamed3419(core.List<core.String> o) { |
237 unittest.expect(o, unittest.hasLength(2)); | 237 unittest.expect(o, unittest.hasLength(2)); |
238 unittest.expect(o[0], unittest.equals('foo')); | 238 unittest.expect(o[0], unittest.equals('foo')); |
239 unittest.expect(o[1], unittest.equals('foo')); | 239 unittest.expect(o[1], unittest.equals('foo')); |
240 } | 240 } |
241 | 241 |
242 core.int buildCounterSpeechContext = 0; | 242 core.int buildCounterSpeechContext = 0; |
243 buildSpeechContext() { | 243 buildSpeechContext() { |
244 var o = new api.SpeechContext(); | 244 var o = new api.SpeechContext(); |
245 buildCounterSpeechContext++; | 245 buildCounterSpeechContext++; |
246 if (buildCounterSpeechContext < 3) { | 246 if (buildCounterSpeechContext < 3) { |
247 o.phrases = buildUnnamed3387(); | 247 o.phrases = buildUnnamed3419(); |
248 } | 248 } |
249 buildCounterSpeechContext--; | 249 buildCounterSpeechContext--; |
250 return o; | 250 return o; |
251 } | 251 } |
252 | 252 |
253 checkSpeechContext(api.SpeechContext o) { | 253 checkSpeechContext(api.SpeechContext o) { |
254 buildCounterSpeechContext++; | 254 buildCounterSpeechContext++; |
255 if (buildCounterSpeechContext < 3) { | 255 if (buildCounterSpeechContext < 3) { |
256 checkUnnamed3387(o.phrases); | 256 checkUnnamed3419(o.phrases); |
257 } | 257 } |
258 buildCounterSpeechContext--; | 258 buildCounterSpeechContext--; |
259 } | 259 } |
260 | 260 |
261 core.int buildCounterSpeechRecognitionAlternative = 0; | 261 core.int buildCounterSpeechRecognitionAlternative = 0; |
262 buildSpeechRecognitionAlternative() { | 262 buildSpeechRecognitionAlternative() { |
263 var o = new api.SpeechRecognitionAlternative(); | 263 var o = new api.SpeechRecognitionAlternative(); |
264 buildCounterSpeechRecognitionAlternative++; | 264 buildCounterSpeechRecognitionAlternative++; |
265 if (buildCounterSpeechRecognitionAlternative < 3) { | 265 if (buildCounterSpeechRecognitionAlternative < 3) { |
266 o.confidence = 42.0; | 266 o.confidence = 42.0; |
267 o.transcript = "foo"; | 267 o.transcript = "foo"; |
268 } | 268 } |
269 buildCounterSpeechRecognitionAlternative--; | 269 buildCounterSpeechRecognitionAlternative--; |
270 return o; | 270 return o; |
271 } | 271 } |
272 | 272 |
273 checkSpeechRecognitionAlternative(api.SpeechRecognitionAlternative o) { | 273 checkSpeechRecognitionAlternative(api.SpeechRecognitionAlternative o) { |
274 buildCounterSpeechRecognitionAlternative++; | 274 buildCounterSpeechRecognitionAlternative++; |
275 if (buildCounterSpeechRecognitionAlternative < 3) { | 275 if (buildCounterSpeechRecognitionAlternative < 3) { |
276 unittest.expect(o.confidence, unittest.equals(42.0)); | 276 unittest.expect(o.confidence, unittest.equals(42.0)); |
277 unittest.expect(o.transcript, unittest.equals('foo')); | 277 unittest.expect(o.transcript, unittest.equals('foo')); |
278 } | 278 } |
279 buildCounterSpeechRecognitionAlternative--; | 279 buildCounterSpeechRecognitionAlternative--; |
280 } | 280 } |
281 | 281 |
282 buildUnnamed3388() { | 282 buildUnnamed3420() { |
283 var o = new core.List<api.SpeechRecognitionAlternative>(); | 283 var o = new core.List<api.SpeechRecognitionAlternative>(); |
284 o.add(buildSpeechRecognitionAlternative()); | 284 o.add(buildSpeechRecognitionAlternative()); |
285 o.add(buildSpeechRecognitionAlternative()); | 285 o.add(buildSpeechRecognitionAlternative()); |
286 return o; | 286 return o; |
287 } | 287 } |
288 | 288 |
289 checkUnnamed3388(core.List<api.SpeechRecognitionAlternative> o) { | 289 checkUnnamed3420(core.List<api.SpeechRecognitionAlternative> o) { |
290 unittest.expect(o, unittest.hasLength(2)); | 290 unittest.expect(o, unittest.hasLength(2)); |
291 checkSpeechRecognitionAlternative(o[0]); | 291 checkSpeechRecognitionAlternative(o[0]); |
292 checkSpeechRecognitionAlternative(o[1]); | 292 checkSpeechRecognitionAlternative(o[1]); |
293 } | 293 } |
294 | 294 |
295 core.int buildCounterSpeechRecognitionResult = 0; | 295 core.int buildCounterSpeechRecognitionResult = 0; |
296 buildSpeechRecognitionResult() { | 296 buildSpeechRecognitionResult() { |
297 var o = new api.SpeechRecognitionResult(); | 297 var o = new api.SpeechRecognitionResult(); |
298 buildCounterSpeechRecognitionResult++; | 298 buildCounterSpeechRecognitionResult++; |
299 if (buildCounterSpeechRecognitionResult < 3) { | 299 if (buildCounterSpeechRecognitionResult < 3) { |
300 o.alternatives = buildUnnamed3388(); | 300 o.alternatives = buildUnnamed3420(); |
301 } | 301 } |
302 buildCounterSpeechRecognitionResult--; | 302 buildCounterSpeechRecognitionResult--; |
303 return o; | 303 return o; |
304 } | 304 } |
305 | 305 |
306 checkSpeechRecognitionResult(api.SpeechRecognitionResult o) { | 306 checkSpeechRecognitionResult(api.SpeechRecognitionResult o) { |
307 buildCounterSpeechRecognitionResult++; | 307 buildCounterSpeechRecognitionResult++; |
308 if (buildCounterSpeechRecognitionResult < 3) { | 308 if (buildCounterSpeechRecognitionResult < 3) { |
309 checkUnnamed3388(o.alternatives); | 309 checkUnnamed3420(o.alternatives); |
310 } | 310 } |
311 buildCounterSpeechRecognitionResult--; | 311 buildCounterSpeechRecognitionResult--; |
312 } | 312 } |
313 | 313 |
314 buildUnnamed3389() { | 314 buildUnnamed3421() { |
315 var o = new core.Map<core.String, core.Object>(); | 315 var o = new core.Map<core.String, core.Object>(); |
316 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 316 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
317 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 317 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
318 return o; | 318 return o; |
319 } | 319 } |
320 | 320 |
321 checkUnnamed3389(core.Map<core.String, core.Object> o) { | 321 checkUnnamed3421(core.Map<core.String, core.Object> o) { |
322 unittest.expect(o, unittest.hasLength(2)); | 322 unittest.expect(o, unittest.hasLength(2)); |
323 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 323 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
324 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 324 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
325 } | 325 } |
326 | 326 |
327 buildUnnamed3390() { | 327 buildUnnamed3422() { |
328 var o = new core.List<core.Map<core.String, core.Object>>(); | 328 var o = new core.List<core.Map<core.String, core.Object>>(); |
329 o.add(buildUnnamed3389()); | 329 o.add(buildUnnamed3421()); |
330 o.add(buildUnnamed3389()); | 330 o.add(buildUnnamed3421()); |
331 return o; | 331 return o; |
332 } | 332 } |
333 | 333 |
334 checkUnnamed3390(core.List<core.Map<core.String, core.Object>> o) { | 334 checkUnnamed3422(core.List<core.Map<core.String, core.Object>> o) { |
335 unittest.expect(o, unittest.hasLength(2)); | 335 unittest.expect(o, unittest.hasLength(2)); |
336 checkUnnamed3389(o[0]); | 336 checkUnnamed3421(o[0]); |
337 checkUnnamed3389(o[1]); | 337 checkUnnamed3421(o[1]); |
338 } | 338 } |
339 | 339 |
340 core.int buildCounterStatus = 0; | 340 core.int buildCounterStatus = 0; |
341 buildStatus() { | 341 buildStatus() { |
342 var o = new api.Status(); | 342 var o = new api.Status(); |
343 buildCounterStatus++; | 343 buildCounterStatus++; |
344 if (buildCounterStatus < 3) { | 344 if (buildCounterStatus < 3) { |
345 o.code = 42; | 345 o.code = 42; |
346 o.details = buildUnnamed3390(); | 346 o.details = buildUnnamed3422(); |
347 o.message = "foo"; | 347 o.message = "foo"; |
348 } | 348 } |
349 buildCounterStatus--; | 349 buildCounterStatus--; |
350 return o; | 350 return o; |
351 } | 351 } |
352 | 352 |
353 checkStatus(api.Status o) { | 353 checkStatus(api.Status o) { |
354 buildCounterStatus++; | 354 buildCounterStatus++; |
355 if (buildCounterStatus < 3) { | 355 if (buildCounterStatus < 3) { |
356 unittest.expect(o.code, unittest.equals(42)); | 356 unittest.expect(o.code, unittest.equals(42)); |
357 checkUnnamed3390(o.details); | 357 checkUnnamed3422(o.details); |
358 unittest.expect(o.message, unittest.equals('foo')); | 358 unittest.expect(o.message, unittest.equals('foo')); |
359 } | 359 } |
360 buildCounterStatus--; | 360 buildCounterStatus--; |
361 } | 361 } |
362 | 362 |
363 core.int buildCounterSyncRecognizeRequest = 0; | 363 core.int buildCounterSyncRecognizeRequest = 0; |
364 buildSyncRecognizeRequest() { | 364 buildSyncRecognizeRequest() { |
365 var o = new api.SyncRecognizeRequest(); | 365 var o = new api.SyncRecognizeRequest(); |
366 buildCounterSyncRecognizeRequest++; | 366 buildCounterSyncRecognizeRequest++; |
367 if (buildCounterSyncRecognizeRequest < 3) { | 367 if (buildCounterSyncRecognizeRequest < 3) { |
368 o.audio = buildRecognitionAudio(); | 368 o.audio = buildRecognitionAudio(); |
369 o.config = buildRecognitionConfig(); | 369 o.config = buildRecognitionConfig(); |
370 } | 370 } |
371 buildCounterSyncRecognizeRequest--; | 371 buildCounterSyncRecognizeRequest--; |
372 return o; | 372 return o; |
373 } | 373 } |
374 | 374 |
375 checkSyncRecognizeRequest(api.SyncRecognizeRequest o) { | 375 checkSyncRecognizeRequest(api.SyncRecognizeRequest o) { |
376 buildCounterSyncRecognizeRequest++; | 376 buildCounterSyncRecognizeRequest++; |
377 if (buildCounterSyncRecognizeRequest < 3) { | 377 if (buildCounterSyncRecognizeRequest < 3) { |
378 checkRecognitionAudio(o.audio); | 378 checkRecognitionAudio(o.audio); |
379 checkRecognitionConfig(o.config); | 379 checkRecognitionConfig(o.config); |
380 } | 380 } |
381 buildCounterSyncRecognizeRequest--; | 381 buildCounterSyncRecognizeRequest--; |
382 } | 382 } |
383 | 383 |
384 buildUnnamed3391() { | 384 buildUnnamed3423() { |
385 var o = new core.List<api.SpeechRecognitionResult>(); | 385 var o = new core.List<api.SpeechRecognitionResult>(); |
386 o.add(buildSpeechRecognitionResult()); | 386 o.add(buildSpeechRecognitionResult()); |
387 o.add(buildSpeechRecognitionResult()); | 387 o.add(buildSpeechRecognitionResult()); |
388 return o; | 388 return o; |
389 } | 389 } |
390 | 390 |
391 checkUnnamed3391(core.List<api.SpeechRecognitionResult> o) { | 391 checkUnnamed3423(core.List<api.SpeechRecognitionResult> o) { |
392 unittest.expect(o, unittest.hasLength(2)); | 392 unittest.expect(o, unittest.hasLength(2)); |
393 checkSpeechRecognitionResult(o[0]); | 393 checkSpeechRecognitionResult(o[0]); |
394 checkSpeechRecognitionResult(o[1]); | 394 checkSpeechRecognitionResult(o[1]); |
395 } | 395 } |
396 | 396 |
397 core.int buildCounterSyncRecognizeResponse = 0; | 397 core.int buildCounterSyncRecognizeResponse = 0; |
398 buildSyncRecognizeResponse() { | 398 buildSyncRecognizeResponse() { |
399 var o = new api.SyncRecognizeResponse(); | 399 var o = new api.SyncRecognizeResponse(); |
400 buildCounterSyncRecognizeResponse++; | 400 buildCounterSyncRecognizeResponse++; |
401 if (buildCounterSyncRecognizeResponse < 3) { | 401 if (buildCounterSyncRecognizeResponse < 3) { |
402 o.results = buildUnnamed3391(); | 402 o.results = buildUnnamed3423(); |
403 } | 403 } |
404 buildCounterSyncRecognizeResponse--; | 404 buildCounterSyncRecognizeResponse--; |
405 return o; | 405 return o; |
406 } | 406 } |
407 | 407 |
408 checkSyncRecognizeResponse(api.SyncRecognizeResponse o) { | 408 checkSyncRecognizeResponse(api.SyncRecognizeResponse o) { |
409 buildCounterSyncRecognizeResponse++; | 409 buildCounterSyncRecognizeResponse++; |
410 if (buildCounterSyncRecognizeResponse < 3) { | 410 if (buildCounterSyncRecognizeResponse < 3) { |
411 checkUnnamed3391(o.results); | 411 checkUnnamed3423(o.results); |
412 } | 412 } |
413 buildCounterSyncRecognizeResponse--; | 413 buildCounterSyncRecognizeResponse--; |
414 } | 414 } |
415 | 415 |
416 | 416 |
417 main() { | 417 main() { |
418 unittest.group("obj-schema-AsyncRecognizeRequest", () { | 418 unittest.group("obj-schema-AsyncRecognizeRequest", () { |
419 unittest.test("to-json--from-json", () { | 419 unittest.test("to-json--from-json", () { |
420 var o = buildAsyncRecognizeRequest(); | 420 var o = buildAsyncRecognizeRequest(); |
421 var od = new api.AsyncRecognizeRequest.fromJson(o.toJson()); | 421 var od = new api.AsyncRecognizeRequest.fromJson(o.toJson()); |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 res.syncrecognize(arg_request).then(unittest.expectAsync1(((api.SyncRecogn
izeResponse response) { | 806 res.syncrecognize(arg_request).then(unittest.expectAsync1(((api.SyncRecogn
izeResponse response) { |
807 checkSyncRecognizeResponse(response); | 807 checkSyncRecognizeResponse(response); |
808 }))); | 808 }))); |
809 }); | 809 }); |
810 | 810 |
811 }); | 811 }); |
812 | 812 |
813 | 813 |
814 } | 814 } |
815 | 815 |
OLD | NEW |