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:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 return o; | 99 return o; |
100 } | 100 } |
101 | 101 |
102 checkEmpty(api.Empty o) { | 102 checkEmpty(api.Empty o) { |
103 buildCounterEmpty++; | 103 buildCounterEmpty++; |
104 if (buildCounterEmpty < 3) { | 104 if (buildCounterEmpty < 3) { |
105 } | 105 } |
106 buildCounterEmpty--; | 106 buildCounterEmpty--; |
107 } | 107 } |
108 | 108 |
109 buildUnnamed4088() { | 109 buildUnnamed3925() { |
110 var o = new core.List<api.Operation>(); | 110 var o = new core.List<api.Operation>(); |
111 o.add(buildOperation()); | 111 o.add(buildOperation()); |
112 o.add(buildOperation()); | 112 o.add(buildOperation()); |
113 return o; | 113 return o; |
114 } | 114 } |
115 | 115 |
116 checkUnnamed4088(core.List<api.Operation> o) { | 116 checkUnnamed3925(core.List<api.Operation> o) { |
117 unittest.expect(o, unittest.hasLength(2)); | 117 unittest.expect(o, unittest.hasLength(2)); |
118 checkOperation(o[0]); | 118 checkOperation(o[0]); |
119 checkOperation(o[1]); | 119 checkOperation(o[1]); |
120 } | 120 } |
121 | 121 |
122 core.int buildCounterListOperationsResponse = 0; | 122 core.int buildCounterListOperationsResponse = 0; |
123 buildListOperationsResponse() { | 123 buildListOperationsResponse() { |
124 var o = new api.ListOperationsResponse(); | 124 var o = new api.ListOperationsResponse(); |
125 buildCounterListOperationsResponse++; | 125 buildCounterListOperationsResponse++; |
126 if (buildCounterListOperationsResponse < 3) { | 126 if (buildCounterListOperationsResponse < 3) { |
127 o.nextPageToken = "foo"; | 127 o.nextPageToken = "foo"; |
128 o.operations = buildUnnamed4088(); | 128 o.operations = buildUnnamed3925(); |
129 } | 129 } |
130 buildCounterListOperationsResponse--; | 130 buildCounterListOperationsResponse--; |
131 return o; | 131 return o; |
132 } | 132 } |
133 | 133 |
134 checkListOperationsResponse(api.ListOperationsResponse o) { | 134 checkListOperationsResponse(api.ListOperationsResponse o) { |
135 buildCounterListOperationsResponse++; | 135 buildCounterListOperationsResponse++; |
136 if (buildCounterListOperationsResponse < 3) { | 136 if (buildCounterListOperationsResponse < 3) { |
137 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 137 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
138 checkUnnamed4088(o.operations); | 138 checkUnnamed3925(o.operations); |
139 } | 139 } |
140 buildCounterListOperationsResponse--; | 140 buildCounterListOperationsResponse--; |
141 } | 141 } |
142 | 142 |
143 buildUnnamed4089() { | 143 buildUnnamed3926() { |
144 var o = new core.Map<core.String, core.Object>(); | 144 var o = new core.Map<core.String, core.Object>(); |
145 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 145 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
146 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 146 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
147 return o; | 147 return o; |
148 } | 148 } |
149 | 149 |
150 checkUnnamed4089(core.Map<core.String, core.Object> o) { | 150 checkUnnamed3926(core.Map<core.String, core.Object> o) { |
151 unittest.expect(o, unittest.hasLength(2)); | 151 unittest.expect(o, unittest.hasLength(2)); |
152 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')); | 152 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')); |
153 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')); | 153 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')); |
154 } | 154 } |
155 | 155 |
156 buildUnnamed4090() { | 156 buildUnnamed3927() { |
157 var o = new core.Map<core.String, core.Object>(); | 157 var o = new core.Map<core.String, core.Object>(); |
158 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 158 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
159 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 159 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
160 return o; | 160 return o; |
161 } | 161 } |
162 | 162 |
163 checkUnnamed4090(core.Map<core.String, core.Object> o) { | 163 checkUnnamed3927(core.Map<core.String, core.Object> o) { |
164 unittest.expect(o, unittest.hasLength(2)); | 164 unittest.expect(o, unittest.hasLength(2)); |
165 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')); | 165 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')); |
166 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')); | 166 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')); |
167 } | 167 } |
168 | 168 |
169 core.int buildCounterOperation = 0; | 169 core.int buildCounterOperation = 0; |
170 buildOperation() { | 170 buildOperation() { |
171 var o = new api.Operation(); | 171 var o = new api.Operation(); |
172 buildCounterOperation++; | 172 buildCounterOperation++; |
173 if (buildCounterOperation < 3) { | 173 if (buildCounterOperation < 3) { |
174 o.done = true; | 174 o.done = true; |
175 o.error = buildStatus(); | 175 o.error = buildStatus(); |
176 o.metadata = buildUnnamed4089(); | 176 o.metadata = buildUnnamed3926(); |
177 o.name = "foo"; | 177 o.name = "foo"; |
178 o.response = buildUnnamed4090(); | 178 o.response = buildUnnamed3927(); |
179 } | 179 } |
180 buildCounterOperation--; | 180 buildCounterOperation--; |
181 return o; | 181 return o; |
182 } | 182 } |
183 | 183 |
184 checkOperation(api.Operation o) { | 184 checkOperation(api.Operation o) { |
185 buildCounterOperation++; | 185 buildCounterOperation++; |
186 if (buildCounterOperation < 3) { | 186 if (buildCounterOperation < 3) { |
187 unittest.expect(o.done, unittest.isTrue); | 187 unittest.expect(o.done, unittest.isTrue); |
188 checkStatus(o.error); | 188 checkStatus(o.error); |
189 checkUnnamed4089(o.metadata); | 189 checkUnnamed3926(o.metadata); |
190 unittest.expect(o.name, unittest.equals('foo')); | 190 unittest.expect(o.name, unittest.equals('foo')); |
191 checkUnnamed4090(o.response); | 191 checkUnnamed3927(o.response); |
192 } | 192 } |
193 buildCounterOperation--; | 193 buildCounterOperation--; |
194 } | 194 } |
195 | 195 |
196 core.int buildCounterRecognitionAudio = 0; | 196 core.int buildCounterRecognitionAudio = 0; |
197 buildRecognitionAudio() { | 197 buildRecognitionAudio() { |
198 var o = new api.RecognitionAudio(); | 198 var o = new api.RecognitionAudio(); |
199 buildCounterRecognitionAudio++; | 199 buildCounterRecognitionAudio++; |
200 if (buildCounterRecognitionAudio < 3) { | 200 if (buildCounterRecognitionAudio < 3) { |
201 o.content = "foo"; | 201 o.content = "foo"; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 unittest.expect(o.encoding, unittest.equals('foo')); | 236 unittest.expect(o.encoding, unittest.equals('foo')); |
237 unittest.expect(o.languageCode, unittest.equals('foo')); | 237 unittest.expect(o.languageCode, unittest.equals('foo')); |
238 unittest.expect(o.maxAlternatives, unittest.equals(42)); | 238 unittest.expect(o.maxAlternatives, unittest.equals(42)); |
239 unittest.expect(o.profanityFilter, unittest.isTrue); | 239 unittest.expect(o.profanityFilter, unittest.isTrue); |
240 unittest.expect(o.sampleRate, unittest.equals(42)); | 240 unittest.expect(o.sampleRate, unittest.equals(42)); |
241 checkSpeechContext(o.speechContext); | 241 checkSpeechContext(o.speechContext); |
242 } | 242 } |
243 buildCounterRecognitionConfig--; | 243 buildCounterRecognitionConfig--; |
244 } | 244 } |
245 | 245 |
246 buildUnnamed4091() { | 246 buildUnnamed3928() { |
247 var o = new core.List<core.String>(); | 247 var o = new core.List<core.String>(); |
248 o.add("foo"); | 248 o.add("foo"); |
249 o.add("foo"); | 249 o.add("foo"); |
250 return o; | 250 return o; |
251 } | 251 } |
252 | 252 |
253 checkUnnamed4091(core.List<core.String> o) { | 253 checkUnnamed3928(core.List<core.String> o) { |
254 unittest.expect(o, unittest.hasLength(2)); | 254 unittest.expect(o, unittest.hasLength(2)); |
255 unittest.expect(o[0], unittest.equals('foo')); | 255 unittest.expect(o[0], unittest.equals('foo')); |
256 unittest.expect(o[1], unittest.equals('foo')); | 256 unittest.expect(o[1], unittest.equals('foo')); |
257 } | 257 } |
258 | 258 |
259 core.int buildCounterSpeechContext = 0; | 259 core.int buildCounterSpeechContext = 0; |
260 buildSpeechContext() { | 260 buildSpeechContext() { |
261 var o = new api.SpeechContext(); | 261 var o = new api.SpeechContext(); |
262 buildCounterSpeechContext++; | 262 buildCounterSpeechContext++; |
263 if (buildCounterSpeechContext < 3) { | 263 if (buildCounterSpeechContext < 3) { |
264 o.phrases = buildUnnamed4091(); | 264 o.phrases = buildUnnamed3928(); |
265 } | 265 } |
266 buildCounterSpeechContext--; | 266 buildCounterSpeechContext--; |
267 return o; | 267 return o; |
268 } | 268 } |
269 | 269 |
270 checkSpeechContext(api.SpeechContext o) { | 270 checkSpeechContext(api.SpeechContext o) { |
271 buildCounterSpeechContext++; | 271 buildCounterSpeechContext++; |
272 if (buildCounterSpeechContext < 3) { | 272 if (buildCounterSpeechContext < 3) { |
273 checkUnnamed4091(o.phrases); | 273 checkUnnamed3928(o.phrases); |
274 } | 274 } |
275 buildCounterSpeechContext--; | 275 buildCounterSpeechContext--; |
276 } | 276 } |
277 | 277 |
278 core.int buildCounterSpeechRecognitionAlternative = 0; | 278 core.int buildCounterSpeechRecognitionAlternative = 0; |
279 buildSpeechRecognitionAlternative() { | 279 buildSpeechRecognitionAlternative() { |
280 var o = new api.SpeechRecognitionAlternative(); | 280 var o = new api.SpeechRecognitionAlternative(); |
281 buildCounterSpeechRecognitionAlternative++; | 281 buildCounterSpeechRecognitionAlternative++; |
282 if (buildCounterSpeechRecognitionAlternative < 3) { | 282 if (buildCounterSpeechRecognitionAlternative < 3) { |
283 o.confidence = 42.0; | 283 o.confidence = 42.0; |
284 o.transcript = "foo"; | 284 o.transcript = "foo"; |
285 } | 285 } |
286 buildCounterSpeechRecognitionAlternative--; | 286 buildCounterSpeechRecognitionAlternative--; |
287 return o; | 287 return o; |
288 } | 288 } |
289 | 289 |
290 checkSpeechRecognitionAlternative(api.SpeechRecognitionAlternative o) { | 290 checkSpeechRecognitionAlternative(api.SpeechRecognitionAlternative o) { |
291 buildCounterSpeechRecognitionAlternative++; | 291 buildCounterSpeechRecognitionAlternative++; |
292 if (buildCounterSpeechRecognitionAlternative < 3) { | 292 if (buildCounterSpeechRecognitionAlternative < 3) { |
293 unittest.expect(o.confidence, unittest.equals(42.0)); | 293 unittest.expect(o.confidence, unittest.equals(42.0)); |
294 unittest.expect(o.transcript, unittest.equals('foo')); | 294 unittest.expect(o.transcript, unittest.equals('foo')); |
295 } | 295 } |
296 buildCounterSpeechRecognitionAlternative--; | 296 buildCounterSpeechRecognitionAlternative--; |
297 } | 297 } |
298 | 298 |
299 buildUnnamed4092() { | 299 buildUnnamed3929() { |
300 var o = new core.List<api.SpeechRecognitionAlternative>(); | 300 var o = new core.List<api.SpeechRecognitionAlternative>(); |
301 o.add(buildSpeechRecognitionAlternative()); | 301 o.add(buildSpeechRecognitionAlternative()); |
302 o.add(buildSpeechRecognitionAlternative()); | 302 o.add(buildSpeechRecognitionAlternative()); |
303 return o; | 303 return o; |
304 } | 304 } |
305 | 305 |
306 checkUnnamed4092(core.List<api.SpeechRecognitionAlternative> o) { | 306 checkUnnamed3929(core.List<api.SpeechRecognitionAlternative> o) { |
307 unittest.expect(o, unittest.hasLength(2)); | 307 unittest.expect(o, unittest.hasLength(2)); |
308 checkSpeechRecognitionAlternative(o[0]); | 308 checkSpeechRecognitionAlternative(o[0]); |
309 checkSpeechRecognitionAlternative(o[1]); | 309 checkSpeechRecognitionAlternative(o[1]); |
310 } | 310 } |
311 | 311 |
312 core.int buildCounterSpeechRecognitionResult = 0; | 312 core.int buildCounterSpeechRecognitionResult = 0; |
313 buildSpeechRecognitionResult() { | 313 buildSpeechRecognitionResult() { |
314 var o = new api.SpeechRecognitionResult(); | 314 var o = new api.SpeechRecognitionResult(); |
315 buildCounterSpeechRecognitionResult++; | 315 buildCounterSpeechRecognitionResult++; |
316 if (buildCounterSpeechRecognitionResult < 3) { | 316 if (buildCounterSpeechRecognitionResult < 3) { |
317 o.alternatives = buildUnnamed4092(); | 317 o.alternatives = buildUnnamed3929(); |
318 } | 318 } |
319 buildCounterSpeechRecognitionResult--; | 319 buildCounterSpeechRecognitionResult--; |
320 return o; | 320 return o; |
321 } | 321 } |
322 | 322 |
323 checkSpeechRecognitionResult(api.SpeechRecognitionResult o) { | 323 checkSpeechRecognitionResult(api.SpeechRecognitionResult o) { |
324 buildCounterSpeechRecognitionResult++; | 324 buildCounterSpeechRecognitionResult++; |
325 if (buildCounterSpeechRecognitionResult < 3) { | 325 if (buildCounterSpeechRecognitionResult < 3) { |
326 checkUnnamed4092(o.alternatives); | 326 checkUnnamed3929(o.alternatives); |
327 } | 327 } |
328 buildCounterSpeechRecognitionResult--; | 328 buildCounterSpeechRecognitionResult--; |
329 } | 329 } |
330 | 330 |
331 buildUnnamed4093() { | 331 buildUnnamed3930() { |
332 var o = new core.Map<core.String, core.Object>(); | 332 var o = new core.Map<core.String, core.Object>(); |
333 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 333 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
334 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 334 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
335 return o; | 335 return o; |
336 } | 336 } |
337 | 337 |
338 checkUnnamed4093(core.Map<core.String, core.Object> o) { | 338 checkUnnamed3930(core.Map<core.String, core.Object> o) { |
339 unittest.expect(o, unittest.hasLength(2)); | 339 unittest.expect(o, unittest.hasLength(2)); |
340 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')); | 340 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')); |
341 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')); | 341 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')); |
342 } | 342 } |
343 | 343 |
344 buildUnnamed4094() { | 344 buildUnnamed3931() { |
345 var o = new core.List<core.Map<core.String, core.Object>>(); | 345 var o = new core.List<core.Map<core.String, core.Object>>(); |
346 o.add(buildUnnamed4093()); | 346 o.add(buildUnnamed3930()); |
347 o.add(buildUnnamed4093()); | 347 o.add(buildUnnamed3930()); |
348 return o; | 348 return o; |
349 } | 349 } |
350 | 350 |
351 checkUnnamed4094(core.List<core.Map<core.String, core.Object>> o) { | 351 checkUnnamed3931(core.List<core.Map<core.String, core.Object>> o) { |
352 unittest.expect(o, unittest.hasLength(2)); | 352 unittest.expect(o, unittest.hasLength(2)); |
353 checkUnnamed4093(o[0]); | 353 checkUnnamed3930(o[0]); |
354 checkUnnamed4093(o[1]); | 354 checkUnnamed3930(o[1]); |
355 } | 355 } |
356 | 356 |
357 core.int buildCounterStatus = 0; | 357 core.int buildCounterStatus = 0; |
358 buildStatus() { | 358 buildStatus() { |
359 var o = new api.Status(); | 359 var o = new api.Status(); |
360 buildCounterStatus++; | 360 buildCounterStatus++; |
361 if (buildCounterStatus < 3) { | 361 if (buildCounterStatus < 3) { |
362 o.code = 42; | 362 o.code = 42; |
363 o.details = buildUnnamed4094(); | 363 o.details = buildUnnamed3931(); |
364 o.message = "foo"; | 364 o.message = "foo"; |
365 } | 365 } |
366 buildCounterStatus--; | 366 buildCounterStatus--; |
367 return o; | 367 return o; |
368 } | 368 } |
369 | 369 |
370 checkStatus(api.Status o) { | 370 checkStatus(api.Status o) { |
371 buildCounterStatus++; | 371 buildCounterStatus++; |
372 if (buildCounterStatus < 3) { | 372 if (buildCounterStatus < 3) { |
373 unittest.expect(o.code, unittest.equals(42)); | 373 unittest.expect(o.code, unittest.equals(42)); |
374 checkUnnamed4094(o.details); | 374 checkUnnamed3931(o.details); |
375 unittest.expect(o.message, unittest.equals('foo')); | 375 unittest.expect(o.message, unittest.equals('foo')); |
376 } | 376 } |
377 buildCounterStatus--; | 377 buildCounterStatus--; |
378 } | 378 } |
379 | 379 |
380 core.int buildCounterSyncRecognizeRequest = 0; | 380 core.int buildCounterSyncRecognizeRequest = 0; |
381 buildSyncRecognizeRequest() { | 381 buildSyncRecognizeRequest() { |
382 var o = new api.SyncRecognizeRequest(); | 382 var o = new api.SyncRecognizeRequest(); |
383 buildCounterSyncRecognizeRequest++; | 383 buildCounterSyncRecognizeRequest++; |
384 if (buildCounterSyncRecognizeRequest < 3) { | 384 if (buildCounterSyncRecognizeRequest < 3) { |
385 o.audio = buildRecognitionAudio(); | 385 o.audio = buildRecognitionAudio(); |
386 o.config = buildRecognitionConfig(); | 386 o.config = buildRecognitionConfig(); |
387 } | 387 } |
388 buildCounterSyncRecognizeRequest--; | 388 buildCounterSyncRecognizeRequest--; |
389 return o; | 389 return o; |
390 } | 390 } |
391 | 391 |
392 checkSyncRecognizeRequest(api.SyncRecognizeRequest o) { | 392 checkSyncRecognizeRequest(api.SyncRecognizeRequest o) { |
393 buildCounterSyncRecognizeRequest++; | 393 buildCounterSyncRecognizeRequest++; |
394 if (buildCounterSyncRecognizeRequest < 3) { | 394 if (buildCounterSyncRecognizeRequest < 3) { |
395 checkRecognitionAudio(o.audio); | 395 checkRecognitionAudio(o.audio); |
396 checkRecognitionConfig(o.config); | 396 checkRecognitionConfig(o.config); |
397 } | 397 } |
398 buildCounterSyncRecognizeRequest--; | 398 buildCounterSyncRecognizeRequest--; |
399 } | 399 } |
400 | 400 |
401 buildUnnamed4095() { | 401 buildUnnamed3932() { |
402 var o = new core.List<api.SpeechRecognitionResult>(); | 402 var o = new core.List<api.SpeechRecognitionResult>(); |
403 o.add(buildSpeechRecognitionResult()); | 403 o.add(buildSpeechRecognitionResult()); |
404 o.add(buildSpeechRecognitionResult()); | 404 o.add(buildSpeechRecognitionResult()); |
405 return o; | 405 return o; |
406 } | 406 } |
407 | 407 |
408 checkUnnamed4095(core.List<api.SpeechRecognitionResult> o) { | 408 checkUnnamed3932(core.List<api.SpeechRecognitionResult> o) { |
409 unittest.expect(o, unittest.hasLength(2)); | 409 unittest.expect(o, unittest.hasLength(2)); |
410 checkSpeechRecognitionResult(o[0]); | 410 checkSpeechRecognitionResult(o[0]); |
411 checkSpeechRecognitionResult(o[1]); | 411 checkSpeechRecognitionResult(o[1]); |
412 } | 412 } |
413 | 413 |
414 core.int buildCounterSyncRecognizeResponse = 0; | 414 core.int buildCounterSyncRecognizeResponse = 0; |
415 buildSyncRecognizeResponse() { | 415 buildSyncRecognizeResponse() { |
416 var o = new api.SyncRecognizeResponse(); | 416 var o = new api.SyncRecognizeResponse(); |
417 buildCounterSyncRecognizeResponse++; | 417 buildCounterSyncRecognizeResponse++; |
418 if (buildCounterSyncRecognizeResponse < 3) { | 418 if (buildCounterSyncRecognizeResponse < 3) { |
419 o.results = buildUnnamed4095(); | 419 o.results = buildUnnamed3932(); |
420 } | 420 } |
421 buildCounterSyncRecognizeResponse--; | 421 buildCounterSyncRecognizeResponse--; |
422 return o; | 422 return o; |
423 } | 423 } |
424 | 424 |
425 checkSyncRecognizeResponse(api.SyncRecognizeResponse o) { | 425 checkSyncRecognizeResponse(api.SyncRecognizeResponse o) { |
426 buildCounterSyncRecognizeResponse++; | 426 buildCounterSyncRecognizeResponse++; |
427 if (buildCounterSyncRecognizeResponse < 3) { | 427 if (buildCounterSyncRecognizeResponse < 3) { |
428 checkUnnamed4095(o.results); | 428 checkUnnamed3932(o.results); |
429 } | 429 } |
430 buildCounterSyncRecognizeResponse--; | 430 buildCounterSyncRecognizeResponse--; |
431 } | 431 } |
432 | 432 |
433 | 433 |
434 main() { | 434 main() { |
435 unittest.group("obj-schema-AsyncRecognizeRequest", () { | 435 unittest.group("obj-schema-AsyncRecognizeRequest", () { |
436 unittest.test("to-json--from-json", () { | 436 unittest.test("to-json--from-json", () { |
437 var o = buildAsyncRecognizeRequest(); | 437 var o = buildAsyncRecognizeRequest(); |
438 var od = new api.AsyncRecognizeRequest.fromJson(o.toJson()); | 438 var od = new api.AsyncRecognizeRequest.fromJson(o.toJson()); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 res.syncrecognize(arg_request).then(unittest.expectAsync(((api.SyncRecogni
zeResponse response) { | 836 res.syncrecognize(arg_request).then(unittest.expectAsync(((api.SyncRecogni
zeResponse response) { |
837 checkSyncRecognizeResponse(response); | 837 checkSyncRecognizeResponse(response); |
838 }))); | 838 }))); |
839 }); | 839 }); |
840 | 840 |
841 }); | 841 }); |
842 | 842 |
843 | 843 |
844 } | 844 } |
845 | 845 |
OLD | NEW |