| OLD | NEW |
| 1 library googleapis.vision.v1.test; | 1 library googleapis.vision.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | |
| 5 import "dart:async" as async; | 4 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 5 import "dart:convert" as convert; |
| 7 | 6 |
| 8 import 'package:http/http.dart' as http; | 7 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | |
| 10 import 'package:test/test.dart' as unittest; | 8 import 'package:test/test.dart' as unittest; |
| 11 | 9 |
| 12 import 'package:googleapis/vision/v1.dart' as api; | 10 import 'package:googleapis/vision/v1.dart' as api; |
| 13 | 11 |
| 14 class HttpServerMock extends http.BaseClient { | 12 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 13 core.Function _callback; |
| 16 core.bool _expectJson; | 14 core.bool _expectJson; |
| 17 | 15 |
| 18 void register(core.Function callback, core.bool expectJson) { | 16 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 17 _callback = callback; |
| 20 _expectJson = expectJson; | 18 _expectJson = expectJson; |
| 21 } | 19 } |
| 22 | 20 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { | 22 if (_expectJson) { |
| 25 return request.finalize() | 23 return request |
| 24 .finalize() |
| 26 .transform(convert.UTF8.decoder) | 25 .transform(convert.UTF8.decoder) |
| 27 .join('') | 26 .join('') |
| 28 .then((core.String jsonString) { | 27 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { | 28 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); | 29 return _callback(request, null); |
| 31 } else { | 30 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); | 31 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } | 32 } |
| 34 }); | 33 }); |
| 35 } else { | 34 } else { |
| 36 var stream = request.finalize(); | 35 var stream = request.finalize(); |
| 37 if (stream == null) { | 36 if (stream == null) { |
| 38 return _callback(request, []); | 37 return _callback(request, []); |
| 39 } else { | 38 } else { |
| 40 return stream.toBytes().then((data) { | 39 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 40 return _callback(request, data); |
| 42 }); | 41 }); |
| 43 } | 42 } |
| 44 } | 43 } |
| 45 } | 44 } |
| 46 } | 45 } |
| 47 | 46 |
| 48 http.StreamedResponse stringResponse( | 47 http.StreamedResponse stringResponse(core.int status, |
| 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 48 core.Map<core.String, core.String> headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 50 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 51 } |
| 53 | 52 |
| 54 buildUnnamed1306() { | 53 buildUnnamed1302() { |
| 55 var o = new core.List<api.Feature>(); | 54 var o = new core.List<api.Feature>(); |
| 56 o.add(buildFeature()); | 55 o.add(buildFeature()); |
| 57 o.add(buildFeature()); | 56 o.add(buildFeature()); |
| 58 return o; | 57 return o; |
| 59 } | 58 } |
| 60 | 59 |
| 61 checkUnnamed1306(core.List<api.Feature> o) { | 60 checkUnnamed1302(core.List<api.Feature> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 61 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkFeature(o[0]); | 62 checkFeature(o[0]); |
| 64 checkFeature(o[1]); | 63 checkFeature(o[1]); |
| 65 } | 64 } |
| 66 | 65 |
| 67 core.int buildCounterAnnotateImageRequest = 0; | 66 core.int buildCounterAnnotateImageRequest = 0; |
| 68 buildAnnotateImageRequest() { | 67 buildAnnotateImageRequest() { |
| 69 var o = new api.AnnotateImageRequest(); | 68 var o = new api.AnnotateImageRequest(); |
| 70 buildCounterAnnotateImageRequest++; | 69 buildCounterAnnotateImageRequest++; |
| 71 if (buildCounterAnnotateImageRequest < 3) { | 70 if (buildCounterAnnotateImageRequest < 3) { |
| 72 o.features = buildUnnamed1306(); | 71 o.features = buildUnnamed1302(); |
| 73 o.image = buildImage(); | 72 o.image = buildImage(); |
| 74 o.imageContext = buildImageContext(); | 73 o.imageContext = buildImageContext(); |
| 75 } | 74 } |
| 76 buildCounterAnnotateImageRequest--; | 75 buildCounterAnnotateImageRequest--; |
| 77 return o; | 76 return o; |
| 78 } | 77 } |
| 79 | 78 |
| 80 checkAnnotateImageRequest(api.AnnotateImageRequest o) { | 79 checkAnnotateImageRequest(api.AnnotateImageRequest o) { |
| 81 buildCounterAnnotateImageRequest++; | 80 buildCounterAnnotateImageRequest++; |
| 82 if (buildCounterAnnotateImageRequest < 3) { | 81 if (buildCounterAnnotateImageRequest < 3) { |
| 83 checkUnnamed1306(o.features); | 82 checkUnnamed1302(o.features); |
| 84 checkImage(o.image); | 83 checkImage(o.image); |
| 85 checkImageContext(o.imageContext); | 84 checkImageContext(o.imageContext); |
| 86 } | 85 } |
| 87 buildCounterAnnotateImageRequest--; | 86 buildCounterAnnotateImageRequest--; |
| 88 } | 87 } |
| 89 | 88 |
| 90 buildUnnamed1307() { | 89 buildUnnamed1303() { |
| 91 var o = new core.List<api.FaceAnnotation>(); | 90 var o = new core.List<api.FaceAnnotation>(); |
| 92 o.add(buildFaceAnnotation()); | 91 o.add(buildFaceAnnotation()); |
| 93 o.add(buildFaceAnnotation()); | 92 o.add(buildFaceAnnotation()); |
| 94 return o; | 93 return o; |
| 95 } | 94 } |
| 96 | 95 |
| 97 checkUnnamed1307(core.List<api.FaceAnnotation> o) { | 96 checkUnnamed1303(core.List<api.FaceAnnotation> o) { |
| 98 unittest.expect(o, unittest.hasLength(2)); | 97 unittest.expect(o, unittest.hasLength(2)); |
| 99 checkFaceAnnotation(o[0]); | 98 checkFaceAnnotation(o[0]); |
| 100 checkFaceAnnotation(o[1]); | 99 checkFaceAnnotation(o[1]); |
| 101 } | 100 } |
| 102 | 101 |
| 103 buildUnnamed1308() { | 102 buildUnnamed1304() { |
| 104 var o = new core.List<api.EntityAnnotation>(); | 103 var o = new core.List<api.EntityAnnotation>(); |
| 105 o.add(buildEntityAnnotation()); | 104 o.add(buildEntityAnnotation()); |
| 106 o.add(buildEntityAnnotation()); | 105 o.add(buildEntityAnnotation()); |
| 107 return o; | 106 return o; |
| 108 } | 107 } |
| 109 | 108 |
| 110 checkUnnamed1308(core.List<api.EntityAnnotation> o) { | 109 checkUnnamed1304(core.List<api.EntityAnnotation> o) { |
| 111 unittest.expect(o, unittest.hasLength(2)); | 110 unittest.expect(o, unittest.hasLength(2)); |
| 112 checkEntityAnnotation(o[0]); | 111 checkEntityAnnotation(o[0]); |
| 113 checkEntityAnnotation(o[1]); | 112 checkEntityAnnotation(o[1]); |
| 114 } | 113 } |
| 115 | 114 |
| 116 buildUnnamed1309() { | 115 buildUnnamed1305() { |
| 117 var o = new core.List<api.EntityAnnotation>(); | 116 var o = new core.List<api.EntityAnnotation>(); |
| 118 o.add(buildEntityAnnotation()); | 117 o.add(buildEntityAnnotation()); |
| 119 o.add(buildEntityAnnotation()); | 118 o.add(buildEntityAnnotation()); |
| 120 return o; | 119 return o; |
| 121 } | 120 } |
| 122 | 121 |
| 123 checkUnnamed1309(core.List<api.EntityAnnotation> o) { | 122 checkUnnamed1305(core.List<api.EntityAnnotation> o) { |
| 124 unittest.expect(o, unittest.hasLength(2)); | 123 unittest.expect(o, unittest.hasLength(2)); |
| 125 checkEntityAnnotation(o[0]); | 124 checkEntityAnnotation(o[0]); |
| 126 checkEntityAnnotation(o[1]); | 125 checkEntityAnnotation(o[1]); |
| 127 } | 126 } |
| 128 | 127 |
| 129 buildUnnamed1310() { | 128 buildUnnamed1306() { |
| 130 var o = new core.List<api.EntityAnnotation>(); | 129 var o = new core.List<api.EntityAnnotation>(); |
| 131 o.add(buildEntityAnnotation()); | 130 o.add(buildEntityAnnotation()); |
| 132 o.add(buildEntityAnnotation()); | 131 o.add(buildEntityAnnotation()); |
| 133 return o; | 132 return o; |
| 134 } | 133 } |
| 135 | 134 |
| 136 checkUnnamed1310(core.List<api.EntityAnnotation> o) { | 135 checkUnnamed1306(core.List<api.EntityAnnotation> o) { |
| 137 unittest.expect(o, unittest.hasLength(2)); | 136 unittest.expect(o, unittest.hasLength(2)); |
| 138 checkEntityAnnotation(o[0]); | 137 checkEntityAnnotation(o[0]); |
| 139 checkEntityAnnotation(o[1]); | 138 checkEntityAnnotation(o[1]); |
| 140 } | 139 } |
| 141 | 140 |
| 142 buildUnnamed1311() { | 141 buildUnnamed1307() { |
| 143 var o = new core.List<api.EntityAnnotation>(); | 142 var o = new core.List<api.EntityAnnotation>(); |
| 144 o.add(buildEntityAnnotation()); | 143 o.add(buildEntityAnnotation()); |
| 145 o.add(buildEntityAnnotation()); | 144 o.add(buildEntityAnnotation()); |
| 146 return o; | 145 return o; |
| 147 } | 146 } |
| 148 | 147 |
| 149 checkUnnamed1311(core.List<api.EntityAnnotation> o) { | 148 checkUnnamed1307(core.List<api.EntityAnnotation> o) { |
| 150 unittest.expect(o, unittest.hasLength(2)); | 149 unittest.expect(o, unittest.hasLength(2)); |
| 151 checkEntityAnnotation(o[0]); | 150 checkEntityAnnotation(o[0]); |
| 152 checkEntityAnnotation(o[1]); | 151 checkEntityAnnotation(o[1]); |
| 153 } | 152 } |
| 154 | 153 |
| 155 core.int buildCounterAnnotateImageResponse = 0; | 154 core.int buildCounterAnnotateImageResponse = 0; |
| 156 buildAnnotateImageResponse() { | 155 buildAnnotateImageResponse() { |
| 157 var o = new api.AnnotateImageResponse(); | 156 var o = new api.AnnotateImageResponse(); |
| 158 buildCounterAnnotateImageResponse++; | 157 buildCounterAnnotateImageResponse++; |
| 159 if (buildCounterAnnotateImageResponse < 3) { | 158 if (buildCounterAnnotateImageResponse < 3) { |
| 160 o.cropHintsAnnotation = buildCropHintsAnnotation(); | 159 o.cropHintsAnnotation = buildCropHintsAnnotation(); |
| 161 o.error = buildStatus(); | 160 o.error = buildStatus(); |
| 162 o.faceAnnotations = buildUnnamed1307(); | 161 o.faceAnnotations = buildUnnamed1303(); |
| 163 o.fullTextAnnotation = buildTextAnnotation(); | 162 o.fullTextAnnotation = buildTextAnnotation(); |
| 164 o.imagePropertiesAnnotation = buildImageProperties(); | 163 o.imagePropertiesAnnotation = buildImageProperties(); |
| 165 o.labelAnnotations = buildUnnamed1308(); | 164 o.labelAnnotations = buildUnnamed1304(); |
| 166 o.landmarkAnnotations = buildUnnamed1309(); | 165 o.landmarkAnnotations = buildUnnamed1305(); |
| 167 o.logoAnnotations = buildUnnamed1310(); | 166 o.logoAnnotations = buildUnnamed1306(); |
| 168 o.safeSearchAnnotation = buildSafeSearchAnnotation(); | 167 o.safeSearchAnnotation = buildSafeSearchAnnotation(); |
| 169 o.textAnnotations = buildUnnamed1311(); | 168 o.textAnnotations = buildUnnamed1307(); |
| 170 o.webDetection = buildWebDetection(); | 169 o.webDetection = buildWebDetection(); |
| 171 } | 170 } |
| 172 buildCounterAnnotateImageResponse--; | 171 buildCounterAnnotateImageResponse--; |
| 173 return o; | 172 return o; |
| 174 } | 173 } |
| 175 | 174 |
| 176 checkAnnotateImageResponse(api.AnnotateImageResponse o) { | 175 checkAnnotateImageResponse(api.AnnotateImageResponse o) { |
| 177 buildCounterAnnotateImageResponse++; | 176 buildCounterAnnotateImageResponse++; |
| 178 if (buildCounterAnnotateImageResponse < 3) { | 177 if (buildCounterAnnotateImageResponse < 3) { |
| 179 checkCropHintsAnnotation(o.cropHintsAnnotation); | 178 checkCropHintsAnnotation(o.cropHintsAnnotation); |
| 180 checkStatus(o.error); | 179 checkStatus(o.error); |
| 181 checkUnnamed1307(o.faceAnnotations); | 180 checkUnnamed1303(o.faceAnnotations); |
| 182 checkTextAnnotation(o.fullTextAnnotation); | 181 checkTextAnnotation(o.fullTextAnnotation); |
| 183 checkImageProperties(o.imagePropertiesAnnotation); | 182 checkImageProperties(o.imagePropertiesAnnotation); |
| 184 checkUnnamed1308(o.labelAnnotations); | 183 checkUnnamed1304(o.labelAnnotations); |
| 185 checkUnnamed1309(o.landmarkAnnotations); | 184 checkUnnamed1305(o.landmarkAnnotations); |
| 186 checkUnnamed1310(o.logoAnnotations); | 185 checkUnnamed1306(o.logoAnnotations); |
| 187 checkSafeSearchAnnotation(o.safeSearchAnnotation); | 186 checkSafeSearchAnnotation(o.safeSearchAnnotation); |
| 188 checkUnnamed1311(o.textAnnotations); | 187 checkUnnamed1307(o.textAnnotations); |
| 189 checkWebDetection(o.webDetection); | 188 checkWebDetection(o.webDetection); |
| 190 } | 189 } |
| 191 buildCounterAnnotateImageResponse--; | 190 buildCounterAnnotateImageResponse--; |
| 192 } | 191 } |
| 193 | 192 |
| 194 buildUnnamed1312() { | 193 buildUnnamed1308() { |
| 195 var o = new core.List<api.AnnotateImageRequest>(); | 194 var o = new core.List<api.AnnotateImageRequest>(); |
| 196 o.add(buildAnnotateImageRequest()); | 195 o.add(buildAnnotateImageRequest()); |
| 197 o.add(buildAnnotateImageRequest()); | 196 o.add(buildAnnotateImageRequest()); |
| 198 return o; | 197 return o; |
| 199 } | 198 } |
| 200 | 199 |
| 201 checkUnnamed1312(core.List<api.AnnotateImageRequest> o) { | 200 checkUnnamed1308(core.List<api.AnnotateImageRequest> o) { |
| 202 unittest.expect(o, unittest.hasLength(2)); | 201 unittest.expect(o, unittest.hasLength(2)); |
| 203 checkAnnotateImageRequest(o[0]); | 202 checkAnnotateImageRequest(o[0]); |
| 204 checkAnnotateImageRequest(o[1]); | 203 checkAnnotateImageRequest(o[1]); |
| 205 } | 204 } |
| 206 | 205 |
| 207 core.int buildCounterBatchAnnotateImagesRequest = 0; | 206 core.int buildCounterBatchAnnotateImagesRequest = 0; |
| 208 buildBatchAnnotateImagesRequest() { | 207 buildBatchAnnotateImagesRequest() { |
| 209 var o = new api.BatchAnnotateImagesRequest(); | 208 var o = new api.BatchAnnotateImagesRequest(); |
| 210 buildCounterBatchAnnotateImagesRequest++; | 209 buildCounterBatchAnnotateImagesRequest++; |
| 211 if (buildCounterBatchAnnotateImagesRequest < 3) { | 210 if (buildCounterBatchAnnotateImagesRequest < 3) { |
| 212 o.requests = buildUnnamed1312(); | 211 o.requests = buildUnnamed1308(); |
| 213 } | 212 } |
| 214 buildCounterBatchAnnotateImagesRequest--; | 213 buildCounterBatchAnnotateImagesRequest--; |
| 215 return o; | 214 return o; |
| 216 } | 215 } |
| 217 | 216 |
| 218 checkBatchAnnotateImagesRequest(api.BatchAnnotateImagesRequest o) { | 217 checkBatchAnnotateImagesRequest(api.BatchAnnotateImagesRequest o) { |
| 219 buildCounterBatchAnnotateImagesRequest++; | 218 buildCounterBatchAnnotateImagesRequest++; |
| 220 if (buildCounterBatchAnnotateImagesRequest < 3) { | 219 if (buildCounterBatchAnnotateImagesRequest < 3) { |
| 221 checkUnnamed1312(o.requests); | 220 checkUnnamed1308(o.requests); |
| 222 } | 221 } |
| 223 buildCounterBatchAnnotateImagesRequest--; | 222 buildCounterBatchAnnotateImagesRequest--; |
| 224 } | 223 } |
| 225 | 224 |
| 226 buildUnnamed1313() { | 225 buildUnnamed1309() { |
| 227 var o = new core.List<api.AnnotateImageResponse>(); | 226 var o = new core.List<api.AnnotateImageResponse>(); |
| 228 o.add(buildAnnotateImageResponse()); | 227 o.add(buildAnnotateImageResponse()); |
| 229 o.add(buildAnnotateImageResponse()); | 228 o.add(buildAnnotateImageResponse()); |
| 230 return o; | 229 return o; |
| 231 } | 230 } |
| 232 | 231 |
| 233 checkUnnamed1313(core.List<api.AnnotateImageResponse> o) { | 232 checkUnnamed1309(core.List<api.AnnotateImageResponse> o) { |
| 234 unittest.expect(o, unittest.hasLength(2)); | 233 unittest.expect(o, unittest.hasLength(2)); |
| 235 checkAnnotateImageResponse(o[0]); | 234 checkAnnotateImageResponse(o[0]); |
| 236 checkAnnotateImageResponse(o[1]); | 235 checkAnnotateImageResponse(o[1]); |
| 237 } | 236 } |
| 238 | 237 |
| 239 core.int buildCounterBatchAnnotateImagesResponse = 0; | 238 core.int buildCounterBatchAnnotateImagesResponse = 0; |
| 240 buildBatchAnnotateImagesResponse() { | 239 buildBatchAnnotateImagesResponse() { |
| 241 var o = new api.BatchAnnotateImagesResponse(); | 240 var o = new api.BatchAnnotateImagesResponse(); |
| 242 buildCounterBatchAnnotateImagesResponse++; | 241 buildCounterBatchAnnotateImagesResponse++; |
| 243 if (buildCounterBatchAnnotateImagesResponse < 3) { | 242 if (buildCounterBatchAnnotateImagesResponse < 3) { |
| 244 o.responses = buildUnnamed1313(); | 243 o.responses = buildUnnamed1309(); |
| 245 } | 244 } |
| 246 buildCounterBatchAnnotateImagesResponse--; | 245 buildCounterBatchAnnotateImagesResponse--; |
| 247 return o; | 246 return o; |
| 248 } | 247 } |
| 249 | 248 |
| 250 checkBatchAnnotateImagesResponse(api.BatchAnnotateImagesResponse o) { | 249 checkBatchAnnotateImagesResponse(api.BatchAnnotateImagesResponse o) { |
| 251 buildCounterBatchAnnotateImagesResponse++; | 250 buildCounterBatchAnnotateImagesResponse++; |
| 252 if (buildCounterBatchAnnotateImagesResponse < 3) { | 251 if (buildCounterBatchAnnotateImagesResponse < 3) { |
| 253 checkUnnamed1313(o.responses); | 252 checkUnnamed1309(o.responses); |
| 254 } | 253 } |
| 255 buildCounterBatchAnnotateImagesResponse--; | 254 buildCounterBatchAnnotateImagesResponse--; |
| 256 } | 255 } |
| 257 | 256 |
| 258 buildUnnamed1314() { | 257 buildUnnamed1310() { |
| 259 var o = new core.List<api.Paragraph>(); | 258 var o = new core.List<api.Paragraph>(); |
| 260 o.add(buildParagraph()); | 259 o.add(buildParagraph()); |
| 261 o.add(buildParagraph()); | 260 o.add(buildParagraph()); |
| 262 return o; | 261 return o; |
| 263 } | 262 } |
| 264 | 263 |
| 265 checkUnnamed1314(core.List<api.Paragraph> o) { | 264 checkUnnamed1310(core.List<api.Paragraph> o) { |
| 266 unittest.expect(o, unittest.hasLength(2)); | 265 unittest.expect(o, unittest.hasLength(2)); |
| 267 checkParagraph(o[0]); | 266 checkParagraph(o[0]); |
| 268 checkParagraph(o[1]); | 267 checkParagraph(o[1]); |
| 269 } | 268 } |
| 270 | 269 |
| 271 core.int buildCounterBlock = 0; | 270 core.int buildCounterBlock = 0; |
| 272 buildBlock() { | 271 buildBlock() { |
| 273 var o = new api.Block(); | 272 var o = new api.Block(); |
| 274 buildCounterBlock++; | 273 buildCounterBlock++; |
| 275 if (buildCounterBlock < 3) { | 274 if (buildCounterBlock < 3) { |
| 276 o.blockType = "foo"; | 275 o.blockType = "foo"; |
| 277 o.boundingBox = buildBoundingPoly(); | 276 o.boundingBox = buildBoundingPoly(); |
| 278 o.paragraphs = buildUnnamed1314(); | 277 o.paragraphs = buildUnnamed1310(); |
| 279 o.property = buildTextProperty(); | 278 o.property = buildTextProperty(); |
| 280 } | 279 } |
| 281 buildCounterBlock--; | 280 buildCounterBlock--; |
| 282 return o; | 281 return o; |
| 283 } | 282 } |
| 284 | 283 |
| 285 checkBlock(api.Block o) { | 284 checkBlock(api.Block o) { |
| 286 buildCounterBlock++; | 285 buildCounterBlock++; |
| 287 if (buildCounterBlock < 3) { | 286 if (buildCounterBlock < 3) { |
| 288 unittest.expect(o.blockType, unittest.equals('foo')); | 287 unittest.expect(o.blockType, unittest.equals('foo')); |
| 289 checkBoundingPoly(o.boundingBox); | 288 checkBoundingPoly(o.boundingBox); |
| 290 checkUnnamed1314(o.paragraphs); | 289 checkUnnamed1310(o.paragraphs); |
| 291 checkTextProperty(o.property); | 290 checkTextProperty(o.property); |
| 292 } | 291 } |
| 293 buildCounterBlock--; | 292 buildCounterBlock--; |
| 294 } | 293 } |
| 295 | 294 |
| 296 buildUnnamed1315() { | 295 buildUnnamed1311() { |
| 297 var o = new core.List<api.Vertex>(); | 296 var o = new core.List<api.Vertex>(); |
| 298 o.add(buildVertex()); | 297 o.add(buildVertex()); |
| 299 o.add(buildVertex()); | 298 o.add(buildVertex()); |
| 300 return o; | 299 return o; |
| 301 } | 300 } |
| 302 | 301 |
| 303 checkUnnamed1315(core.List<api.Vertex> o) { | 302 checkUnnamed1311(core.List<api.Vertex> o) { |
| 304 unittest.expect(o, unittest.hasLength(2)); | 303 unittest.expect(o, unittest.hasLength(2)); |
| 305 checkVertex(o[0]); | 304 checkVertex(o[0]); |
| 306 checkVertex(o[1]); | 305 checkVertex(o[1]); |
| 307 } | 306 } |
| 308 | 307 |
| 309 core.int buildCounterBoundingPoly = 0; | 308 core.int buildCounterBoundingPoly = 0; |
| 310 buildBoundingPoly() { | 309 buildBoundingPoly() { |
| 311 var o = new api.BoundingPoly(); | 310 var o = new api.BoundingPoly(); |
| 312 buildCounterBoundingPoly++; | 311 buildCounterBoundingPoly++; |
| 313 if (buildCounterBoundingPoly < 3) { | 312 if (buildCounterBoundingPoly < 3) { |
| 314 o.vertices = buildUnnamed1315(); | 313 o.vertices = buildUnnamed1311(); |
| 315 } | 314 } |
| 316 buildCounterBoundingPoly--; | 315 buildCounterBoundingPoly--; |
| 317 return o; | 316 return o; |
| 318 } | 317 } |
| 319 | 318 |
| 320 checkBoundingPoly(api.BoundingPoly o) { | 319 checkBoundingPoly(api.BoundingPoly o) { |
| 321 buildCounterBoundingPoly++; | 320 buildCounterBoundingPoly++; |
| 322 if (buildCounterBoundingPoly < 3) { | 321 if (buildCounterBoundingPoly < 3) { |
| 323 checkUnnamed1315(o.vertices); | 322 checkUnnamed1311(o.vertices); |
| 324 } | 323 } |
| 325 buildCounterBoundingPoly--; | 324 buildCounterBoundingPoly--; |
| 326 } | 325 } |
| 327 | 326 |
| 328 core.int buildCounterColor = 0; | 327 core.int buildCounterColor = 0; |
| 329 buildColor() { | 328 buildColor() { |
| 330 var o = new api.Color(); | 329 var o = new api.Color(); |
| 331 buildCounterColor++; | 330 buildCounterColor++; |
| 332 if (buildCounterColor < 3) { | 331 if (buildCounterColor < 3) { |
| 333 o.alpha = 42.0; | 332 o.alpha = 42.0; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 checkCropHint(api.CropHint o) { | 388 checkCropHint(api.CropHint o) { |
| 390 buildCounterCropHint++; | 389 buildCounterCropHint++; |
| 391 if (buildCounterCropHint < 3) { | 390 if (buildCounterCropHint < 3) { |
| 392 checkBoundingPoly(o.boundingPoly); | 391 checkBoundingPoly(o.boundingPoly); |
| 393 unittest.expect(o.confidence, unittest.equals(42.0)); | 392 unittest.expect(o.confidence, unittest.equals(42.0)); |
| 394 unittest.expect(o.importanceFraction, unittest.equals(42.0)); | 393 unittest.expect(o.importanceFraction, unittest.equals(42.0)); |
| 395 } | 394 } |
| 396 buildCounterCropHint--; | 395 buildCounterCropHint--; |
| 397 } | 396 } |
| 398 | 397 |
| 399 buildUnnamed1316() { | 398 buildUnnamed1312() { |
| 400 var o = new core.List<api.CropHint>(); | 399 var o = new core.List<api.CropHint>(); |
| 401 o.add(buildCropHint()); | 400 o.add(buildCropHint()); |
| 402 o.add(buildCropHint()); | 401 o.add(buildCropHint()); |
| 403 return o; | 402 return o; |
| 404 } | 403 } |
| 405 | 404 |
| 406 checkUnnamed1316(core.List<api.CropHint> o) { | 405 checkUnnamed1312(core.List<api.CropHint> o) { |
| 407 unittest.expect(o, unittest.hasLength(2)); | 406 unittest.expect(o, unittest.hasLength(2)); |
| 408 checkCropHint(o[0]); | 407 checkCropHint(o[0]); |
| 409 checkCropHint(o[1]); | 408 checkCropHint(o[1]); |
| 410 } | 409 } |
| 411 | 410 |
| 412 core.int buildCounterCropHintsAnnotation = 0; | 411 core.int buildCounterCropHintsAnnotation = 0; |
| 413 buildCropHintsAnnotation() { | 412 buildCropHintsAnnotation() { |
| 414 var o = new api.CropHintsAnnotation(); | 413 var o = new api.CropHintsAnnotation(); |
| 415 buildCounterCropHintsAnnotation++; | 414 buildCounterCropHintsAnnotation++; |
| 416 if (buildCounterCropHintsAnnotation < 3) { | 415 if (buildCounterCropHintsAnnotation < 3) { |
| 417 o.cropHints = buildUnnamed1316(); | 416 o.cropHints = buildUnnamed1312(); |
| 418 } | 417 } |
| 419 buildCounterCropHintsAnnotation--; | 418 buildCounterCropHintsAnnotation--; |
| 420 return o; | 419 return o; |
| 421 } | 420 } |
| 422 | 421 |
| 423 checkCropHintsAnnotation(api.CropHintsAnnotation o) { | 422 checkCropHintsAnnotation(api.CropHintsAnnotation o) { |
| 424 buildCounterCropHintsAnnotation++; | 423 buildCounterCropHintsAnnotation++; |
| 425 if (buildCounterCropHintsAnnotation < 3) { | 424 if (buildCounterCropHintsAnnotation < 3) { |
| 426 checkUnnamed1316(o.cropHints); | 425 checkUnnamed1312(o.cropHints); |
| 427 } | 426 } |
| 428 buildCounterCropHintsAnnotation--; | 427 buildCounterCropHintsAnnotation--; |
| 429 } | 428 } |
| 430 | 429 |
| 431 buildUnnamed1317() { | 430 buildUnnamed1313() { |
| 432 var o = new core.List<core.double>(); | 431 var o = new core.List<core.double>(); |
| 433 o.add(42.0); | 432 o.add(42.0); |
| 434 o.add(42.0); | 433 o.add(42.0); |
| 435 return o; | 434 return o; |
| 436 } | 435 } |
| 437 | 436 |
| 438 checkUnnamed1317(core.List<core.double> o) { | 437 checkUnnamed1313(core.List<core.double> o) { |
| 439 unittest.expect(o, unittest.hasLength(2)); | 438 unittest.expect(o, unittest.hasLength(2)); |
| 440 unittest.expect(o[0], unittest.equals(42.0)); | 439 unittest.expect(o[0], unittest.equals(42.0)); |
| 441 unittest.expect(o[1], unittest.equals(42.0)); | 440 unittest.expect(o[1], unittest.equals(42.0)); |
| 442 } | 441 } |
| 443 | 442 |
| 444 core.int buildCounterCropHintsParams = 0; | 443 core.int buildCounterCropHintsParams = 0; |
| 445 buildCropHintsParams() { | 444 buildCropHintsParams() { |
| 446 var o = new api.CropHintsParams(); | 445 var o = new api.CropHintsParams(); |
| 447 buildCounterCropHintsParams++; | 446 buildCounterCropHintsParams++; |
| 448 if (buildCounterCropHintsParams < 3) { | 447 if (buildCounterCropHintsParams < 3) { |
| 449 o.aspectRatios = buildUnnamed1317(); | 448 o.aspectRatios = buildUnnamed1313(); |
| 450 } | 449 } |
| 451 buildCounterCropHintsParams--; | 450 buildCounterCropHintsParams--; |
| 452 return o; | 451 return o; |
| 453 } | 452 } |
| 454 | 453 |
| 455 checkCropHintsParams(api.CropHintsParams o) { | 454 checkCropHintsParams(api.CropHintsParams o) { |
| 456 buildCounterCropHintsParams++; | 455 buildCounterCropHintsParams++; |
| 457 if (buildCounterCropHintsParams < 3) { | 456 if (buildCounterCropHintsParams < 3) { |
| 458 checkUnnamed1317(o.aspectRatios); | 457 checkUnnamed1313(o.aspectRatios); |
| 459 } | 458 } |
| 460 buildCounterCropHintsParams--; | 459 buildCounterCropHintsParams--; |
| 461 } | 460 } |
| 462 | 461 |
| 463 core.int buildCounterDetectedBreak = 0; | 462 core.int buildCounterDetectedBreak = 0; |
| 464 buildDetectedBreak() { | 463 buildDetectedBreak() { |
| 465 var o = new api.DetectedBreak(); | 464 var o = new api.DetectedBreak(); |
| 466 buildCounterDetectedBreak++; | 465 buildCounterDetectedBreak++; |
| 467 if (buildCounterDetectedBreak < 3) { | 466 if (buildCounterDetectedBreak < 3) { |
| 468 o.isPrefix = true; | 467 o.isPrefix = true; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 495 | 494 |
| 496 checkDetectedLanguage(api.DetectedLanguage o) { | 495 checkDetectedLanguage(api.DetectedLanguage o) { |
| 497 buildCounterDetectedLanguage++; | 496 buildCounterDetectedLanguage++; |
| 498 if (buildCounterDetectedLanguage < 3) { | 497 if (buildCounterDetectedLanguage < 3) { |
| 499 unittest.expect(o.confidence, unittest.equals(42.0)); | 498 unittest.expect(o.confidence, unittest.equals(42.0)); |
| 500 unittest.expect(o.languageCode, unittest.equals('foo')); | 499 unittest.expect(o.languageCode, unittest.equals('foo')); |
| 501 } | 500 } |
| 502 buildCounterDetectedLanguage--; | 501 buildCounterDetectedLanguage--; |
| 503 } | 502 } |
| 504 | 503 |
| 505 buildUnnamed1318() { | 504 buildUnnamed1314() { |
| 506 var o = new core.List<api.ColorInfo>(); | 505 var o = new core.List<api.ColorInfo>(); |
| 507 o.add(buildColorInfo()); | 506 o.add(buildColorInfo()); |
| 508 o.add(buildColorInfo()); | 507 o.add(buildColorInfo()); |
| 509 return o; | 508 return o; |
| 510 } | 509 } |
| 511 | 510 |
| 512 checkUnnamed1318(core.List<api.ColorInfo> o) { | 511 checkUnnamed1314(core.List<api.ColorInfo> o) { |
| 513 unittest.expect(o, unittest.hasLength(2)); | 512 unittest.expect(o, unittest.hasLength(2)); |
| 514 checkColorInfo(o[0]); | 513 checkColorInfo(o[0]); |
| 515 checkColorInfo(o[1]); | 514 checkColorInfo(o[1]); |
| 516 } | 515 } |
| 517 | 516 |
| 518 core.int buildCounterDominantColorsAnnotation = 0; | 517 core.int buildCounterDominantColorsAnnotation = 0; |
| 519 buildDominantColorsAnnotation() { | 518 buildDominantColorsAnnotation() { |
| 520 var o = new api.DominantColorsAnnotation(); | 519 var o = new api.DominantColorsAnnotation(); |
| 521 buildCounterDominantColorsAnnotation++; | 520 buildCounterDominantColorsAnnotation++; |
| 522 if (buildCounterDominantColorsAnnotation < 3) { | 521 if (buildCounterDominantColorsAnnotation < 3) { |
| 523 o.colors = buildUnnamed1318(); | 522 o.colors = buildUnnamed1314(); |
| 524 } | 523 } |
| 525 buildCounterDominantColorsAnnotation--; | 524 buildCounterDominantColorsAnnotation--; |
| 526 return o; | 525 return o; |
| 527 } | 526 } |
| 528 | 527 |
| 529 checkDominantColorsAnnotation(api.DominantColorsAnnotation o) { | 528 checkDominantColorsAnnotation(api.DominantColorsAnnotation o) { |
| 530 buildCounterDominantColorsAnnotation++; | 529 buildCounterDominantColorsAnnotation++; |
| 531 if (buildCounterDominantColorsAnnotation < 3) { | 530 if (buildCounterDominantColorsAnnotation < 3) { |
| 532 checkUnnamed1318(o.colors); | 531 checkUnnamed1314(o.colors); |
| 533 } | 532 } |
| 534 buildCounterDominantColorsAnnotation--; | 533 buildCounterDominantColorsAnnotation--; |
| 535 } | 534 } |
| 536 | 535 |
| 537 buildUnnamed1319() { | 536 buildUnnamed1315() { |
| 538 var o = new core.List<api.LocationInfo>(); | 537 var o = new core.List<api.LocationInfo>(); |
| 539 o.add(buildLocationInfo()); | 538 o.add(buildLocationInfo()); |
| 540 o.add(buildLocationInfo()); | 539 o.add(buildLocationInfo()); |
| 541 return o; | 540 return o; |
| 542 } | 541 } |
| 543 | 542 |
| 544 checkUnnamed1319(core.List<api.LocationInfo> o) { | 543 checkUnnamed1315(core.List<api.LocationInfo> o) { |
| 545 unittest.expect(o, unittest.hasLength(2)); | 544 unittest.expect(o, unittest.hasLength(2)); |
| 546 checkLocationInfo(o[0]); | 545 checkLocationInfo(o[0]); |
| 547 checkLocationInfo(o[1]); | 546 checkLocationInfo(o[1]); |
| 548 } | 547 } |
| 549 | 548 |
| 550 buildUnnamed1320() { | 549 buildUnnamed1316() { |
| 551 var o = new core.List<api.Property>(); | 550 var o = new core.List<api.Property>(); |
| 552 o.add(buildProperty()); | 551 o.add(buildProperty()); |
| 553 o.add(buildProperty()); | 552 o.add(buildProperty()); |
| 554 return o; | 553 return o; |
| 555 } | 554 } |
| 556 | 555 |
| 557 checkUnnamed1320(core.List<api.Property> o) { | 556 checkUnnamed1316(core.List<api.Property> o) { |
| 558 unittest.expect(o, unittest.hasLength(2)); | 557 unittest.expect(o, unittest.hasLength(2)); |
| 559 checkProperty(o[0]); | 558 checkProperty(o[0]); |
| 560 checkProperty(o[1]); | 559 checkProperty(o[1]); |
| 561 } | 560 } |
| 562 | 561 |
| 563 core.int buildCounterEntityAnnotation = 0; | 562 core.int buildCounterEntityAnnotation = 0; |
| 564 buildEntityAnnotation() { | 563 buildEntityAnnotation() { |
| 565 var o = new api.EntityAnnotation(); | 564 var o = new api.EntityAnnotation(); |
| 566 buildCounterEntityAnnotation++; | 565 buildCounterEntityAnnotation++; |
| 567 if (buildCounterEntityAnnotation < 3) { | 566 if (buildCounterEntityAnnotation < 3) { |
| 568 o.boundingPoly = buildBoundingPoly(); | 567 o.boundingPoly = buildBoundingPoly(); |
| 569 o.confidence = 42.0; | 568 o.confidence = 42.0; |
| 570 o.description = "foo"; | 569 o.description = "foo"; |
| 571 o.locale = "foo"; | 570 o.locale = "foo"; |
| 572 o.locations = buildUnnamed1319(); | 571 o.locations = buildUnnamed1315(); |
| 573 o.mid = "foo"; | 572 o.mid = "foo"; |
| 574 o.properties = buildUnnamed1320(); | 573 o.properties = buildUnnamed1316(); |
| 575 o.score = 42.0; | 574 o.score = 42.0; |
| 576 o.topicality = 42.0; | 575 o.topicality = 42.0; |
| 577 } | 576 } |
| 578 buildCounterEntityAnnotation--; | 577 buildCounterEntityAnnotation--; |
| 579 return o; | 578 return o; |
| 580 } | 579 } |
| 581 | 580 |
| 582 checkEntityAnnotation(api.EntityAnnotation o) { | 581 checkEntityAnnotation(api.EntityAnnotation o) { |
| 583 buildCounterEntityAnnotation++; | 582 buildCounterEntityAnnotation++; |
| 584 if (buildCounterEntityAnnotation < 3) { | 583 if (buildCounterEntityAnnotation < 3) { |
| 585 checkBoundingPoly(o.boundingPoly); | 584 checkBoundingPoly(o.boundingPoly); |
| 586 unittest.expect(o.confidence, unittest.equals(42.0)); | 585 unittest.expect(o.confidence, unittest.equals(42.0)); |
| 587 unittest.expect(o.description, unittest.equals('foo')); | 586 unittest.expect(o.description, unittest.equals('foo')); |
| 588 unittest.expect(o.locale, unittest.equals('foo')); | 587 unittest.expect(o.locale, unittest.equals('foo')); |
| 589 checkUnnamed1319(o.locations); | 588 checkUnnamed1315(o.locations); |
| 590 unittest.expect(o.mid, unittest.equals('foo')); | 589 unittest.expect(o.mid, unittest.equals('foo')); |
| 591 checkUnnamed1320(o.properties); | 590 checkUnnamed1316(o.properties); |
| 592 unittest.expect(o.score, unittest.equals(42.0)); | 591 unittest.expect(o.score, unittest.equals(42.0)); |
| 593 unittest.expect(o.topicality, unittest.equals(42.0)); | 592 unittest.expect(o.topicality, unittest.equals(42.0)); |
| 594 } | 593 } |
| 595 buildCounterEntityAnnotation--; | 594 buildCounterEntityAnnotation--; |
| 596 } | 595 } |
| 597 | 596 |
| 598 buildUnnamed1321() { | 597 buildUnnamed1317() { |
| 599 var o = new core.List<api.Landmark>(); | 598 var o = new core.List<api.Landmark>(); |
| 600 o.add(buildLandmark()); | 599 o.add(buildLandmark()); |
| 601 o.add(buildLandmark()); | 600 o.add(buildLandmark()); |
| 602 return o; | 601 return o; |
| 603 } | 602 } |
| 604 | 603 |
| 605 checkUnnamed1321(core.List<api.Landmark> o) { | 604 checkUnnamed1317(core.List<api.Landmark> o) { |
| 606 unittest.expect(o, unittest.hasLength(2)); | 605 unittest.expect(o, unittest.hasLength(2)); |
| 607 checkLandmark(o[0]); | 606 checkLandmark(o[0]); |
| 608 checkLandmark(o[1]); | 607 checkLandmark(o[1]); |
| 609 } | 608 } |
| 610 | 609 |
| 611 core.int buildCounterFaceAnnotation = 0; | 610 core.int buildCounterFaceAnnotation = 0; |
| 612 buildFaceAnnotation() { | 611 buildFaceAnnotation() { |
| 613 var o = new api.FaceAnnotation(); | 612 var o = new api.FaceAnnotation(); |
| 614 buildCounterFaceAnnotation++; | 613 buildCounterFaceAnnotation++; |
| 615 if (buildCounterFaceAnnotation < 3) { | 614 if (buildCounterFaceAnnotation < 3) { |
| 616 o.angerLikelihood = "foo"; | 615 o.angerLikelihood = "foo"; |
| 617 o.blurredLikelihood = "foo"; | 616 o.blurredLikelihood = "foo"; |
| 618 o.boundingPoly = buildBoundingPoly(); | 617 o.boundingPoly = buildBoundingPoly(); |
| 619 o.detectionConfidence = 42.0; | 618 o.detectionConfidence = 42.0; |
| 620 o.fdBoundingPoly = buildBoundingPoly(); | 619 o.fdBoundingPoly = buildBoundingPoly(); |
| 621 o.headwearLikelihood = "foo"; | 620 o.headwearLikelihood = "foo"; |
| 622 o.joyLikelihood = "foo"; | 621 o.joyLikelihood = "foo"; |
| 623 o.landmarkingConfidence = 42.0; | 622 o.landmarkingConfidence = 42.0; |
| 624 o.landmarks = buildUnnamed1321(); | 623 o.landmarks = buildUnnamed1317(); |
| 625 o.panAngle = 42.0; | 624 o.panAngle = 42.0; |
| 626 o.rollAngle = 42.0; | 625 o.rollAngle = 42.0; |
| 627 o.sorrowLikelihood = "foo"; | 626 o.sorrowLikelihood = "foo"; |
| 628 o.surpriseLikelihood = "foo"; | 627 o.surpriseLikelihood = "foo"; |
| 629 o.tiltAngle = 42.0; | 628 o.tiltAngle = 42.0; |
| 630 o.underExposedLikelihood = "foo"; | 629 o.underExposedLikelihood = "foo"; |
| 631 } | 630 } |
| 632 buildCounterFaceAnnotation--; | 631 buildCounterFaceAnnotation--; |
| 633 return o; | 632 return o; |
| 634 } | 633 } |
| 635 | 634 |
| 636 checkFaceAnnotation(api.FaceAnnotation o) { | 635 checkFaceAnnotation(api.FaceAnnotation o) { |
| 637 buildCounterFaceAnnotation++; | 636 buildCounterFaceAnnotation++; |
| 638 if (buildCounterFaceAnnotation < 3) { | 637 if (buildCounterFaceAnnotation < 3) { |
| 639 unittest.expect(o.angerLikelihood, unittest.equals('foo')); | 638 unittest.expect(o.angerLikelihood, unittest.equals('foo')); |
| 640 unittest.expect(o.blurredLikelihood, unittest.equals('foo')); | 639 unittest.expect(o.blurredLikelihood, unittest.equals('foo')); |
| 641 checkBoundingPoly(o.boundingPoly); | 640 checkBoundingPoly(o.boundingPoly); |
| 642 unittest.expect(o.detectionConfidence, unittest.equals(42.0)); | 641 unittest.expect(o.detectionConfidence, unittest.equals(42.0)); |
| 643 checkBoundingPoly(o.fdBoundingPoly); | 642 checkBoundingPoly(o.fdBoundingPoly); |
| 644 unittest.expect(o.headwearLikelihood, unittest.equals('foo')); | 643 unittest.expect(o.headwearLikelihood, unittest.equals('foo')); |
| 645 unittest.expect(o.joyLikelihood, unittest.equals('foo')); | 644 unittest.expect(o.joyLikelihood, unittest.equals('foo')); |
| 646 unittest.expect(o.landmarkingConfidence, unittest.equals(42.0)); | 645 unittest.expect(o.landmarkingConfidence, unittest.equals(42.0)); |
| 647 checkUnnamed1321(o.landmarks); | 646 checkUnnamed1317(o.landmarks); |
| 648 unittest.expect(o.panAngle, unittest.equals(42.0)); | 647 unittest.expect(o.panAngle, unittest.equals(42.0)); |
| 649 unittest.expect(o.rollAngle, unittest.equals(42.0)); | 648 unittest.expect(o.rollAngle, unittest.equals(42.0)); |
| 650 unittest.expect(o.sorrowLikelihood, unittest.equals('foo')); | 649 unittest.expect(o.sorrowLikelihood, unittest.equals('foo')); |
| 651 unittest.expect(o.surpriseLikelihood, unittest.equals('foo')); | 650 unittest.expect(o.surpriseLikelihood, unittest.equals('foo')); |
| 652 unittest.expect(o.tiltAngle, unittest.equals(42.0)); | 651 unittest.expect(o.tiltAngle, unittest.equals(42.0)); |
| 653 unittest.expect(o.underExposedLikelihood, unittest.equals('foo')); | 652 unittest.expect(o.underExposedLikelihood, unittest.equals('foo')); |
| 654 } | 653 } |
| 655 buildCounterFaceAnnotation--; | 654 buildCounterFaceAnnotation--; |
| 656 } | 655 } |
| 657 | 656 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 689 |
| 691 checkImage(api.Image o) { | 690 checkImage(api.Image o) { |
| 692 buildCounterImage++; | 691 buildCounterImage++; |
| 693 if (buildCounterImage < 3) { | 692 if (buildCounterImage < 3) { |
| 694 unittest.expect(o.content, unittest.equals('foo')); | 693 unittest.expect(o.content, unittest.equals('foo')); |
| 695 checkImageSource(o.source); | 694 checkImageSource(o.source); |
| 696 } | 695 } |
| 697 buildCounterImage--; | 696 buildCounterImage--; |
| 698 } | 697 } |
| 699 | 698 |
| 700 buildUnnamed1322() { | 699 buildUnnamed1318() { |
| 701 var o = new core.List<core.String>(); | 700 var o = new core.List<core.String>(); |
| 702 o.add("foo"); | 701 o.add("foo"); |
| 703 o.add("foo"); | 702 o.add("foo"); |
| 704 return o; | 703 return o; |
| 705 } | 704 } |
| 706 | 705 |
| 707 checkUnnamed1322(core.List<core.String> o) { | 706 checkUnnamed1318(core.List<core.String> o) { |
| 708 unittest.expect(o, unittest.hasLength(2)); | 707 unittest.expect(o, unittest.hasLength(2)); |
| 709 unittest.expect(o[0], unittest.equals('foo')); | 708 unittest.expect(o[0], unittest.equals('foo')); |
| 710 unittest.expect(o[1], unittest.equals('foo')); | 709 unittest.expect(o[1], unittest.equals('foo')); |
| 711 } | 710 } |
| 712 | 711 |
| 713 core.int buildCounterImageContext = 0; | 712 core.int buildCounterImageContext = 0; |
| 714 buildImageContext() { | 713 buildImageContext() { |
| 715 var o = new api.ImageContext(); | 714 var o = new api.ImageContext(); |
| 716 buildCounterImageContext++; | 715 buildCounterImageContext++; |
| 717 if (buildCounterImageContext < 3) { | 716 if (buildCounterImageContext < 3) { |
| 718 o.cropHintsParams = buildCropHintsParams(); | 717 o.cropHintsParams = buildCropHintsParams(); |
| 719 o.languageHints = buildUnnamed1322(); | 718 o.languageHints = buildUnnamed1318(); |
| 720 o.latLongRect = buildLatLongRect(); | 719 o.latLongRect = buildLatLongRect(); |
| 721 } | 720 } |
| 722 buildCounterImageContext--; | 721 buildCounterImageContext--; |
| 723 return o; | 722 return o; |
| 724 } | 723 } |
| 725 | 724 |
| 726 checkImageContext(api.ImageContext o) { | 725 checkImageContext(api.ImageContext o) { |
| 727 buildCounterImageContext++; | 726 buildCounterImageContext++; |
| 728 if (buildCounterImageContext < 3) { | 727 if (buildCounterImageContext < 3) { |
| 729 checkCropHintsParams(o.cropHintsParams); | 728 checkCropHintsParams(o.cropHintsParams); |
| 730 checkUnnamed1322(o.languageHints); | 729 checkUnnamed1318(o.languageHints); |
| 731 checkLatLongRect(o.latLongRect); | 730 checkLatLongRect(o.latLongRect); |
| 732 } | 731 } |
| 733 buildCounterImageContext--; | 732 buildCounterImageContext--; |
| 734 } | 733 } |
| 735 | 734 |
| 736 core.int buildCounterImageProperties = 0; | 735 core.int buildCounterImageProperties = 0; |
| 737 buildImageProperties() { | 736 buildImageProperties() { |
| 738 var o = new api.ImageProperties(); | 737 var o = new api.ImageProperties(); |
| 739 buildCounterImageProperties++; | 738 buildCounterImageProperties++; |
| 740 if (buildCounterImageProperties < 3) { | 739 if (buildCounterImageProperties < 3) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 } | 847 } |
| 849 | 848 |
| 850 checkLocationInfo(api.LocationInfo o) { | 849 checkLocationInfo(api.LocationInfo o) { |
| 851 buildCounterLocationInfo++; | 850 buildCounterLocationInfo++; |
| 852 if (buildCounterLocationInfo < 3) { | 851 if (buildCounterLocationInfo < 3) { |
| 853 checkLatLng(o.latLng); | 852 checkLatLng(o.latLng); |
| 854 } | 853 } |
| 855 buildCounterLocationInfo--; | 854 buildCounterLocationInfo--; |
| 856 } | 855 } |
| 857 | 856 |
| 858 buildUnnamed1323() { | 857 buildUnnamed1319() { |
| 859 var o = new core.List<api.Block>(); | 858 var o = new core.List<api.Block>(); |
| 860 o.add(buildBlock()); | 859 o.add(buildBlock()); |
| 861 o.add(buildBlock()); | 860 o.add(buildBlock()); |
| 862 return o; | 861 return o; |
| 863 } | 862 } |
| 864 | 863 |
| 865 checkUnnamed1323(core.List<api.Block> o) { | 864 checkUnnamed1319(core.List<api.Block> o) { |
| 866 unittest.expect(o, unittest.hasLength(2)); | 865 unittest.expect(o, unittest.hasLength(2)); |
| 867 checkBlock(o[0]); | 866 checkBlock(o[0]); |
| 868 checkBlock(o[1]); | 867 checkBlock(o[1]); |
| 869 } | 868 } |
| 870 | 869 |
| 871 core.int buildCounterPage = 0; | 870 core.int buildCounterPage = 0; |
| 872 buildPage() { | 871 buildPage() { |
| 873 var o = new api.Page(); | 872 var o = new api.Page(); |
| 874 buildCounterPage++; | 873 buildCounterPage++; |
| 875 if (buildCounterPage < 3) { | 874 if (buildCounterPage < 3) { |
| 876 o.blocks = buildUnnamed1323(); | 875 o.blocks = buildUnnamed1319(); |
| 877 o.height = 42; | 876 o.height = 42; |
| 878 o.property = buildTextProperty(); | 877 o.property = buildTextProperty(); |
| 879 o.width = 42; | 878 o.width = 42; |
| 880 } | 879 } |
| 881 buildCounterPage--; | 880 buildCounterPage--; |
| 882 return o; | 881 return o; |
| 883 } | 882 } |
| 884 | 883 |
| 885 checkPage(api.Page o) { | 884 checkPage(api.Page o) { |
| 886 buildCounterPage++; | 885 buildCounterPage++; |
| 887 if (buildCounterPage < 3) { | 886 if (buildCounterPage < 3) { |
| 888 checkUnnamed1323(o.blocks); | 887 checkUnnamed1319(o.blocks); |
| 889 unittest.expect(o.height, unittest.equals(42)); | 888 unittest.expect(o.height, unittest.equals(42)); |
| 890 checkTextProperty(o.property); | 889 checkTextProperty(o.property); |
| 891 unittest.expect(o.width, unittest.equals(42)); | 890 unittest.expect(o.width, unittest.equals(42)); |
| 892 } | 891 } |
| 893 buildCounterPage--; | 892 buildCounterPage--; |
| 894 } | 893 } |
| 895 | 894 |
| 896 buildUnnamed1324() { | 895 buildUnnamed1320() { |
| 897 var o = new core.List<api.Word>(); | 896 var o = new core.List<api.Word>(); |
| 898 o.add(buildWord()); | 897 o.add(buildWord()); |
| 899 o.add(buildWord()); | 898 o.add(buildWord()); |
| 900 return o; | 899 return o; |
| 901 } | 900 } |
| 902 | 901 |
| 903 checkUnnamed1324(core.List<api.Word> o) { | 902 checkUnnamed1320(core.List<api.Word> o) { |
| 904 unittest.expect(o, unittest.hasLength(2)); | 903 unittest.expect(o, unittest.hasLength(2)); |
| 905 checkWord(o[0]); | 904 checkWord(o[0]); |
| 906 checkWord(o[1]); | 905 checkWord(o[1]); |
| 907 } | 906 } |
| 908 | 907 |
| 909 core.int buildCounterParagraph = 0; | 908 core.int buildCounterParagraph = 0; |
| 910 buildParagraph() { | 909 buildParagraph() { |
| 911 var o = new api.Paragraph(); | 910 var o = new api.Paragraph(); |
| 912 buildCounterParagraph++; | 911 buildCounterParagraph++; |
| 913 if (buildCounterParagraph < 3) { | 912 if (buildCounterParagraph < 3) { |
| 914 o.boundingBox = buildBoundingPoly(); | 913 o.boundingBox = buildBoundingPoly(); |
| 915 o.property = buildTextProperty(); | 914 o.property = buildTextProperty(); |
| 916 o.words = buildUnnamed1324(); | 915 o.words = buildUnnamed1320(); |
| 917 } | 916 } |
| 918 buildCounterParagraph--; | 917 buildCounterParagraph--; |
| 919 return o; | 918 return o; |
| 920 } | 919 } |
| 921 | 920 |
| 922 checkParagraph(api.Paragraph o) { | 921 checkParagraph(api.Paragraph o) { |
| 923 buildCounterParagraph++; | 922 buildCounterParagraph++; |
| 924 if (buildCounterParagraph < 3) { | 923 if (buildCounterParagraph < 3) { |
| 925 checkBoundingPoly(o.boundingBox); | 924 checkBoundingPoly(o.boundingBox); |
| 926 checkTextProperty(o.property); | 925 checkTextProperty(o.property); |
| 927 checkUnnamed1324(o.words); | 926 checkUnnamed1320(o.words); |
| 928 } | 927 } |
| 929 buildCounterParagraph--; | 928 buildCounterParagraph--; |
| 930 } | 929 } |
| 931 | 930 |
| 932 core.int buildCounterPosition = 0; | 931 core.int buildCounterPosition = 0; |
| 933 buildPosition() { | 932 buildPosition() { |
| 934 var o = new api.Position(); | 933 var o = new api.Position(); |
| 935 buildCounterPosition++; | 934 buildCounterPosition++; |
| 936 if (buildCounterPosition < 3) { | 935 if (buildCounterPosition < 3) { |
| 937 o.x = 42.0; | 936 o.x = 42.0; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 buildCounterSafeSearchAnnotation++; | 992 buildCounterSafeSearchAnnotation++; |
| 994 if (buildCounterSafeSearchAnnotation < 3) { | 993 if (buildCounterSafeSearchAnnotation < 3) { |
| 995 unittest.expect(o.adult, unittest.equals('foo')); | 994 unittest.expect(o.adult, unittest.equals('foo')); |
| 996 unittest.expect(o.medical, unittest.equals('foo')); | 995 unittest.expect(o.medical, unittest.equals('foo')); |
| 997 unittest.expect(o.spoof, unittest.equals('foo')); | 996 unittest.expect(o.spoof, unittest.equals('foo')); |
| 998 unittest.expect(o.violence, unittest.equals('foo')); | 997 unittest.expect(o.violence, unittest.equals('foo')); |
| 999 } | 998 } |
| 1000 buildCounterSafeSearchAnnotation--; | 999 buildCounterSafeSearchAnnotation--; |
| 1001 } | 1000 } |
| 1002 | 1001 |
| 1003 buildUnnamed1325() { | 1002 buildUnnamed1321() { |
| 1004 var o = new core.Map<core.String, core.Object>(); | 1003 var o = new core.Map<core.String, core.Object>(); |
| 1005 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1004 o["x"] = { |
| 1006 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1005 'list': [1, 2, 3], |
| 1006 'bool': true, |
| 1007 'string': 'foo' |
| 1008 }; |
| 1009 o["y"] = { |
| 1010 'list': [1, 2, 3], |
| 1011 'bool': true, |
| 1012 'string': 'foo' |
| 1013 }; |
| 1007 return o; | 1014 return o; |
| 1008 } | 1015 } |
| 1009 | 1016 |
| 1010 checkUnnamed1325(core.Map<core.String, core.Object> o) { | 1017 checkUnnamed1321(core.Map<core.String, core.Object> o) { |
| 1011 unittest.expect(o, unittest.hasLength(2)); | 1018 unittest.expect(o, unittest.hasLength(2)); |
| 1012 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')); | 1019 var casted1 = (o["x"]) as core.Map; |
| 1013 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')); | 1020 unittest.expect(casted1, unittest.hasLength(3)); |
| 1021 unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); |
| 1022 unittest.expect(casted1["bool"], unittest.equals(true)); |
| 1023 unittest.expect(casted1["string"], unittest.equals('foo')); |
| 1024 var casted2 = (o["y"]) as core.Map; |
| 1025 unittest.expect(casted2, unittest.hasLength(3)); |
| 1026 unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); |
| 1027 unittest.expect(casted2["bool"], unittest.equals(true)); |
| 1028 unittest.expect(casted2["string"], unittest.equals('foo')); |
| 1014 } | 1029 } |
| 1015 | 1030 |
| 1016 buildUnnamed1326() { | 1031 buildUnnamed1322() { |
| 1017 var o = new core.List<core.Map<core.String, core.Object>>(); | 1032 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 1018 o.add(buildUnnamed1325()); | 1033 o.add(buildUnnamed1321()); |
| 1019 o.add(buildUnnamed1325()); | 1034 o.add(buildUnnamed1321()); |
| 1020 return o; | 1035 return o; |
| 1021 } | 1036 } |
| 1022 | 1037 |
| 1023 checkUnnamed1326(core.List<core.Map<core.String, core.Object>> o) { | 1038 checkUnnamed1322(core.List<core.Map<core.String, core.Object>> o) { |
| 1024 unittest.expect(o, unittest.hasLength(2)); | 1039 unittest.expect(o, unittest.hasLength(2)); |
| 1025 checkUnnamed1325(o[0]); | 1040 checkUnnamed1321(o[0]); |
| 1026 checkUnnamed1325(o[1]); | 1041 checkUnnamed1321(o[1]); |
| 1027 } | 1042 } |
| 1028 | 1043 |
| 1029 core.int buildCounterStatus = 0; | 1044 core.int buildCounterStatus = 0; |
| 1030 buildStatus() { | 1045 buildStatus() { |
| 1031 var o = new api.Status(); | 1046 var o = new api.Status(); |
| 1032 buildCounterStatus++; | 1047 buildCounterStatus++; |
| 1033 if (buildCounterStatus < 3) { | 1048 if (buildCounterStatus < 3) { |
| 1034 o.code = 42; | 1049 o.code = 42; |
| 1035 o.details = buildUnnamed1326(); | 1050 o.details = buildUnnamed1322(); |
| 1036 o.message = "foo"; | 1051 o.message = "foo"; |
| 1037 } | 1052 } |
| 1038 buildCounterStatus--; | 1053 buildCounterStatus--; |
| 1039 return o; | 1054 return o; |
| 1040 } | 1055 } |
| 1041 | 1056 |
| 1042 checkStatus(api.Status o) { | 1057 checkStatus(api.Status o) { |
| 1043 buildCounterStatus++; | 1058 buildCounterStatus++; |
| 1044 if (buildCounterStatus < 3) { | 1059 if (buildCounterStatus < 3) { |
| 1045 unittest.expect(o.code, unittest.equals(42)); | 1060 unittest.expect(o.code, unittest.equals(42)); |
| 1046 checkUnnamed1326(o.details); | 1061 checkUnnamed1322(o.details); |
| 1047 unittest.expect(o.message, unittest.equals('foo')); | 1062 unittest.expect(o.message, unittest.equals('foo')); |
| 1048 } | 1063 } |
| 1049 buildCounterStatus--; | 1064 buildCounterStatus--; |
| 1050 } | 1065 } |
| 1051 | 1066 |
| 1052 core.int buildCounterSymbol = 0; | 1067 core.int buildCounterSymbol = 0; |
| 1053 buildSymbol() { | 1068 buildSymbol() { |
| 1054 var o = new api.Symbol(); | 1069 var o = new api.Symbol(); |
| 1055 buildCounterSymbol++; | 1070 buildCounterSymbol++; |
| 1056 if (buildCounterSymbol < 3) { | 1071 if (buildCounterSymbol < 3) { |
| 1057 o.boundingBox = buildBoundingPoly(); | 1072 o.boundingBox = buildBoundingPoly(); |
| 1058 o.property = buildTextProperty(); | 1073 o.property = buildTextProperty(); |
| 1059 o.text = "foo"; | 1074 o.text = "foo"; |
| 1060 } | 1075 } |
| 1061 buildCounterSymbol--; | 1076 buildCounterSymbol--; |
| 1062 return o; | 1077 return o; |
| 1063 } | 1078 } |
| 1064 | 1079 |
| 1065 checkSymbol(api.Symbol o) { | 1080 checkSymbol(api.Symbol o) { |
| 1066 buildCounterSymbol++; | 1081 buildCounterSymbol++; |
| 1067 if (buildCounterSymbol < 3) { | 1082 if (buildCounterSymbol < 3) { |
| 1068 checkBoundingPoly(o.boundingBox); | 1083 checkBoundingPoly(o.boundingBox); |
| 1069 checkTextProperty(o.property); | 1084 checkTextProperty(o.property); |
| 1070 unittest.expect(o.text, unittest.equals('foo')); | 1085 unittest.expect(o.text, unittest.equals('foo')); |
| 1071 } | 1086 } |
| 1072 buildCounterSymbol--; | 1087 buildCounterSymbol--; |
| 1073 } | 1088 } |
| 1074 | 1089 |
| 1075 buildUnnamed1327() { | 1090 buildUnnamed1323() { |
| 1076 var o = new core.List<api.Page>(); | 1091 var o = new core.List<api.Page>(); |
| 1077 o.add(buildPage()); | 1092 o.add(buildPage()); |
| 1078 o.add(buildPage()); | 1093 o.add(buildPage()); |
| 1079 return o; | 1094 return o; |
| 1080 } | 1095 } |
| 1081 | 1096 |
| 1082 checkUnnamed1327(core.List<api.Page> o) { | 1097 checkUnnamed1323(core.List<api.Page> o) { |
| 1083 unittest.expect(o, unittest.hasLength(2)); | 1098 unittest.expect(o, unittest.hasLength(2)); |
| 1084 checkPage(o[0]); | 1099 checkPage(o[0]); |
| 1085 checkPage(o[1]); | 1100 checkPage(o[1]); |
| 1086 } | 1101 } |
| 1087 | 1102 |
| 1088 core.int buildCounterTextAnnotation = 0; | 1103 core.int buildCounterTextAnnotation = 0; |
| 1089 buildTextAnnotation() { | 1104 buildTextAnnotation() { |
| 1090 var o = new api.TextAnnotation(); | 1105 var o = new api.TextAnnotation(); |
| 1091 buildCounterTextAnnotation++; | 1106 buildCounterTextAnnotation++; |
| 1092 if (buildCounterTextAnnotation < 3) { | 1107 if (buildCounterTextAnnotation < 3) { |
| 1093 o.pages = buildUnnamed1327(); | 1108 o.pages = buildUnnamed1323(); |
| 1094 o.text = "foo"; | 1109 o.text = "foo"; |
| 1095 } | 1110 } |
| 1096 buildCounterTextAnnotation--; | 1111 buildCounterTextAnnotation--; |
| 1097 return o; | 1112 return o; |
| 1098 } | 1113 } |
| 1099 | 1114 |
| 1100 checkTextAnnotation(api.TextAnnotation o) { | 1115 checkTextAnnotation(api.TextAnnotation o) { |
| 1101 buildCounterTextAnnotation++; | 1116 buildCounterTextAnnotation++; |
| 1102 if (buildCounterTextAnnotation < 3) { | 1117 if (buildCounterTextAnnotation < 3) { |
| 1103 checkUnnamed1327(o.pages); | 1118 checkUnnamed1323(o.pages); |
| 1104 unittest.expect(o.text, unittest.equals('foo')); | 1119 unittest.expect(o.text, unittest.equals('foo')); |
| 1105 } | 1120 } |
| 1106 buildCounterTextAnnotation--; | 1121 buildCounterTextAnnotation--; |
| 1107 } | 1122 } |
| 1108 | 1123 |
| 1109 buildUnnamed1328() { | 1124 buildUnnamed1324() { |
| 1110 var o = new core.List<api.DetectedLanguage>(); | 1125 var o = new core.List<api.DetectedLanguage>(); |
| 1111 o.add(buildDetectedLanguage()); | 1126 o.add(buildDetectedLanguage()); |
| 1112 o.add(buildDetectedLanguage()); | 1127 o.add(buildDetectedLanguage()); |
| 1113 return o; | 1128 return o; |
| 1114 } | 1129 } |
| 1115 | 1130 |
| 1116 checkUnnamed1328(core.List<api.DetectedLanguage> o) { | 1131 checkUnnamed1324(core.List<api.DetectedLanguage> o) { |
| 1117 unittest.expect(o, unittest.hasLength(2)); | 1132 unittest.expect(o, unittest.hasLength(2)); |
| 1118 checkDetectedLanguage(o[0]); | 1133 checkDetectedLanguage(o[0]); |
| 1119 checkDetectedLanguage(o[1]); | 1134 checkDetectedLanguage(o[1]); |
| 1120 } | 1135 } |
| 1121 | 1136 |
| 1122 core.int buildCounterTextProperty = 0; | 1137 core.int buildCounterTextProperty = 0; |
| 1123 buildTextProperty() { | 1138 buildTextProperty() { |
| 1124 var o = new api.TextProperty(); | 1139 var o = new api.TextProperty(); |
| 1125 buildCounterTextProperty++; | 1140 buildCounterTextProperty++; |
| 1126 if (buildCounterTextProperty < 3) { | 1141 if (buildCounterTextProperty < 3) { |
| 1127 o.detectedBreak = buildDetectedBreak(); | 1142 o.detectedBreak = buildDetectedBreak(); |
| 1128 o.detectedLanguages = buildUnnamed1328(); | 1143 o.detectedLanguages = buildUnnamed1324(); |
| 1129 } | 1144 } |
| 1130 buildCounterTextProperty--; | 1145 buildCounterTextProperty--; |
| 1131 return o; | 1146 return o; |
| 1132 } | 1147 } |
| 1133 | 1148 |
| 1134 checkTextProperty(api.TextProperty o) { | 1149 checkTextProperty(api.TextProperty o) { |
| 1135 buildCounterTextProperty++; | 1150 buildCounterTextProperty++; |
| 1136 if (buildCounterTextProperty < 3) { | 1151 if (buildCounterTextProperty < 3) { |
| 1137 checkDetectedBreak(o.detectedBreak); | 1152 checkDetectedBreak(o.detectedBreak); |
| 1138 checkUnnamed1328(o.detectedLanguages); | 1153 checkUnnamed1324(o.detectedLanguages); |
| 1139 } | 1154 } |
| 1140 buildCounterTextProperty--; | 1155 buildCounterTextProperty--; |
| 1141 } | 1156 } |
| 1142 | 1157 |
| 1143 core.int buildCounterVertex = 0; | 1158 core.int buildCounterVertex = 0; |
| 1144 buildVertex() { | 1159 buildVertex() { |
| 1145 var o = new api.Vertex(); | 1160 var o = new api.Vertex(); |
| 1146 buildCounterVertex++; | 1161 buildCounterVertex++; |
| 1147 if (buildCounterVertex < 3) { | 1162 if (buildCounterVertex < 3) { |
| 1148 o.x = 42; | 1163 o.x = 42; |
| 1149 o.y = 42; | 1164 o.y = 42; |
| 1150 } | 1165 } |
| 1151 buildCounterVertex--; | 1166 buildCounterVertex--; |
| 1152 return o; | 1167 return o; |
| 1153 } | 1168 } |
| 1154 | 1169 |
| 1155 checkVertex(api.Vertex o) { | 1170 checkVertex(api.Vertex o) { |
| 1156 buildCounterVertex++; | 1171 buildCounterVertex++; |
| 1157 if (buildCounterVertex < 3) { | 1172 if (buildCounterVertex < 3) { |
| 1158 unittest.expect(o.x, unittest.equals(42)); | 1173 unittest.expect(o.x, unittest.equals(42)); |
| 1159 unittest.expect(o.y, unittest.equals(42)); | 1174 unittest.expect(o.y, unittest.equals(42)); |
| 1160 } | 1175 } |
| 1161 buildCounterVertex--; | 1176 buildCounterVertex--; |
| 1162 } | 1177 } |
| 1163 | 1178 |
| 1164 buildUnnamed1329() { | 1179 buildUnnamed1325() { |
| 1165 var o = new core.List<api.WebImage>(); | 1180 var o = new core.List<api.WebImage>(); |
| 1166 o.add(buildWebImage()); | 1181 o.add(buildWebImage()); |
| 1167 o.add(buildWebImage()); | 1182 o.add(buildWebImage()); |
| 1168 return o; | 1183 return o; |
| 1169 } | 1184 } |
| 1170 | 1185 |
| 1171 checkUnnamed1329(core.List<api.WebImage> o) { | 1186 checkUnnamed1325(core.List<api.WebImage> o) { |
| 1172 unittest.expect(o, unittest.hasLength(2)); | 1187 unittest.expect(o, unittest.hasLength(2)); |
| 1173 checkWebImage(o[0]); | 1188 checkWebImage(o[0]); |
| 1174 checkWebImage(o[1]); | 1189 checkWebImage(o[1]); |
| 1175 } | 1190 } |
| 1176 | 1191 |
| 1177 buildUnnamed1330() { | 1192 buildUnnamed1326() { |
| 1178 var o = new core.List<api.WebPage>(); | 1193 var o = new core.List<api.WebPage>(); |
| 1179 o.add(buildWebPage()); | 1194 o.add(buildWebPage()); |
| 1180 o.add(buildWebPage()); | 1195 o.add(buildWebPage()); |
| 1181 return o; | 1196 return o; |
| 1182 } | 1197 } |
| 1183 | 1198 |
| 1184 checkUnnamed1330(core.List<api.WebPage> o) { | 1199 checkUnnamed1326(core.List<api.WebPage> o) { |
| 1185 unittest.expect(o, unittest.hasLength(2)); | 1200 unittest.expect(o, unittest.hasLength(2)); |
| 1186 checkWebPage(o[0]); | 1201 checkWebPage(o[0]); |
| 1187 checkWebPage(o[1]); | 1202 checkWebPage(o[1]); |
| 1188 } | 1203 } |
| 1189 | 1204 |
| 1190 buildUnnamed1331() { | 1205 buildUnnamed1327() { |
| 1191 var o = new core.List<api.WebImage>(); | 1206 var o = new core.List<api.WebImage>(); |
| 1192 o.add(buildWebImage()); | 1207 o.add(buildWebImage()); |
| 1193 o.add(buildWebImage()); | 1208 o.add(buildWebImage()); |
| 1194 return o; | 1209 return o; |
| 1195 } | 1210 } |
| 1196 | 1211 |
| 1197 checkUnnamed1331(core.List<api.WebImage> o) { | 1212 checkUnnamed1327(core.List<api.WebImage> o) { |
| 1198 unittest.expect(o, unittest.hasLength(2)); | 1213 unittest.expect(o, unittest.hasLength(2)); |
| 1199 checkWebImage(o[0]); | 1214 checkWebImage(o[0]); |
| 1200 checkWebImage(o[1]); | 1215 checkWebImage(o[1]); |
| 1201 } | 1216 } |
| 1202 | 1217 |
| 1203 buildUnnamed1332() { | 1218 buildUnnamed1328() { |
| 1204 var o = new core.List<api.WebImage>(); | 1219 var o = new core.List<api.WebImage>(); |
| 1205 o.add(buildWebImage()); | 1220 o.add(buildWebImage()); |
| 1206 o.add(buildWebImage()); | 1221 o.add(buildWebImage()); |
| 1207 return o; | 1222 return o; |
| 1208 } | 1223 } |
| 1209 | 1224 |
| 1210 checkUnnamed1332(core.List<api.WebImage> o) { | 1225 checkUnnamed1328(core.List<api.WebImage> o) { |
| 1211 unittest.expect(o, unittest.hasLength(2)); | 1226 unittest.expect(o, unittest.hasLength(2)); |
| 1212 checkWebImage(o[0]); | 1227 checkWebImage(o[0]); |
| 1213 checkWebImage(o[1]); | 1228 checkWebImage(o[1]); |
| 1214 } | 1229 } |
| 1215 | 1230 |
| 1216 buildUnnamed1333() { | 1231 buildUnnamed1329() { |
| 1217 var o = new core.List<api.WebEntity>(); | 1232 var o = new core.List<api.WebEntity>(); |
| 1218 o.add(buildWebEntity()); | 1233 o.add(buildWebEntity()); |
| 1219 o.add(buildWebEntity()); | 1234 o.add(buildWebEntity()); |
| 1220 return o; | 1235 return o; |
| 1221 } | 1236 } |
| 1222 | 1237 |
| 1223 checkUnnamed1333(core.List<api.WebEntity> o) { | 1238 checkUnnamed1329(core.List<api.WebEntity> o) { |
| 1224 unittest.expect(o, unittest.hasLength(2)); | 1239 unittest.expect(o, unittest.hasLength(2)); |
| 1225 checkWebEntity(o[0]); | 1240 checkWebEntity(o[0]); |
| 1226 checkWebEntity(o[1]); | 1241 checkWebEntity(o[1]); |
| 1227 } | 1242 } |
| 1228 | 1243 |
| 1229 core.int buildCounterWebDetection = 0; | 1244 core.int buildCounterWebDetection = 0; |
| 1230 buildWebDetection() { | 1245 buildWebDetection() { |
| 1231 var o = new api.WebDetection(); | 1246 var o = new api.WebDetection(); |
| 1232 buildCounterWebDetection++; | 1247 buildCounterWebDetection++; |
| 1233 if (buildCounterWebDetection < 3) { | 1248 if (buildCounterWebDetection < 3) { |
| 1234 o.fullMatchingImages = buildUnnamed1329(); | 1249 o.fullMatchingImages = buildUnnamed1325(); |
| 1235 o.pagesWithMatchingImages = buildUnnamed1330(); | 1250 o.pagesWithMatchingImages = buildUnnamed1326(); |
| 1236 o.partialMatchingImages = buildUnnamed1331(); | 1251 o.partialMatchingImages = buildUnnamed1327(); |
| 1237 o.visuallySimilarImages = buildUnnamed1332(); | 1252 o.visuallySimilarImages = buildUnnamed1328(); |
| 1238 o.webEntities = buildUnnamed1333(); | 1253 o.webEntities = buildUnnamed1329(); |
| 1239 } | 1254 } |
| 1240 buildCounterWebDetection--; | 1255 buildCounterWebDetection--; |
| 1241 return o; | 1256 return o; |
| 1242 } | 1257 } |
| 1243 | 1258 |
| 1244 checkWebDetection(api.WebDetection o) { | 1259 checkWebDetection(api.WebDetection o) { |
| 1245 buildCounterWebDetection++; | 1260 buildCounterWebDetection++; |
| 1246 if (buildCounterWebDetection < 3) { | 1261 if (buildCounterWebDetection < 3) { |
| 1247 checkUnnamed1329(o.fullMatchingImages); | 1262 checkUnnamed1325(o.fullMatchingImages); |
| 1248 checkUnnamed1330(o.pagesWithMatchingImages); | 1263 checkUnnamed1326(o.pagesWithMatchingImages); |
| 1249 checkUnnamed1331(o.partialMatchingImages); | 1264 checkUnnamed1327(o.partialMatchingImages); |
| 1250 checkUnnamed1332(o.visuallySimilarImages); | 1265 checkUnnamed1328(o.visuallySimilarImages); |
| 1251 checkUnnamed1333(o.webEntities); | 1266 checkUnnamed1329(o.webEntities); |
| 1252 } | 1267 } |
| 1253 buildCounterWebDetection--; | 1268 buildCounterWebDetection--; |
| 1254 } | 1269 } |
| 1255 | 1270 |
| 1256 core.int buildCounterWebEntity = 0; | 1271 core.int buildCounterWebEntity = 0; |
| 1257 buildWebEntity() { | 1272 buildWebEntity() { |
| 1258 var o = new api.WebEntity(); | 1273 var o = new api.WebEntity(); |
| 1259 buildCounterWebEntity++; | 1274 buildCounterWebEntity++; |
| 1260 if (buildCounterWebEntity < 3) { | 1275 if (buildCounterWebEntity < 3) { |
| 1261 o.description = "foo"; | 1276 o.description = "foo"; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 | 1326 |
| 1312 checkWebPage(api.WebPage o) { | 1327 checkWebPage(api.WebPage o) { |
| 1313 buildCounterWebPage++; | 1328 buildCounterWebPage++; |
| 1314 if (buildCounterWebPage < 3) { | 1329 if (buildCounterWebPage < 3) { |
| 1315 unittest.expect(o.score, unittest.equals(42.0)); | 1330 unittest.expect(o.score, unittest.equals(42.0)); |
| 1316 unittest.expect(o.url, unittest.equals('foo')); | 1331 unittest.expect(o.url, unittest.equals('foo')); |
| 1317 } | 1332 } |
| 1318 buildCounterWebPage--; | 1333 buildCounterWebPage--; |
| 1319 } | 1334 } |
| 1320 | 1335 |
| 1321 buildUnnamed1334() { | 1336 buildUnnamed1330() { |
| 1322 var o = new core.List<api.Symbol>(); | 1337 var o = new core.List<api.Symbol>(); |
| 1323 o.add(buildSymbol()); | 1338 o.add(buildSymbol()); |
| 1324 o.add(buildSymbol()); | 1339 o.add(buildSymbol()); |
| 1325 return o; | 1340 return o; |
| 1326 } | 1341 } |
| 1327 | 1342 |
| 1328 checkUnnamed1334(core.List<api.Symbol> o) { | 1343 checkUnnamed1330(core.List<api.Symbol> o) { |
| 1329 unittest.expect(o, unittest.hasLength(2)); | 1344 unittest.expect(o, unittest.hasLength(2)); |
| 1330 checkSymbol(o[0]); | 1345 checkSymbol(o[0]); |
| 1331 checkSymbol(o[1]); | 1346 checkSymbol(o[1]); |
| 1332 } | 1347 } |
| 1333 | 1348 |
| 1334 core.int buildCounterWord = 0; | 1349 core.int buildCounterWord = 0; |
| 1335 buildWord() { | 1350 buildWord() { |
| 1336 var o = new api.Word(); | 1351 var o = new api.Word(); |
| 1337 buildCounterWord++; | 1352 buildCounterWord++; |
| 1338 if (buildCounterWord < 3) { | 1353 if (buildCounterWord < 3) { |
| 1339 o.boundingBox = buildBoundingPoly(); | 1354 o.boundingBox = buildBoundingPoly(); |
| 1340 o.property = buildTextProperty(); | 1355 o.property = buildTextProperty(); |
| 1341 o.symbols = buildUnnamed1334(); | 1356 o.symbols = buildUnnamed1330(); |
| 1342 } | 1357 } |
| 1343 buildCounterWord--; | 1358 buildCounterWord--; |
| 1344 return o; | 1359 return o; |
| 1345 } | 1360 } |
| 1346 | 1361 |
| 1347 checkWord(api.Word o) { | 1362 checkWord(api.Word o) { |
| 1348 buildCounterWord++; | 1363 buildCounterWord++; |
| 1349 if (buildCounterWord < 3) { | 1364 if (buildCounterWord < 3) { |
| 1350 checkBoundingPoly(o.boundingBox); | 1365 checkBoundingPoly(o.boundingBox); |
| 1351 checkTextProperty(o.property); | 1366 checkTextProperty(o.property); |
| 1352 checkUnnamed1334(o.symbols); | 1367 checkUnnamed1330(o.symbols); |
| 1353 } | 1368 } |
| 1354 buildCounterWord--; | 1369 buildCounterWord--; |
| 1355 } | 1370 } |
| 1356 | 1371 |
| 1357 | |
| 1358 main() { | 1372 main() { |
| 1359 unittest.group("obj-schema-AnnotateImageRequest", () { | 1373 unittest.group("obj-schema-AnnotateImageRequest", () { |
| 1360 unittest.test("to-json--from-json", () { | 1374 unittest.test("to-json--from-json", () { |
| 1361 var o = buildAnnotateImageRequest(); | 1375 var o = buildAnnotateImageRequest(); |
| 1362 var od = new api.AnnotateImageRequest.fromJson(o.toJson()); | 1376 var od = new api.AnnotateImageRequest.fromJson(o.toJson()); |
| 1363 checkAnnotateImageRequest(od); | 1377 checkAnnotateImageRequest(od); |
| 1364 }); | 1378 }); |
| 1365 }); | 1379 }); |
| 1366 | 1380 |
| 1367 | |
| 1368 unittest.group("obj-schema-AnnotateImageResponse", () { | 1381 unittest.group("obj-schema-AnnotateImageResponse", () { |
| 1369 unittest.test("to-json--from-json", () { | 1382 unittest.test("to-json--from-json", () { |
| 1370 var o = buildAnnotateImageResponse(); | 1383 var o = buildAnnotateImageResponse(); |
| 1371 var od = new api.AnnotateImageResponse.fromJson(o.toJson()); | 1384 var od = new api.AnnotateImageResponse.fromJson(o.toJson()); |
| 1372 checkAnnotateImageResponse(od); | 1385 checkAnnotateImageResponse(od); |
| 1373 }); | 1386 }); |
| 1374 }); | 1387 }); |
| 1375 | 1388 |
| 1376 | |
| 1377 unittest.group("obj-schema-BatchAnnotateImagesRequest", () { | 1389 unittest.group("obj-schema-BatchAnnotateImagesRequest", () { |
| 1378 unittest.test("to-json--from-json", () { | 1390 unittest.test("to-json--from-json", () { |
| 1379 var o = buildBatchAnnotateImagesRequest(); | 1391 var o = buildBatchAnnotateImagesRequest(); |
| 1380 var od = new api.BatchAnnotateImagesRequest.fromJson(o.toJson()); | 1392 var od = new api.BatchAnnotateImagesRequest.fromJson(o.toJson()); |
| 1381 checkBatchAnnotateImagesRequest(od); | 1393 checkBatchAnnotateImagesRequest(od); |
| 1382 }); | 1394 }); |
| 1383 }); | 1395 }); |
| 1384 | 1396 |
| 1385 | |
| 1386 unittest.group("obj-schema-BatchAnnotateImagesResponse", () { | 1397 unittest.group("obj-schema-BatchAnnotateImagesResponse", () { |
| 1387 unittest.test("to-json--from-json", () { | 1398 unittest.test("to-json--from-json", () { |
| 1388 var o = buildBatchAnnotateImagesResponse(); | 1399 var o = buildBatchAnnotateImagesResponse(); |
| 1389 var od = new api.BatchAnnotateImagesResponse.fromJson(o.toJson()); | 1400 var od = new api.BatchAnnotateImagesResponse.fromJson(o.toJson()); |
| 1390 checkBatchAnnotateImagesResponse(od); | 1401 checkBatchAnnotateImagesResponse(od); |
| 1391 }); | 1402 }); |
| 1392 }); | 1403 }); |
| 1393 | 1404 |
| 1394 | |
| 1395 unittest.group("obj-schema-Block", () { | 1405 unittest.group("obj-schema-Block", () { |
| 1396 unittest.test("to-json--from-json", () { | 1406 unittest.test("to-json--from-json", () { |
| 1397 var o = buildBlock(); | 1407 var o = buildBlock(); |
| 1398 var od = new api.Block.fromJson(o.toJson()); | 1408 var od = new api.Block.fromJson(o.toJson()); |
| 1399 checkBlock(od); | 1409 checkBlock(od); |
| 1400 }); | 1410 }); |
| 1401 }); | 1411 }); |
| 1402 | 1412 |
| 1403 | |
| 1404 unittest.group("obj-schema-BoundingPoly", () { | 1413 unittest.group("obj-schema-BoundingPoly", () { |
| 1405 unittest.test("to-json--from-json", () { | 1414 unittest.test("to-json--from-json", () { |
| 1406 var o = buildBoundingPoly(); | 1415 var o = buildBoundingPoly(); |
| 1407 var od = new api.BoundingPoly.fromJson(o.toJson()); | 1416 var od = new api.BoundingPoly.fromJson(o.toJson()); |
| 1408 checkBoundingPoly(od); | 1417 checkBoundingPoly(od); |
| 1409 }); | 1418 }); |
| 1410 }); | 1419 }); |
| 1411 | 1420 |
| 1412 | |
| 1413 unittest.group("obj-schema-Color", () { | 1421 unittest.group("obj-schema-Color", () { |
| 1414 unittest.test("to-json--from-json", () { | 1422 unittest.test("to-json--from-json", () { |
| 1415 var o = buildColor(); | 1423 var o = buildColor(); |
| 1416 var od = new api.Color.fromJson(o.toJson()); | 1424 var od = new api.Color.fromJson(o.toJson()); |
| 1417 checkColor(od); | 1425 checkColor(od); |
| 1418 }); | 1426 }); |
| 1419 }); | 1427 }); |
| 1420 | 1428 |
| 1421 | |
| 1422 unittest.group("obj-schema-ColorInfo", () { | 1429 unittest.group("obj-schema-ColorInfo", () { |
| 1423 unittest.test("to-json--from-json", () { | 1430 unittest.test("to-json--from-json", () { |
| 1424 var o = buildColorInfo(); | 1431 var o = buildColorInfo(); |
| 1425 var od = new api.ColorInfo.fromJson(o.toJson()); | 1432 var od = new api.ColorInfo.fromJson(o.toJson()); |
| 1426 checkColorInfo(od); | 1433 checkColorInfo(od); |
| 1427 }); | 1434 }); |
| 1428 }); | 1435 }); |
| 1429 | 1436 |
| 1430 | |
| 1431 unittest.group("obj-schema-CropHint", () { | 1437 unittest.group("obj-schema-CropHint", () { |
| 1432 unittest.test("to-json--from-json", () { | 1438 unittest.test("to-json--from-json", () { |
| 1433 var o = buildCropHint(); | 1439 var o = buildCropHint(); |
| 1434 var od = new api.CropHint.fromJson(o.toJson()); | 1440 var od = new api.CropHint.fromJson(o.toJson()); |
| 1435 checkCropHint(od); | 1441 checkCropHint(od); |
| 1436 }); | 1442 }); |
| 1437 }); | 1443 }); |
| 1438 | 1444 |
| 1439 | |
| 1440 unittest.group("obj-schema-CropHintsAnnotation", () { | 1445 unittest.group("obj-schema-CropHintsAnnotation", () { |
| 1441 unittest.test("to-json--from-json", () { | 1446 unittest.test("to-json--from-json", () { |
| 1442 var o = buildCropHintsAnnotation(); | 1447 var o = buildCropHintsAnnotation(); |
| 1443 var od = new api.CropHintsAnnotation.fromJson(o.toJson()); | 1448 var od = new api.CropHintsAnnotation.fromJson(o.toJson()); |
| 1444 checkCropHintsAnnotation(od); | 1449 checkCropHintsAnnotation(od); |
| 1445 }); | 1450 }); |
| 1446 }); | 1451 }); |
| 1447 | 1452 |
| 1448 | |
| 1449 unittest.group("obj-schema-CropHintsParams", () { | 1453 unittest.group("obj-schema-CropHintsParams", () { |
| 1450 unittest.test("to-json--from-json", () { | 1454 unittest.test("to-json--from-json", () { |
| 1451 var o = buildCropHintsParams(); | 1455 var o = buildCropHintsParams(); |
| 1452 var od = new api.CropHintsParams.fromJson(o.toJson()); | 1456 var od = new api.CropHintsParams.fromJson(o.toJson()); |
| 1453 checkCropHintsParams(od); | 1457 checkCropHintsParams(od); |
| 1454 }); | 1458 }); |
| 1455 }); | 1459 }); |
| 1456 | 1460 |
| 1457 | |
| 1458 unittest.group("obj-schema-DetectedBreak", () { | 1461 unittest.group("obj-schema-DetectedBreak", () { |
| 1459 unittest.test("to-json--from-json", () { | 1462 unittest.test("to-json--from-json", () { |
| 1460 var o = buildDetectedBreak(); | 1463 var o = buildDetectedBreak(); |
| 1461 var od = new api.DetectedBreak.fromJson(o.toJson()); | 1464 var od = new api.DetectedBreak.fromJson(o.toJson()); |
| 1462 checkDetectedBreak(od); | 1465 checkDetectedBreak(od); |
| 1463 }); | 1466 }); |
| 1464 }); | 1467 }); |
| 1465 | 1468 |
| 1466 | |
| 1467 unittest.group("obj-schema-DetectedLanguage", () { | 1469 unittest.group("obj-schema-DetectedLanguage", () { |
| 1468 unittest.test("to-json--from-json", () { | 1470 unittest.test("to-json--from-json", () { |
| 1469 var o = buildDetectedLanguage(); | 1471 var o = buildDetectedLanguage(); |
| 1470 var od = new api.DetectedLanguage.fromJson(o.toJson()); | 1472 var od = new api.DetectedLanguage.fromJson(o.toJson()); |
| 1471 checkDetectedLanguage(od); | 1473 checkDetectedLanguage(od); |
| 1472 }); | 1474 }); |
| 1473 }); | 1475 }); |
| 1474 | 1476 |
| 1475 | |
| 1476 unittest.group("obj-schema-DominantColorsAnnotation", () { | 1477 unittest.group("obj-schema-DominantColorsAnnotation", () { |
| 1477 unittest.test("to-json--from-json", () { | 1478 unittest.test("to-json--from-json", () { |
| 1478 var o = buildDominantColorsAnnotation(); | 1479 var o = buildDominantColorsAnnotation(); |
| 1479 var od = new api.DominantColorsAnnotation.fromJson(o.toJson()); | 1480 var od = new api.DominantColorsAnnotation.fromJson(o.toJson()); |
| 1480 checkDominantColorsAnnotation(od); | 1481 checkDominantColorsAnnotation(od); |
| 1481 }); | 1482 }); |
| 1482 }); | 1483 }); |
| 1483 | 1484 |
| 1484 | |
| 1485 unittest.group("obj-schema-EntityAnnotation", () { | 1485 unittest.group("obj-schema-EntityAnnotation", () { |
| 1486 unittest.test("to-json--from-json", () { | 1486 unittest.test("to-json--from-json", () { |
| 1487 var o = buildEntityAnnotation(); | 1487 var o = buildEntityAnnotation(); |
| 1488 var od = new api.EntityAnnotation.fromJson(o.toJson()); | 1488 var od = new api.EntityAnnotation.fromJson(o.toJson()); |
| 1489 checkEntityAnnotation(od); | 1489 checkEntityAnnotation(od); |
| 1490 }); | 1490 }); |
| 1491 }); | 1491 }); |
| 1492 | 1492 |
| 1493 | |
| 1494 unittest.group("obj-schema-FaceAnnotation", () { | 1493 unittest.group("obj-schema-FaceAnnotation", () { |
| 1495 unittest.test("to-json--from-json", () { | 1494 unittest.test("to-json--from-json", () { |
| 1496 var o = buildFaceAnnotation(); | 1495 var o = buildFaceAnnotation(); |
| 1497 var od = new api.FaceAnnotation.fromJson(o.toJson()); | 1496 var od = new api.FaceAnnotation.fromJson(o.toJson()); |
| 1498 checkFaceAnnotation(od); | 1497 checkFaceAnnotation(od); |
| 1499 }); | 1498 }); |
| 1500 }); | 1499 }); |
| 1501 | 1500 |
| 1502 | |
| 1503 unittest.group("obj-schema-Feature", () { | 1501 unittest.group("obj-schema-Feature", () { |
| 1504 unittest.test("to-json--from-json", () { | 1502 unittest.test("to-json--from-json", () { |
| 1505 var o = buildFeature(); | 1503 var o = buildFeature(); |
| 1506 var od = new api.Feature.fromJson(o.toJson()); | 1504 var od = new api.Feature.fromJson(o.toJson()); |
| 1507 checkFeature(od); | 1505 checkFeature(od); |
| 1508 }); | 1506 }); |
| 1509 }); | 1507 }); |
| 1510 | 1508 |
| 1511 | |
| 1512 unittest.group("obj-schema-Image", () { | 1509 unittest.group("obj-schema-Image", () { |
| 1513 unittest.test("to-json--from-json", () { | 1510 unittest.test("to-json--from-json", () { |
| 1514 var o = buildImage(); | 1511 var o = buildImage(); |
| 1515 var od = new api.Image.fromJson(o.toJson()); | 1512 var od = new api.Image.fromJson(o.toJson()); |
| 1516 checkImage(od); | 1513 checkImage(od); |
| 1517 }); | 1514 }); |
| 1518 }); | 1515 }); |
| 1519 | 1516 |
| 1520 | |
| 1521 unittest.group("obj-schema-ImageContext", () { | 1517 unittest.group("obj-schema-ImageContext", () { |
| 1522 unittest.test("to-json--from-json", () { | 1518 unittest.test("to-json--from-json", () { |
| 1523 var o = buildImageContext(); | 1519 var o = buildImageContext(); |
| 1524 var od = new api.ImageContext.fromJson(o.toJson()); | 1520 var od = new api.ImageContext.fromJson(o.toJson()); |
| 1525 checkImageContext(od); | 1521 checkImageContext(od); |
| 1526 }); | 1522 }); |
| 1527 }); | 1523 }); |
| 1528 | 1524 |
| 1529 | |
| 1530 unittest.group("obj-schema-ImageProperties", () { | 1525 unittest.group("obj-schema-ImageProperties", () { |
| 1531 unittest.test("to-json--from-json", () { | 1526 unittest.test("to-json--from-json", () { |
| 1532 var o = buildImageProperties(); | 1527 var o = buildImageProperties(); |
| 1533 var od = new api.ImageProperties.fromJson(o.toJson()); | 1528 var od = new api.ImageProperties.fromJson(o.toJson()); |
| 1534 checkImageProperties(od); | 1529 checkImageProperties(od); |
| 1535 }); | 1530 }); |
| 1536 }); | 1531 }); |
| 1537 | 1532 |
| 1538 | |
| 1539 unittest.group("obj-schema-ImageSource", () { | 1533 unittest.group("obj-schema-ImageSource", () { |
| 1540 unittest.test("to-json--from-json", () { | 1534 unittest.test("to-json--from-json", () { |
| 1541 var o = buildImageSource(); | 1535 var o = buildImageSource(); |
| 1542 var od = new api.ImageSource.fromJson(o.toJson()); | 1536 var od = new api.ImageSource.fromJson(o.toJson()); |
| 1543 checkImageSource(od); | 1537 checkImageSource(od); |
| 1544 }); | 1538 }); |
| 1545 }); | 1539 }); |
| 1546 | 1540 |
| 1547 | |
| 1548 unittest.group("obj-schema-Landmark", () { | 1541 unittest.group("obj-schema-Landmark", () { |
| 1549 unittest.test("to-json--from-json", () { | 1542 unittest.test("to-json--from-json", () { |
| 1550 var o = buildLandmark(); | 1543 var o = buildLandmark(); |
| 1551 var od = new api.Landmark.fromJson(o.toJson()); | 1544 var od = new api.Landmark.fromJson(o.toJson()); |
| 1552 checkLandmark(od); | 1545 checkLandmark(od); |
| 1553 }); | 1546 }); |
| 1554 }); | 1547 }); |
| 1555 | 1548 |
| 1556 | |
| 1557 unittest.group("obj-schema-LatLng", () { | 1549 unittest.group("obj-schema-LatLng", () { |
| 1558 unittest.test("to-json--from-json", () { | 1550 unittest.test("to-json--from-json", () { |
| 1559 var o = buildLatLng(); | 1551 var o = buildLatLng(); |
| 1560 var od = new api.LatLng.fromJson(o.toJson()); | 1552 var od = new api.LatLng.fromJson(o.toJson()); |
| 1561 checkLatLng(od); | 1553 checkLatLng(od); |
| 1562 }); | 1554 }); |
| 1563 }); | 1555 }); |
| 1564 | 1556 |
| 1565 | |
| 1566 unittest.group("obj-schema-LatLongRect", () { | 1557 unittest.group("obj-schema-LatLongRect", () { |
| 1567 unittest.test("to-json--from-json", () { | 1558 unittest.test("to-json--from-json", () { |
| 1568 var o = buildLatLongRect(); | 1559 var o = buildLatLongRect(); |
| 1569 var od = new api.LatLongRect.fromJson(o.toJson()); | 1560 var od = new api.LatLongRect.fromJson(o.toJson()); |
| 1570 checkLatLongRect(od); | 1561 checkLatLongRect(od); |
| 1571 }); | 1562 }); |
| 1572 }); | 1563 }); |
| 1573 | 1564 |
| 1574 | |
| 1575 unittest.group("obj-schema-LocationInfo", () { | 1565 unittest.group("obj-schema-LocationInfo", () { |
| 1576 unittest.test("to-json--from-json", () { | 1566 unittest.test("to-json--from-json", () { |
| 1577 var o = buildLocationInfo(); | 1567 var o = buildLocationInfo(); |
| 1578 var od = new api.LocationInfo.fromJson(o.toJson()); | 1568 var od = new api.LocationInfo.fromJson(o.toJson()); |
| 1579 checkLocationInfo(od); | 1569 checkLocationInfo(od); |
| 1580 }); | 1570 }); |
| 1581 }); | 1571 }); |
| 1582 | 1572 |
| 1583 | |
| 1584 unittest.group("obj-schema-Page", () { | 1573 unittest.group("obj-schema-Page", () { |
| 1585 unittest.test("to-json--from-json", () { | 1574 unittest.test("to-json--from-json", () { |
| 1586 var o = buildPage(); | 1575 var o = buildPage(); |
| 1587 var od = new api.Page.fromJson(o.toJson()); | 1576 var od = new api.Page.fromJson(o.toJson()); |
| 1588 checkPage(od); | 1577 checkPage(od); |
| 1589 }); | 1578 }); |
| 1590 }); | 1579 }); |
| 1591 | 1580 |
| 1592 | |
| 1593 unittest.group("obj-schema-Paragraph", () { | 1581 unittest.group("obj-schema-Paragraph", () { |
| 1594 unittest.test("to-json--from-json", () { | 1582 unittest.test("to-json--from-json", () { |
| 1595 var o = buildParagraph(); | 1583 var o = buildParagraph(); |
| 1596 var od = new api.Paragraph.fromJson(o.toJson()); | 1584 var od = new api.Paragraph.fromJson(o.toJson()); |
| 1597 checkParagraph(od); | 1585 checkParagraph(od); |
| 1598 }); | 1586 }); |
| 1599 }); | 1587 }); |
| 1600 | 1588 |
| 1601 | |
| 1602 unittest.group("obj-schema-Position", () { | 1589 unittest.group("obj-schema-Position", () { |
| 1603 unittest.test("to-json--from-json", () { | 1590 unittest.test("to-json--from-json", () { |
| 1604 var o = buildPosition(); | 1591 var o = buildPosition(); |
| 1605 var od = new api.Position.fromJson(o.toJson()); | 1592 var od = new api.Position.fromJson(o.toJson()); |
| 1606 checkPosition(od); | 1593 checkPosition(od); |
| 1607 }); | 1594 }); |
| 1608 }); | 1595 }); |
| 1609 | 1596 |
| 1610 | |
| 1611 unittest.group("obj-schema-Property", () { | 1597 unittest.group("obj-schema-Property", () { |
| 1612 unittest.test("to-json--from-json", () { | 1598 unittest.test("to-json--from-json", () { |
| 1613 var o = buildProperty(); | 1599 var o = buildProperty(); |
| 1614 var od = new api.Property.fromJson(o.toJson()); | 1600 var od = new api.Property.fromJson(o.toJson()); |
| 1615 checkProperty(od); | 1601 checkProperty(od); |
| 1616 }); | 1602 }); |
| 1617 }); | 1603 }); |
| 1618 | 1604 |
| 1619 | |
| 1620 unittest.group("obj-schema-SafeSearchAnnotation", () { | 1605 unittest.group("obj-schema-SafeSearchAnnotation", () { |
| 1621 unittest.test("to-json--from-json", () { | 1606 unittest.test("to-json--from-json", () { |
| 1622 var o = buildSafeSearchAnnotation(); | 1607 var o = buildSafeSearchAnnotation(); |
| 1623 var od = new api.SafeSearchAnnotation.fromJson(o.toJson()); | 1608 var od = new api.SafeSearchAnnotation.fromJson(o.toJson()); |
| 1624 checkSafeSearchAnnotation(od); | 1609 checkSafeSearchAnnotation(od); |
| 1625 }); | 1610 }); |
| 1626 }); | 1611 }); |
| 1627 | 1612 |
| 1628 | |
| 1629 unittest.group("obj-schema-Status", () { | 1613 unittest.group("obj-schema-Status", () { |
| 1630 unittest.test("to-json--from-json", () { | 1614 unittest.test("to-json--from-json", () { |
| 1631 var o = buildStatus(); | 1615 var o = buildStatus(); |
| 1632 var od = new api.Status.fromJson(o.toJson()); | 1616 var od = new api.Status.fromJson(o.toJson()); |
| 1633 checkStatus(od); | 1617 checkStatus(od); |
| 1634 }); | 1618 }); |
| 1635 }); | 1619 }); |
| 1636 | 1620 |
| 1637 | |
| 1638 unittest.group("obj-schema-Symbol", () { | 1621 unittest.group("obj-schema-Symbol", () { |
| 1639 unittest.test("to-json--from-json", () { | 1622 unittest.test("to-json--from-json", () { |
| 1640 var o = buildSymbol(); | 1623 var o = buildSymbol(); |
| 1641 var od = new api.Symbol.fromJson(o.toJson()); | 1624 var od = new api.Symbol.fromJson(o.toJson()); |
| 1642 checkSymbol(od); | 1625 checkSymbol(od); |
| 1643 }); | 1626 }); |
| 1644 }); | 1627 }); |
| 1645 | 1628 |
| 1646 | |
| 1647 unittest.group("obj-schema-TextAnnotation", () { | 1629 unittest.group("obj-schema-TextAnnotation", () { |
| 1648 unittest.test("to-json--from-json", () { | 1630 unittest.test("to-json--from-json", () { |
| 1649 var o = buildTextAnnotation(); | 1631 var o = buildTextAnnotation(); |
| 1650 var od = new api.TextAnnotation.fromJson(o.toJson()); | 1632 var od = new api.TextAnnotation.fromJson(o.toJson()); |
| 1651 checkTextAnnotation(od); | 1633 checkTextAnnotation(od); |
| 1652 }); | 1634 }); |
| 1653 }); | 1635 }); |
| 1654 | 1636 |
| 1655 | |
| 1656 unittest.group("obj-schema-TextProperty", () { | 1637 unittest.group("obj-schema-TextProperty", () { |
| 1657 unittest.test("to-json--from-json", () { | 1638 unittest.test("to-json--from-json", () { |
| 1658 var o = buildTextProperty(); | 1639 var o = buildTextProperty(); |
| 1659 var od = new api.TextProperty.fromJson(o.toJson()); | 1640 var od = new api.TextProperty.fromJson(o.toJson()); |
| 1660 checkTextProperty(od); | 1641 checkTextProperty(od); |
| 1661 }); | 1642 }); |
| 1662 }); | 1643 }); |
| 1663 | 1644 |
| 1664 | |
| 1665 unittest.group("obj-schema-Vertex", () { | 1645 unittest.group("obj-schema-Vertex", () { |
| 1666 unittest.test("to-json--from-json", () { | 1646 unittest.test("to-json--from-json", () { |
| 1667 var o = buildVertex(); | 1647 var o = buildVertex(); |
| 1668 var od = new api.Vertex.fromJson(o.toJson()); | 1648 var od = new api.Vertex.fromJson(o.toJson()); |
| 1669 checkVertex(od); | 1649 checkVertex(od); |
| 1670 }); | 1650 }); |
| 1671 }); | 1651 }); |
| 1672 | 1652 |
| 1673 | |
| 1674 unittest.group("obj-schema-WebDetection", () { | 1653 unittest.group("obj-schema-WebDetection", () { |
| 1675 unittest.test("to-json--from-json", () { | 1654 unittest.test("to-json--from-json", () { |
| 1676 var o = buildWebDetection(); | 1655 var o = buildWebDetection(); |
| 1677 var od = new api.WebDetection.fromJson(o.toJson()); | 1656 var od = new api.WebDetection.fromJson(o.toJson()); |
| 1678 checkWebDetection(od); | 1657 checkWebDetection(od); |
| 1679 }); | 1658 }); |
| 1680 }); | 1659 }); |
| 1681 | 1660 |
| 1682 | |
| 1683 unittest.group("obj-schema-WebEntity", () { | 1661 unittest.group("obj-schema-WebEntity", () { |
| 1684 unittest.test("to-json--from-json", () { | 1662 unittest.test("to-json--from-json", () { |
| 1685 var o = buildWebEntity(); | 1663 var o = buildWebEntity(); |
| 1686 var od = new api.WebEntity.fromJson(o.toJson()); | 1664 var od = new api.WebEntity.fromJson(o.toJson()); |
| 1687 checkWebEntity(od); | 1665 checkWebEntity(od); |
| 1688 }); | 1666 }); |
| 1689 }); | 1667 }); |
| 1690 | 1668 |
| 1691 | |
| 1692 unittest.group("obj-schema-WebImage", () { | 1669 unittest.group("obj-schema-WebImage", () { |
| 1693 unittest.test("to-json--from-json", () { | 1670 unittest.test("to-json--from-json", () { |
| 1694 var o = buildWebImage(); | 1671 var o = buildWebImage(); |
| 1695 var od = new api.WebImage.fromJson(o.toJson()); | 1672 var od = new api.WebImage.fromJson(o.toJson()); |
| 1696 checkWebImage(od); | 1673 checkWebImage(od); |
| 1697 }); | 1674 }); |
| 1698 }); | 1675 }); |
| 1699 | 1676 |
| 1700 | |
| 1701 unittest.group("obj-schema-WebPage", () { | 1677 unittest.group("obj-schema-WebPage", () { |
| 1702 unittest.test("to-json--from-json", () { | 1678 unittest.test("to-json--from-json", () { |
| 1703 var o = buildWebPage(); | 1679 var o = buildWebPage(); |
| 1704 var od = new api.WebPage.fromJson(o.toJson()); | 1680 var od = new api.WebPage.fromJson(o.toJson()); |
| 1705 checkWebPage(od); | 1681 checkWebPage(od); |
| 1706 }); | 1682 }); |
| 1707 }); | 1683 }); |
| 1708 | 1684 |
| 1709 | |
| 1710 unittest.group("obj-schema-Word", () { | 1685 unittest.group("obj-schema-Word", () { |
| 1711 unittest.test("to-json--from-json", () { | 1686 unittest.test("to-json--from-json", () { |
| 1712 var o = buildWord(); | 1687 var o = buildWord(); |
| 1713 var od = new api.Word.fromJson(o.toJson()); | 1688 var od = new api.Word.fromJson(o.toJson()); |
| 1714 checkWord(od); | 1689 checkWord(od); |
| 1715 }); | 1690 }); |
| 1716 }); | 1691 }); |
| 1717 | 1692 |
| 1718 | |
| 1719 unittest.group("resource-ImagesResourceApi", () { | 1693 unittest.group("resource-ImagesResourceApi", () { |
| 1720 unittest.test("method--annotate", () { | 1694 unittest.test("method--annotate", () { |
| 1721 | |
| 1722 var mock = new HttpServerMock(); | 1695 var mock = new HttpServerMock(); |
| 1723 api.ImagesResourceApi res = new api.VisionApi(mock).images; | 1696 api.ImagesResourceApi res = new api.VisionApi(mock).images; |
| 1724 var arg_request = buildBatchAnnotateImagesRequest(); | 1697 var arg_request = buildBatchAnnotateImagesRequest(); |
| 1725 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1698 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1726 var obj = new api.BatchAnnotateImagesRequest.fromJson(json); | 1699 var obj = new api.BatchAnnotateImagesRequest.fromJson(json); |
| 1727 checkBatchAnnotateImagesRequest(obj); | 1700 checkBatchAnnotateImagesRequest(obj); |
| 1728 | 1701 |
| 1729 var path = (req.url).path; | 1702 var path = (req.url).path; |
| 1730 var pathOffset = 0; | 1703 var pathOffset = 0; |
| 1731 var index; | 1704 var index; |
| 1732 var subPart; | 1705 var subPart; |
| 1733 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1706 unittest.expect( |
| 1707 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 1734 pathOffset += 1; | 1708 pathOffset += 1; |
| 1735 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("v1/images:annotate")); | 1709 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 1710 unittest.equals("v1/images:annotate")); |
| 1736 pathOffset += 18; | 1711 pathOffset += 18; |
| 1737 | 1712 |
| 1738 var query = (req.url).query; | 1713 var query = (req.url).query; |
| 1739 var queryOffset = 0; | 1714 var queryOffset = 0; |
| 1740 var queryMap = {}; | 1715 var queryMap = {}; |
| 1741 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1716 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1742 parseBool(n) { | 1717 parseBool(n) { |
| 1743 if (n == "true") return true; | 1718 if (n == "true") return true; |
| 1744 if (n == "false") return false; | 1719 if (n == "false") return false; |
| 1745 if (n == null) return null; | 1720 if (n == null) return null; |
| 1746 throw new core.ArgumentError("Invalid boolean: $n"); | 1721 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1747 } | 1722 } |
| 1723 |
| 1748 if (query.length > 0) { | 1724 if (query.length > 0) { |
| 1749 for (var part in query.split("&")) { | 1725 for (var part in query.split("&")) { |
| 1750 var keyvalue = part.split("="); | 1726 var keyvalue = part.split("="); |
| 1751 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1727 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 1728 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 1752 } | 1729 } |
| 1753 } | 1730 } |
| 1754 | 1731 |
| 1755 | |
| 1756 var h = { | 1732 var h = { |
| 1757 "content-type" : "application/json; charset=utf-8", | 1733 "content-type": "application/json; charset=utf-8", |
| 1758 }; | 1734 }; |
| 1759 var resp = convert.JSON.encode(buildBatchAnnotateImagesResponse()); | 1735 var resp = convert.JSON.encode(buildBatchAnnotateImagesResponse()); |
| 1760 return new async.Future.value(stringResponse(200, h, resp)); | 1736 return new async.Future.value(stringResponse(200, h, resp)); |
| 1761 }), true); | 1737 }), true); |
| 1762 res.annotate(arg_request).then(unittest.expectAsync1(((api.BatchAnnotateIm
agesResponse response) { | 1738 res.annotate(arg_request).then( |
| 1739 unittest.expectAsync1(((api.BatchAnnotateImagesResponse response) { |
| 1763 checkBatchAnnotateImagesResponse(response); | 1740 checkBatchAnnotateImagesResponse(response); |
| 1764 }))); | 1741 }))); |
| 1765 }); | 1742 }); |
| 1766 | |
| 1767 }); | 1743 }); |
| 1768 | |
| 1769 | |
| 1770 } | 1744 } |
| 1771 | |
| OLD | NEW |