| OLD | NEW |
| 1 library googleapis.prediction.v1_6.test; | 1 library googleapis.prediction.v1_6.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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 checkAnalyzeDataDescriptionFeaturesCategoricalValues(api.AnalyzeDataDescriptionF
eaturesCategoricalValues o) { | 31 checkAnalyzeDataDescriptionFeaturesCategoricalValues(api.AnalyzeDataDescriptionF
eaturesCategoricalValues o) { |
| 32 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; | 32 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues++; |
| 33 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { | 33 if (buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues < 3) { |
| 34 unittest.expect(o.count, unittest.equals('foo')); | 34 unittest.expect(o.count, unittest.equals('foo')); |
| 35 unittest.expect(o.value, unittest.equals('foo')); | 35 unittest.expect(o.value, unittest.equals('foo')); |
| 36 } | 36 } |
| 37 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; | 37 buildCounterAnalyzeDataDescriptionFeaturesCategoricalValues--; |
| 38 } | 38 } |
| 39 | 39 |
| 40 buildUnnamed765() { | 40 buildUnnamed793() { |
| 41 var o = new core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>(); | 41 var o = new core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues>(); |
| 42 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); | 42 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); |
| 43 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); | 43 o.add(buildAnalyzeDataDescriptionFeaturesCategoricalValues()); |
| 44 return o; | 44 return o; |
| 45 } | 45 } |
| 46 | 46 |
| 47 checkUnnamed765(core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues> o
) { | 47 checkUnnamed793(core.List<api.AnalyzeDataDescriptionFeaturesCategoricalValues> o
) { |
| 48 unittest.expect(o, unittest.hasLength(2)); | 48 unittest.expect(o, unittest.hasLength(2)); |
| 49 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[0]); | 49 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[0]); |
| 50 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[1]); | 50 checkAnalyzeDataDescriptionFeaturesCategoricalValues(o[1]); |
| 51 } | 51 } |
| 52 | 52 |
| 53 core.int buildCounterAnalyzeDataDescriptionFeaturesCategorical = 0; | 53 core.int buildCounterAnalyzeDataDescriptionFeaturesCategorical = 0; |
| 54 buildAnalyzeDataDescriptionFeaturesCategorical() { | 54 buildAnalyzeDataDescriptionFeaturesCategorical() { |
| 55 var o = new api.AnalyzeDataDescriptionFeaturesCategorical(); | 55 var o = new api.AnalyzeDataDescriptionFeaturesCategorical(); |
| 56 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; | 56 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; |
| 57 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { | 57 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { |
| 58 o.count = "foo"; | 58 o.count = "foo"; |
| 59 o.values = buildUnnamed765(); | 59 o.values = buildUnnamed793(); |
| 60 } | 60 } |
| 61 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; | 61 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; |
| 62 return o; | 62 return o; |
| 63 } | 63 } |
| 64 | 64 |
| 65 checkAnalyzeDataDescriptionFeaturesCategorical(api.AnalyzeDataDescriptionFeature
sCategorical o) { | 65 checkAnalyzeDataDescriptionFeaturesCategorical(api.AnalyzeDataDescriptionFeature
sCategorical o) { |
| 66 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; | 66 buildCounterAnalyzeDataDescriptionFeaturesCategorical++; |
| 67 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { | 67 if (buildCounterAnalyzeDataDescriptionFeaturesCategorical < 3) { |
| 68 unittest.expect(o.count, unittest.equals('foo')); | 68 unittest.expect(o.count, unittest.equals('foo')); |
| 69 checkUnnamed765(o.values); | 69 checkUnnamed793(o.values); |
| 70 } | 70 } |
| 71 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; | 71 buildCounterAnalyzeDataDescriptionFeaturesCategorical--; |
| 72 } | 72 } |
| 73 | 73 |
| 74 core.int buildCounterAnalyzeDataDescriptionFeaturesNumeric = 0; | 74 core.int buildCounterAnalyzeDataDescriptionFeaturesNumeric = 0; |
| 75 buildAnalyzeDataDescriptionFeaturesNumeric() { | 75 buildAnalyzeDataDescriptionFeaturesNumeric() { |
| 76 var o = new api.AnalyzeDataDescriptionFeaturesNumeric(); | 76 var o = new api.AnalyzeDataDescriptionFeaturesNumeric(); |
| 77 buildCounterAnalyzeDataDescriptionFeaturesNumeric++; | 77 buildCounterAnalyzeDataDescriptionFeaturesNumeric++; |
| 78 if (buildCounterAnalyzeDataDescriptionFeaturesNumeric < 3) { | 78 if (buildCounterAnalyzeDataDescriptionFeaturesNumeric < 3) { |
| 79 o.count = "foo"; | 79 o.count = "foo"; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 buildCounterAnalyzeDataDescriptionFeatures++; | 131 buildCounterAnalyzeDataDescriptionFeatures++; |
| 132 if (buildCounterAnalyzeDataDescriptionFeatures < 3) { | 132 if (buildCounterAnalyzeDataDescriptionFeatures < 3) { |
| 133 checkAnalyzeDataDescriptionFeaturesCategorical(o.categorical); | 133 checkAnalyzeDataDescriptionFeaturesCategorical(o.categorical); |
| 134 unittest.expect(o.index, unittest.equals('foo')); | 134 unittest.expect(o.index, unittest.equals('foo')); |
| 135 checkAnalyzeDataDescriptionFeaturesNumeric(o.numeric); | 135 checkAnalyzeDataDescriptionFeaturesNumeric(o.numeric); |
| 136 checkAnalyzeDataDescriptionFeaturesText(o.text); | 136 checkAnalyzeDataDescriptionFeaturesText(o.text); |
| 137 } | 137 } |
| 138 buildCounterAnalyzeDataDescriptionFeatures--; | 138 buildCounterAnalyzeDataDescriptionFeatures--; |
| 139 } | 139 } |
| 140 | 140 |
| 141 buildUnnamed766() { | 141 buildUnnamed794() { |
| 142 var o = new core.List<api.AnalyzeDataDescriptionFeatures>(); | 142 var o = new core.List<api.AnalyzeDataDescriptionFeatures>(); |
| 143 o.add(buildAnalyzeDataDescriptionFeatures()); | 143 o.add(buildAnalyzeDataDescriptionFeatures()); |
| 144 o.add(buildAnalyzeDataDescriptionFeatures()); | 144 o.add(buildAnalyzeDataDescriptionFeatures()); |
| 145 return o; | 145 return o; |
| 146 } | 146 } |
| 147 | 147 |
| 148 checkUnnamed766(core.List<api.AnalyzeDataDescriptionFeatures> o) { | 148 checkUnnamed794(core.List<api.AnalyzeDataDescriptionFeatures> o) { |
| 149 unittest.expect(o, unittest.hasLength(2)); | 149 unittest.expect(o, unittest.hasLength(2)); |
| 150 checkAnalyzeDataDescriptionFeatures(o[0]); | 150 checkAnalyzeDataDescriptionFeatures(o[0]); |
| 151 checkAnalyzeDataDescriptionFeatures(o[1]); | 151 checkAnalyzeDataDescriptionFeatures(o[1]); |
| 152 } | 152 } |
| 153 | 153 |
| 154 core.int buildCounterAnalyzeDataDescriptionOutputFeatureNumeric = 0; | 154 core.int buildCounterAnalyzeDataDescriptionOutputFeatureNumeric = 0; |
| 155 buildAnalyzeDataDescriptionOutputFeatureNumeric() { | 155 buildAnalyzeDataDescriptionOutputFeatureNumeric() { |
| 156 var o = new api.AnalyzeDataDescriptionOutputFeatureNumeric(); | 156 var o = new api.AnalyzeDataDescriptionOutputFeatureNumeric(); |
| 157 buildCounterAnalyzeDataDescriptionOutputFeatureNumeric++; | 157 buildCounterAnalyzeDataDescriptionOutputFeatureNumeric++; |
| 158 if (buildCounterAnalyzeDataDescriptionOutputFeatureNumeric < 3) { | 158 if (buildCounterAnalyzeDataDescriptionOutputFeatureNumeric < 3) { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 188 | 188 |
| 189 checkAnalyzeDataDescriptionOutputFeatureText(api.AnalyzeDataDescriptionOutputFea
tureText o) { | 189 checkAnalyzeDataDescriptionOutputFeatureText(api.AnalyzeDataDescriptionOutputFea
tureText o) { |
| 190 buildCounterAnalyzeDataDescriptionOutputFeatureText++; | 190 buildCounterAnalyzeDataDescriptionOutputFeatureText++; |
| 191 if (buildCounterAnalyzeDataDescriptionOutputFeatureText < 3) { | 191 if (buildCounterAnalyzeDataDescriptionOutputFeatureText < 3) { |
| 192 unittest.expect(o.count, unittest.equals('foo')); | 192 unittest.expect(o.count, unittest.equals('foo')); |
| 193 unittest.expect(o.value, unittest.equals('foo')); | 193 unittest.expect(o.value, unittest.equals('foo')); |
| 194 } | 194 } |
| 195 buildCounterAnalyzeDataDescriptionOutputFeatureText--; | 195 buildCounterAnalyzeDataDescriptionOutputFeatureText--; |
| 196 } | 196 } |
| 197 | 197 |
| 198 buildUnnamed767() { | 198 buildUnnamed795() { |
| 199 var o = new core.List<api.AnalyzeDataDescriptionOutputFeatureText>(); | 199 var o = new core.List<api.AnalyzeDataDescriptionOutputFeatureText>(); |
| 200 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); | 200 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); |
| 201 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); | 201 o.add(buildAnalyzeDataDescriptionOutputFeatureText()); |
| 202 return o; | 202 return o; |
| 203 } | 203 } |
| 204 | 204 |
| 205 checkUnnamed767(core.List<api.AnalyzeDataDescriptionOutputFeatureText> o) { | 205 checkUnnamed795(core.List<api.AnalyzeDataDescriptionOutputFeatureText> o) { |
| 206 unittest.expect(o, unittest.hasLength(2)); | 206 unittest.expect(o, unittest.hasLength(2)); |
| 207 checkAnalyzeDataDescriptionOutputFeatureText(o[0]); | 207 checkAnalyzeDataDescriptionOutputFeatureText(o[0]); |
| 208 checkAnalyzeDataDescriptionOutputFeatureText(o[1]); | 208 checkAnalyzeDataDescriptionOutputFeatureText(o[1]); |
| 209 } | 209 } |
| 210 | 210 |
| 211 core.int buildCounterAnalyzeDataDescriptionOutputFeature = 0; | 211 core.int buildCounterAnalyzeDataDescriptionOutputFeature = 0; |
| 212 buildAnalyzeDataDescriptionOutputFeature() { | 212 buildAnalyzeDataDescriptionOutputFeature() { |
| 213 var o = new api.AnalyzeDataDescriptionOutputFeature(); | 213 var o = new api.AnalyzeDataDescriptionOutputFeature(); |
| 214 buildCounterAnalyzeDataDescriptionOutputFeature++; | 214 buildCounterAnalyzeDataDescriptionOutputFeature++; |
| 215 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { | 215 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { |
| 216 o.numeric = buildAnalyzeDataDescriptionOutputFeatureNumeric(); | 216 o.numeric = buildAnalyzeDataDescriptionOutputFeatureNumeric(); |
| 217 o.text = buildUnnamed767(); | 217 o.text = buildUnnamed795(); |
| 218 } | 218 } |
| 219 buildCounterAnalyzeDataDescriptionOutputFeature--; | 219 buildCounterAnalyzeDataDescriptionOutputFeature--; |
| 220 return o; | 220 return o; |
| 221 } | 221 } |
| 222 | 222 |
| 223 checkAnalyzeDataDescriptionOutputFeature(api.AnalyzeDataDescriptionOutputFeature
o) { | 223 checkAnalyzeDataDescriptionOutputFeature(api.AnalyzeDataDescriptionOutputFeature
o) { |
| 224 buildCounterAnalyzeDataDescriptionOutputFeature++; | 224 buildCounterAnalyzeDataDescriptionOutputFeature++; |
| 225 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { | 225 if (buildCounterAnalyzeDataDescriptionOutputFeature < 3) { |
| 226 checkAnalyzeDataDescriptionOutputFeatureNumeric(o.numeric); | 226 checkAnalyzeDataDescriptionOutputFeatureNumeric(o.numeric); |
| 227 checkUnnamed767(o.text); | 227 checkUnnamed795(o.text); |
| 228 } | 228 } |
| 229 buildCounterAnalyzeDataDescriptionOutputFeature--; | 229 buildCounterAnalyzeDataDescriptionOutputFeature--; |
| 230 } | 230 } |
| 231 | 231 |
| 232 core.int buildCounterAnalyzeDataDescription = 0; | 232 core.int buildCounterAnalyzeDataDescription = 0; |
| 233 buildAnalyzeDataDescription() { | 233 buildAnalyzeDataDescription() { |
| 234 var o = new api.AnalyzeDataDescription(); | 234 var o = new api.AnalyzeDataDescription(); |
| 235 buildCounterAnalyzeDataDescription++; | 235 buildCounterAnalyzeDataDescription++; |
| 236 if (buildCounterAnalyzeDataDescription < 3) { | 236 if (buildCounterAnalyzeDataDescription < 3) { |
| 237 o.features = buildUnnamed766(); | 237 o.features = buildUnnamed794(); |
| 238 o.outputFeature = buildAnalyzeDataDescriptionOutputFeature(); | 238 o.outputFeature = buildAnalyzeDataDescriptionOutputFeature(); |
| 239 } | 239 } |
| 240 buildCounterAnalyzeDataDescription--; | 240 buildCounterAnalyzeDataDescription--; |
| 241 return o; | 241 return o; |
| 242 } | 242 } |
| 243 | 243 |
| 244 checkAnalyzeDataDescription(api.AnalyzeDataDescription o) { | 244 checkAnalyzeDataDescription(api.AnalyzeDataDescription o) { |
| 245 buildCounterAnalyzeDataDescription++; | 245 buildCounterAnalyzeDataDescription++; |
| 246 if (buildCounterAnalyzeDataDescription < 3) { | 246 if (buildCounterAnalyzeDataDescription < 3) { |
| 247 checkUnnamed766(o.features); | 247 checkUnnamed794(o.features); |
| 248 checkAnalyzeDataDescriptionOutputFeature(o.outputFeature); | 248 checkAnalyzeDataDescriptionOutputFeature(o.outputFeature); |
| 249 } | 249 } |
| 250 buildCounterAnalyzeDataDescription--; | 250 buildCounterAnalyzeDataDescription--; |
| 251 } | 251 } |
| 252 | 252 |
| 253 buildUnnamed768() { | 253 buildUnnamed796() { |
| 254 var o = new core.Map<core.String, core.String>(); | 254 var o = new core.Map<core.String, core.String>(); |
| 255 o["x"] = "foo"; | 255 o["x"] = "foo"; |
| 256 o["y"] = "foo"; | 256 o["y"] = "foo"; |
| 257 return o; | 257 return o; |
| 258 } | 258 } |
| 259 | 259 |
| 260 checkUnnamed768(core.Map<core.String, core.String> o) { | 260 checkUnnamed796(core.Map<core.String, core.String> o) { |
| 261 unittest.expect(o, unittest.hasLength(2)); | 261 unittest.expect(o, unittest.hasLength(2)); |
| 262 unittest.expect(o["x"], unittest.equals('foo')); | 262 unittest.expect(o["x"], unittest.equals('foo')); |
| 263 unittest.expect(o["y"], unittest.equals('foo')); | 263 unittest.expect(o["y"], unittest.equals('foo')); |
| 264 } | 264 } |
| 265 | 265 |
| 266 buildUnnamed769() { | 266 buildUnnamed797() { |
| 267 var o = new core.List<core.Map<core.String, core.String>>(); | 267 var o = new core.List<core.Map<core.String, core.String>>(); |
| 268 o.add(buildUnnamed768()); | 268 o.add(buildUnnamed796()); |
| 269 o.add(buildUnnamed768()); | 269 o.add(buildUnnamed796()); |
| 270 return o; | 270 return o; |
| 271 } | 271 } |
| 272 | 272 |
| 273 checkUnnamed769(core.List<core.Map<core.String, core.String>> o) { | 273 checkUnnamed797(core.List<core.Map<core.String, core.String>> o) { |
| 274 unittest.expect(o, unittest.hasLength(2)); | 274 unittest.expect(o, unittest.hasLength(2)); |
| 275 checkUnnamed768(o[0]); | 275 checkUnnamed796(o[0]); |
| 276 checkUnnamed768(o[1]); | 276 checkUnnamed796(o[1]); |
| 277 } | 277 } |
| 278 | 278 |
| 279 buildUnnamed770() { | 279 buildUnnamed798() { |
| 280 var o = new core.Map<core.String, core.String>(); | 280 var o = new core.Map<core.String, core.String>(); |
| 281 o["x"] = "foo"; | 281 o["x"] = "foo"; |
| 282 o["y"] = "foo"; | 282 o["y"] = "foo"; |
| 283 return o; | 283 return o; |
| 284 } | 284 } |
| 285 | 285 |
| 286 checkUnnamed770(core.Map<core.String, core.String> o) { | 286 checkUnnamed798(core.Map<core.String, core.String> o) { |
| 287 unittest.expect(o, unittest.hasLength(2)); | 287 unittest.expect(o, unittest.hasLength(2)); |
| 288 unittest.expect(o["x"], unittest.equals('foo')); | 288 unittest.expect(o["x"], unittest.equals('foo')); |
| 289 unittest.expect(o["y"], unittest.equals('foo')); | 289 unittest.expect(o["y"], unittest.equals('foo')); |
| 290 } | 290 } |
| 291 | 291 |
| 292 buildUnnamed771() { | 292 buildUnnamed799() { |
| 293 var o = new core.Map<core.String, core.Map<core.String, core.String>>(); | 293 var o = new core.Map<core.String, core.Map<core.String, core.String>>(); |
| 294 o["x"] = buildUnnamed770(); | 294 o["x"] = buildUnnamed798(); |
| 295 o["y"] = buildUnnamed770(); | 295 o["y"] = buildUnnamed798(); |
| 296 return o; | 296 return o; |
| 297 } | 297 } |
| 298 | 298 |
| 299 checkUnnamed771(core.Map<core.String, core.Map<core.String, core.String>> o) { | 299 checkUnnamed799(core.Map<core.String, core.Map<core.String, core.String>> o) { |
| 300 unittest.expect(o, unittest.hasLength(2)); | 300 unittest.expect(o, unittest.hasLength(2)); |
| 301 checkUnnamed770(o["x"]); | 301 checkUnnamed798(o["x"]); |
| 302 checkUnnamed770(o["y"]); | 302 checkUnnamed798(o["y"]); |
| 303 } | 303 } |
| 304 | 304 |
| 305 buildUnnamed772() { | 305 buildUnnamed800() { |
| 306 var o = new core.Map<core.String, core.String>(); | 306 var o = new core.Map<core.String, core.String>(); |
| 307 o["x"] = "foo"; | 307 o["x"] = "foo"; |
| 308 o["y"] = "foo"; | 308 o["y"] = "foo"; |
| 309 return o; | 309 return o; |
| 310 } | 310 } |
| 311 | 311 |
| 312 checkUnnamed772(core.Map<core.String, core.String> o) { | 312 checkUnnamed800(core.Map<core.String, core.String> o) { |
| 313 unittest.expect(o, unittest.hasLength(2)); | 313 unittest.expect(o, unittest.hasLength(2)); |
| 314 unittest.expect(o["x"], unittest.equals('foo')); | 314 unittest.expect(o["x"], unittest.equals('foo')); |
| 315 unittest.expect(o["y"], unittest.equals('foo')); | 315 unittest.expect(o["y"], unittest.equals('foo')); |
| 316 } | 316 } |
| 317 | 317 |
| 318 core.int buildCounterAnalyzeModelDescription = 0; | 318 core.int buildCounterAnalyzeModelDescription = 0; |
| 319 buildAnalyzeModelDescription() { | 319 buildAnalyzeModelDescription() { |
| 320 var o = new api.AnalyzeModelDescription(); | 320 var o = new api.AnalyzeModelDescription(); |
| 321 buildCounterAnalyzeModelDescription++; | 321 buildCounterAnalyzeModelDescription++; |
| 322 if (buildCounterAnalyzeModelDescription < 3) { | 322 if (buildCounterAnalyzeModelDescription < 3) { |
| 323 o.confusionMatrix = buildUnnamed771(); | 323 o.confusionMatrix = buildUnnamed799(); |
| 324 o.confusionMatrixRowTotals = buildUnnamed772(); | 324 o.confusionMatrixRowTotals = buildUnnamed800(); |
| 325 o.modelinfo = buildInsert2(); | 325 o.modelinfo = buildInsert2(); |
| 326 } | 326 } |
| 327 buildCounterAnalyzeModelDescription--; | 327 buildCounterAnalyzeModelDescription--; |
| 328 return o; | 328 return o; |
| 329 } | 329 } |
| 330 | 330 |
| 331 checkAnalyzeModelDescription(api.AnalyzeModelDescription o) { | 331 checkAnalyzeModelDescription(api.AnalyzeModelDescription o) { |
| 332 buildCounterAnalyzeModelDescription++; | 332 buildCounterAnalyzeModelDescription++; |
| 333 if (buildCounterAnalyzeModelDescription < 3) { | 333 if (buildCounterAnalyzeModelDescription < 3) { |
| 334 checkUnnamed771(o.confusionMatrix); | 334 checkUnnamed799(o.confusionMatrix); |
| 335 checkUnnamed772(o.confusionMatrixRowTotals); | 335 checkUnnamed800(o.confusionMatrixRowTotals); |
| 336 checkInsert2(o.modelinfo); | 336 checkInsert2(o.modelinfo); |
| 337 } | 337 } |
| 338 buildCounterAnalyzeModelDescription--; | 338 buildCounterAnalyzeModelDescription--; |
| 339 } | 339 } |
| 340 | 340 |
| 341 core.int buildCounterAnalyze = 0; | 341 core.int buildCounterAnalyze = 0; |
| 342 buildAnalyze() { | 342 buildAnalyze() { |
| 343 var o = new api.Analyze(); | 343 var o = new api.Analyze(); |
| 344 buildCounterAnalyze++; | 344 buildCounterAnalyze++; |
| 345 if (buildCounterAnalyze < 3) { | 345 if (buildCounterAnalyze < 3) { |
| 346 o.dataDescription = buildAnalyzeDataDescription(); | 346 o.dataDescription = buildAnalyzeDataDescription(); |
| 347 o.errors = buildUnnamed769(); | 347 o.errors = buildUnnamed797(); |
| 348 o.id = "foo"; | 348 o.id = "foo"; |
| 349 o.kind = "foo"; | 349 o.kind = "foo"; |
| 350 o.modelDescription = buildAnalyzeModelDescription(); | 350 o.modelDescription = buildAnalyzeModelDescription(); |
| 351 o.selfLink = "foo"; | 351 o.selfLink = "foo"; |
| 352 } | 352 } |
| 353 buildCounterAnalyze--; | 353 buildCounterAnalyze--; |
| 354 return o; | 354 return o; |
| 355 } | 355 } |
| 356 | 356 |
| 357 checkAnalyze(api.Analyze o) { | 357 checkAnalyze(api.Analyze o) { |
| 358 buildCounterAnalyze++; | 358 buildCounterAnalyze++; |
| 359 if (buildCounterAnalyze < 3) { | 359 if (buildCounterAnalyze < 3) { |
| 360 checkAnalyzeDataDescription(o.dataDescription); | 360 checkAnalyzeDataDescription(o.dataDescription); |
| 361 checkUnnamed769(o.errors); | 361 checkUnnamed797(o.errors); |
| 362 unittest.expect(o.id, unittest.equals('foo')); | 362 unittest.expect(o.id, unittest.equals('foo')); |
| 363 unittest.expect(o.kind, unittest.equals('foo')); | 363 unittest.expect(o.kind, unittest.equals('foo')); |
| 364 checkAnalyzeModelDescription(o.modelDescription); | 364 checkAnalyzeModelDescription(o.modelDescription); |
| 365 unittest.expect(o.selfLink, unittest.equals('foo')); | 365 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 366 } | 366 } |
| 367 buildCounterAnalyze--; | 367 buildCounterAnalyze--; |
| 368 } | 368 } |
| 369 | 369 |
| 370 buildUnnamed773() { | 370 buildUnnamed801() { |
| 371 var o = new core.List<core.Object>(); | 371 var o = new core.List<core.Object>(); |
| 372 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 372 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 373 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 373 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 374 return o; | 374 return o; |
| 375 } | 375 } |
| 376 | 376 |
| 377 checkUnnamed773(core.List<core.Object> o) { | 377 checkUnnamed801(core.List<core.Object> o) { |
| 378 unittest.expect(o, unittest.hasLength(2)); | 378 unittest.expect(o, unittest.hasLength(2)); |
| 379 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); | 379 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); |
| 380 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); | 380 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); |
| 381 } | 381 } |
| 382 | 382 |
| 383 core.int buildCounterInputInput = 0; | 383 core.int buildCounterInputInput = 0; |
| 384 buildInputInput() { | 384 buildInputInput() { |
| 385 var o = new api.InputInput(); | 385 var o = new api.InputInput(); |
| 386 buildCounterInputInput++; | 386 buildCounterInputInput++; |
| 387 if (buildCounterInputInput < 3) { | 387 if (buildCounterInputInput < 3) { |
| 388 o.csvInstance = buildUnnamed773(); | 388 o.csvInstance = buildUnnamed801(); |
| 389 } | 389 } |
| 390 buildCounterInputInput--; | 390 buildCounterInputInput--; |
| 391 return o; | 391 return o; |
| 392 } | 392 } |
| 393 | 393 |
| 394 checkInputInput(api.InputInput o) { | 394 checkInputInput(api.InputInput o) { |
| 395 buildCounterInputInput++; | 395 buildCounterInputInput++; |
| 396 if (buildCounterInputInput < 3) { | 396 if (buildCounterInputInput < 3) { |
| 397 checkUnnamed773(o.csvInstance); | 397 checkUnnamed801(o.csvInstance); |
| 398 } | 398 } |
| 399 buildCounterInputInput--; | 399 buildCounterInputInput--; |
| 400 } | 400 } |
| 401 | 401 |
| 402 core.int buildCounterInput = 0; | 402 core.int buildCounterInput = 0; |
| 403 buildInput() { | 403 buildInput() { |
| 404 var o = new api.Input(); | 404 var o = new api.Input(); |
| 405 buildCounterInput++; | 405 buildCounterInput++; |
| 406 if (buildCounterInput < 3) { | 406 if (buildCounterInput < 3) { |
| 407 o.input = buildInputInput(); | 407 o.input = buildInputInput(); |
| 408 } | 408 } |
| 409 buildCounterInput--; | 409 buildCounterInput--; |
| 410 return o; | 410 return o; |
| 411 } | 411 } |
| 412 | 412 |
| 413 checkInput(api.Input o) { | 413 checkInput(api.Input o) { |
| 414 buildCounterInput++; | 414 buildCounterInput++; |
| 415 if (buildCounterInput < 3) { | 415 if (buildCounterInput < 3) { |
| 416 checkInputInput(o.input); | 416 checkInputInput(o.input); |
| 417 } | 417 } |
| 418 buildCounterInput--; | 418 buildCounterInput--; |
| 419 } | 419 } |
| 420 | 420 |
| 421 buildUnnamed774() { | 421 buildUnnamed802() { |
| 422 var o = new core.List<core.Object>(); | 422 var o = new core.List<core.Object>(); |
| 423 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 423 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 424 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 424 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 425 return o; | 425 return o; |
| 426 } | 426 } |
| 427 | 427 |
| 428 checkUnnamed774(core.List<core.Object> o) { | 428 checkUnnamed802(core.List<core.Object> o) { |
| 429 unittest.expect(o, unittest.hasLength(2)); | 429 unittest.expect(o, unittest.hasLength(2)); |
| 430 var casted3 = (o[0]) as core.Map; unittest.expect(casted3, unittest.hasLength(
3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], u
nittest.equals('foo')); | 430 var casted3 = (o[0]) as core.Map; unittest.expect(casted3, unittest.hasLength(
3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], u
nittest.equals('foo')); |
| 431 var casted4 = (o[1]) as core.Map; unittest.expect(casted4, unittest.hasLength(
3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u
nittest.equals('foo')); | 431 var casted4 = (o[1]) as core.Map; unittest.expect(casted4, unittest.hasLength(
3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u
nittest.equals('foo')); |
| 432 } | 432 } |
| 433 | 433 |
| 434 core.int buildCounterInsertTrainingInstances = 0; | 434 core.int buildCounterInsertTrainingInstances = 0; |
| 435 buildInsertTrainingInstances() { | 435 buildInsertTrainingInstances() { |
| 436 var o = new api.InsertTrainingInstances(); | 436 var o = new api.InsertTrainingInstances(); |
| 437 buildCounterInsertTrainingInstances++; | 437 buildCounterInsertTrainingInstances++; |
| 438 if (buildCounterInsertTrainingInstances < 3) { | 438 if (buildCounterInsertTrainingInstances < 3) { |
| 439 o.csvInstance = buildUnnamed774(); | 439 o.csvInstance = buildUnnamed802(); |
| 440 o.output = "foo"; | 440 o.output = "foo"; |
| 441 } | 441 } |
| 442 buildCounterInsertTrainingInstances--; | 442 buildCounterInsertTrainingInstances--; |
| 443 return o; | 443 return o; |
| 444 } | 444 } |
| 445 | 445 |
| 446 checkInsertTrainingInstances(api.InsertTrainingInstances o) { | 446 checkInsertTrainingInstances(api.InsertTrainingInstances o) { |
| 447 buildCounterInsertTrainingInstances++; | 447 buildCounterInsertTrainingInstances++; |
| 448 if (buildCounterInsertTrainingInstances < 3) { | 448 if (buildCounterInsertTrainingInstances < 3) { |
| 449 checkUnnamed774(o.csvInstance); | 449 checkUnnamed802(o.csvInstance); |
| 450 unittest.expect(o.output, unittest.equals('foo')); | 450 unittest.expect(o.output, unittest.equals('foo')); |
| 451 } | 451 } |
| 452 buildCounterInsertTrainingInstances--; | 452 buildCounterInsertTrainingInstances--; |
| 453 } | 453 } |
| 454 | 454 |
| 455 buildUnnamed775() { | 455 buildUnnamed803() { |
| 456 var o = new core.List<api.InsertTrainingInstances>(); | 456 var o = new core.List<api.InsertTrainingInstances>(); |
| 457 o.add(buildInsertTrainingInstances()); | 457 o.add(buildInsertTrainingInstances()); |
| 458 o.add(buildInsertTrainingInstances()); | 458 o.add(buildInsertTrainingInstances()); |
| 459 return o; | 459 return o; |
| 460 } | 460 } |
| 461 | 461 |
| 462 checkUnnamed775(core.List<api.InsertTrainingInstances> o) { | 462 checkUnnamed803(core.List<api.InsertTrainingInstances> o) { |
| 463 unittest.expect(o, unittest.hasLength(2)); | 463 unittest.expect(o, unittest.hasLength(2)); |
| 464 checkInsertTrainingInstances(o[0]); | 464 checkInsertTrainingInstances(o[0]); |
| 465 checkInsertTrainingInstances(o[1]); | 465 checkInsertTrainingInstances(o[1]); |
| 466 } | 466 } |
| 467 | 467 |
| 468 buildUnnamed776() { | 468 buildUnnamed804() { |
| 469 var o = new core.Map<core.String, core.double>(); | 469 var o = new core.Map<core.String, core.double>(); |
| 470 o["x"] = 42.0; | 470 o["x"] = 42.0; |
| 471 o["y"] = 42.0; | 471 o["y"] = 42.0; |
| 472 return o; | 472 return o; |
| 473 } | 473 } |
| 474 | 474 |
| 475 checkUnnamed776(core.Map<core.String, core.double> o) { | 475 checkUnnamed804(core.Map<core.String, core.double> o) { |
| 476 unittest.expect(o, unittest.hasLength(2)); | 476 unittest.expect(o, unittest.hasLength(2)); |
| 477 unittest.expect(o["x"], unittest.equals(42.0)); | 477 unittest.expect(o["x"], unittest.equals(42.0)); |
| 478 unittest.expect(o["y"], unittest.equals(42.0)); | 478 unittest.expect(o["y"], unittest.equals(42.0)); |
| 479 } | 479 } |
| 480 | 480 |
| 481 buildUnnamed777() { | 481 buildUnnamed805() { |
| 482 var o = new core.List<core.Map<core.String, core.double>>(); | 482 var o = new core.List<core.Map<core.String, core.double>>(); |
| 483 o.add(buildUnnamed776()); | 483 o.add(buildUnnamed804()); |
| 484 o.add(buildUnnamed776()); | 484 o.add(buildUnnamed804()); |
| 485 return o; | 485 return o; |
| 486 } | 486 } |
| 487 | 487 |
| 488 checkUnnamed777(core.List<core.Map<core.String, core.double>> o) { | 488 checkUnnamed805(core.List<core.Map<core.String, core.double>> o) { |
| 489 unittest.expect(o, unittest.hasLength(2)); | 489 unittest.expect(o, unittest.hasLength(2)); |
| 490 checkUnnamed776(o[0]); | 490 checkUnnamed804(o[0]); |
| 491 checkUnnamed776(o[1]); | 491 checkUnnamed804(o[1]); |
| 492 } | 492 } |
| 493 | 493 |
| 494 core.int buildCounterInsert = 0; | 494 core.int buildCounterInsert = 0; |
| 495 buildInsert() { | 495 buildInsert() { |
| 496 var o = new api.Insert(); | 496 var o = new api.Insert(); |
| 497 buildCounterInsert++; | 497 buildCounterInsert++; |
| 498 if (buildCounterInsert < 3) { | 498 if (buildCounterInsert < 3) { |
| 499 o.id = "foo"; | 499 o.id = "foo"; |
| 500 o.modelType = "foo"; | 500 o.modelType = "foo"; |
| 501 o.sourceModel = "foo"; | 501 o.sourceModel = "foo"; |
| 502 o.storageDataLocation = "foo"; | 502 o.storageDataLocation = "foo"; |
| 503 o.storagePMMLLocation = "foo"; | 503 o.storagePMMLLocation = "foo"; |
| 504 o.storagePMMLModelLocation = "foo"; | 504 o.storagePMMLModelLocation = "foo"; |
| 505 o.trainingInstances = buildUnnamed775(); | 505 o.trainingInstances = buildUnnamed803(); |
| 506 o.utility = buildUnnamed777(); | 506 o.utility = buildUnnamed805(); |
| 507 } | 507 } |
| 508 buildCounterInsert--; | 508 buildCounterInsert--; |
| 509 return o; | 509 return o; |
| 510 } | 510 } |
| 511 | 511 |
| 512 checkInsert(api.Insert o) { | 512 checkInsert(api.Insert o) { |
| 513 buildCounterInsert++; | 513 buildCounterInsert++; |
| 514 if (buildCounterInsert < 3) { | 514 if (buildCounterInsert < 3) { |
| 515 unittest.expect(o.id, unittest.equals('foo')); | 515 unittest.expect(o.id, unittest.equals('foo')); |
| 516 unittest.expect(o.modelType, unittest.equals('foo')); | 516 unittest.expect(o.modelType, unittest.equals('foo')); |
| 517 unittest.expect(o.sourceModel, unittest.equals('foo')); | 517 unittest.expect(o.sourceModel, unittest.equals('foo')); |
| 518 unittest.expect(o.storageDataLocation, unittest.equals('foo')); | 518 unittest.expect(o.storageDataLocation, unittest.equals('foo')); |
| 519 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); | 519 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); |
| 520 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); | 520 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); |
| 521 checkUnnamed775(o.trainingInstances); | 521 checkUnnamed803(o.trainingInstances); |
| 522 checkUnnamed777(o.utility); | 522 checkUnnamed805(o.utility); |
| 523 } | 523 } |
| 524 buildCounterInsert--; | 524 buildCounterInsert--; |
| 525 } | 525 } |
| 526 | 526 |
| 527 core.int buildCounterInsert2ModelInfo = 0; | 527 core.int buildCounterInsert2ModelInfo = 0; |
| 528 buildInsert2ModelInfo() { | 528 buildInsert2ModelInfo() { |
| 529 var o = new api.Insert2ModelInfo(); | 529 var o = new api.Insert2ModelInfo(); |
| 530 buildCounterInsert2ModelInfo++; | 530 buildCounterInsert2ModelInfo++; |
| 531 if (buildCounterInsert2ModelInfo < 3) { | 531 if (buildCounterInsert2ModelInfo < 3) { |
| 532 o.classWeightedAccuracy = "foo"; | 532 o.classWeightedAccuracy = "foo"; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 unittest.expect(o.selfLink, unittest.equals('foo')); | 585 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 586 unittest.expect(o.storageDataLocation, unittest.equals('foo')); | 586 unittest.expect(o.storageDataLocation, unittest.equals('foo')); |
| 587 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); | 587 unittest.expect(o.storagePMMLLocation, unittest.equals('foo')); |
| 588 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); | 588 unittest.expect(o.storagePMMLModelLocation, unittest.equals('foo')); |
| 589 unittest.expect(o.trainingComplete, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 589 unittest.expect(o.trainingComplete, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
| 590 unittest.expect(o.trainingStatus, unittest.equals('foo')); | 590 unittest.expect(o.trainingStatus, unittest.equals('foo')); |
| 591 } | 591 } |
| 592 buildCounterInsert2--; | 592 buildCounterInsert2--; |
| 593 } | 593 } |
| 594 | 594 |
| 595 buildUnnamed778() { | 595 buildUnnamed806() { |
| 596 var o = new core.List<api.Insert2>(); | 596 var o = new core.List<api.Insert2>(); |
| 597 o.add(buildInsert2()); | 597 o.add(buildInsert2()); |
| 598 o.add(buildInsert2()); | 598 o.add(buildInsert2()); |
| 599 return o; | 599 return o; |
| 600 } | 600 } |
| 601 | 601 |
| 602 checkUnnamed778(core.List<api.Insert2> o) { | 602 checkUnnamed806(core.List<api.Insert2> o) { |
| 603 unittest.expect(o, unittest.hasLength(2)); | 603 unittest.expect(o, unittest.hasLength(2)); |
| 604 checkInsert2(o[0]); | 604 checkInsert2(o[0]); |
| 605 checkInsert2(o[1]); | 605 checkInsert2(o[1]); |
| 606 } | 606 } |
| 607 | 607 |
| 608 core.int buildCounterList = 0; | 608 core.int buildCounterList = 0; |
| 609 buildList() { | 609 buildList() { |
| 610 var o = new api.List(); | 610 var o = new api.List(); |
| 611 buildCounterList++; | 611 buildCounterList++; |
| 612 if (buildCounterList < 3) { | 612 if (buildCounterList < 3) { |
| 613 o.items = buildUnnamed778(); | 613 o.items = buildUnnamed806(); |
| 614 o.kind = "foo"; | 614 o.kind = "foo"; |
| 615 o.nextPageToken = "foo"; | 615 o.nextPageToken = "foo"; |
| 616 o.selfLink = "foo"; | 616 o.selfLink = "foo"; |
| 617 } | 617 } |
| 618 buildCounterList--; | 618 buildCounterList--; |
| 619 return o; | 619 return o; |
| 620 } | 620 } |
| 621 | 621 |
| 622 checkList(api.List o) { | 622 checkList(api.List o) { |
| 623 buildCounterList++; | 623 buildCounterList++; |
| 624 if (buildCounterList < 3) { | 624 if (buildCounterList < 3) { |
| 625 checkUnnamed778(o.items); | 625 checkUnnamed806(o.items); |
| 626 unittest.expect(o.kind, unittest.equals('foo')); | 626 unittest.expect(o.kind, unittest.equals('foo')); |
| 627 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 627 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 628 unittest.expect(o.selfLink, unittest.equals('foo')); | 628 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 629 } | 629 } |
| 630 buildCounterList--; | 630 buildCounterList--; |
| 631 } | 631 } |
| 632 | 632 |
| 633 core.int buildCounterOutputOutputMulti = 0; | 633 core.int buildCounterOutputOutputMulti = 0; |
| 634 buildOutputOutputMulti() { | 634 buildOutputOutputMulti() { |
| 635 var o = new api.OutputOutputMulti(); | 635 var o = new api.OutputOutputMulti(); |
| 636 buildCounterOutputOutputMulti++; | 636 buildCounterOutputOutputMulti++; |
| 637 if (buildCounterOutputOutputMulti < 3) { | 637 if (buildCounterOutputOutputMulti < 3) { |
| 638 o.label = "foo"; | 638 o.label = "foo"; |
| 639 o.score = "foo"; | 639 o.score = "foo"; |
| 640 } | 640 } |
| 641 buildCounterOutputOutputMulti--; | 641 buildCounterOutputOutputMulti--; |
| 642 return o; | 642 return o; |
| 643 } | 643 } |
| 644 | 644 |
| 645 checkOutputOutputMulti(api.OutputOutputMulti o) { | 645 checkOutputOutputMulti(api.OutputOutputMulti o) { |
| 646 buildCounterOutputOutputMulti++; | 646 buildCounterOutputOutputMulti++; |
| 647 if (buildCounterOutputOutputMulti < 3) { | 647 if (buildCounterOutputOutputMulti < 3) { |
| 648 unittest.expect(o.label, unittest.equals('foo')); | 648 unittest.expect(o.label, unittest.equals('foo')); |
| 649 unittest.expect(o.score, unittest.equals('foo')); | 649 unittest.expect(o.score, unittest.equals('foo')); |
| 650 } | 650 } |
| 651 buildCounterOutputOutputMulti--; | 651 buildCounterOutputOutputMulti--; |
| 652 } | 652 } |
| 653 | 653 |
| 654 buildUnnamed779() { | 654 buildUnnamed807() { |
| 655 var o = new core.List<api.OutputOutputMulti>(); | 655 var o = new core.List<api.OutputOutputMulti>(); |
| 656 o.add(buildOutputOutputMulti()); | 656 o.add(buildOutputOutputMulti()); |
| 657 o.add(buildOutputOutputMulti()); | 657 o.add(buildOutputOutputMulti()); |
| 658 return o; | 658 return o; |
| 659 } | 659 } |
| 660 | 660 |
| 661 checkUnnamed779(core.List<api.OutputOutputMulti> o) { | 661 checkUnnamed807(core.List<api.OutputOutputMulti> o) { |
| 662 unittest.expect(o, unittest.hasLength(2)); | 662 unittest.expect(o, unittest.hasLength(2)); |
| 663 checkOutputOutputMulti(o[0]); | 663 checkOutputOutputMulti(o[0]); |
| 664 checkOutputOutputMulti(o[1]); | 664 checkOutputOutputMulti(o[1]); |
| 665 } | 665 } |
| 666 | 666 |
| 667 core.int buildCounterOutput = 0; | 667 core.int buildCounterOutput = 0; |
| 668 buildOutput() { | 668 buildOutput() { |
| 669 var o = new api.Output(); | 669 var o = new api.Output(); |
| 670 buildCounterOutput++; | 670 buildCounterOutput++; |
| 671 if (buildCounterOutput < 3) { | 671 if (buildCounterOutput < 3) { |
| 672 o.id = "foo"; | 672 o.id = "foo"; |
| 673 o.kind = "foo"; | 673 o.kind = "foo"; |
| 674 o.outputLabel = "foo"; | 674 o.outputLabel = "foo"; |
| 675 o.outputMulti = buildUnnamed779(); | 675 o.outputMulti = buildUnnamed807(); |
| 676 o.outputValue = 42.0; | 676 o.outputValue = "foo"; |
| 677 o.selfLink = "foo"; | 677 o.selfLink = "foo"; |
| 678 } | 678 } |
| 679 buildCounterOutput--; | 679 buildCounterOutput--; |
| 680 return o; | 680 return o; |
| 681 } | 681 } |
| 682 | 682 |
| 683 checkOutput(api.Output o) { | 683 checkOutput(api.Output o) { |
| 684 buildCounterOutput++; | 684 buildCounterOutput++; |
| 685 if (buildCounterOutput < 3) { | 685 if (buildCounterOutput < 3) { |
| 686 unittest.expect(o.id, unittest.equals('foo')); | 686 unittest.expect(o.id, unittest.equals('foo')); |
| 687 unittest.expect(o.kind, unittest.equals('foo')); | 687 unittest.expect(o.kind, unittest.equals('foo')); |
| 688 unittest.expect(o.outputLabel, unittest.equals('foo')); | 688 unittest.expect(o.outputLabel, unittest.equals('foo')); |
| 689 checkUnnamed779(o.outputMulti); | 689 checkUnnamed807(o.outputMulti); |
| 690 unittest.expect(o.outputValue, unittest.equals(42.0)); | 690 unittest.expect(o.outputValue, unittest.equals('foo')); |
| 691 unittest.expect(o.selfLink, unittest.equals('foo')); | 691 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 692 } | 692 } |
| 693 buildCounterOutput--; | 693 buildCounterOutput--; |
| 694 } | 694 } |
| 695 | 695 |
| 696 buildUnnamed780() { | 696 buildUnnamed808() { |
| 697 var o = new core.List<core.Object>(); | 697 var o = new core.List<core.Object>(); |
| 698 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 698 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 699 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 699 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 700 return o; | 700 return o; |
| 701 } | 701 } |
| 702 | 702 |
| 703 checkUnnamed780(core.List<core.Object> o) { | 703 checkUnnamed808(core.List<core.Object> o) { |
| 704 unittest.expect(o, unittest.hasLength(2)); | 704 unittest.expect(o, unittest.hasLength(2)); |
| 705 var casted5 = (o[0]) as core.Map; unittest.expect(casted5, unittest.hasLength(
3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u
nittest.equals('foo')); | 705 var casted5 = (o[0]) as core.Map; unittest.expect(casted5, unittest.hasLength(
3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u
nittest.equals('foo')); |
| 706 var casted6 = (o[1]) as core.Map; unittest.expect(casted6, unittest.hasLength(
3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], u
nittest.equals('foo')); | 706 var casted6 = (o[1]) as core.Map; unittest.expect(casted6, unittest.hasLength(
3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], u
nittest.equals('foo')); |
| 707 } | 707 } |
| 708 | 708 |
| 709 core.int buildCounterUpdate = 0; | 709 core.int buildCounterUpdate = 0; |
| 710 buildUpdate() { | 710 buildUpdate() { |
| 711 var o = new api.Update(); | 711 var o = new api.Update(); |
| 712 buildCounterUpdate++; | 712 buildCounterUpdate++; |
| 713 if (buildCounterUpdate < 3) { | 713 if (buildCounterUpdate < 3) { |
| 714 o.csvInstance = buildUnnamed780(); | 714 o.csvInstance = buildUnnamed808(); |
| 715 o.output = "foo"; | 715 o.output = "foo"; |
| 716 } | 716 } |
| 717 buildCounterUpdate--; | 717 buildCounterUpdate--; |
| 718 return o; | 718 return o; |
| 719 } | 719 } |
| 720 | 720 |
| 721 checkUpdate(api.Update o) { | 721 checkUpdate(api.Update o) { |
| 722 buildCounterUpdate++; | 722 buildCounterUpdate++; |
| 723 if (buildCounterUpdate < 3) { | 723 if (buildCounterUpdate < 3) { |
| 724 checkUnnamed780(o.csvInstance); | 724 checkUnnamed808(o.csvInstance); |
| 725 unittest.expect(o.output, unittest.equals('foo')); | 725 unittest.expect(o.output, unittest.equals('foo')); |
| 726 } | 726 } |
| 727 buildCounterUpdate--; | 727 buildCounterUpdate--; |
| 728 } | 728 } |
| 729 | 729 |
| 730 | 730 |
| 731 main() { | 731 main() { |
| 732 unittest.group("obj-schema-AnalyzeDataDescriptionFeaturesCategoricalValues", (
) { | 732 unittest.group("obj-schema-AnalyzeDataDescriptionFeaturesCategoricalValues", (
) { |
| 733 unittest.test("to-json--from-json", () { | 733 unittest.test("to-json--from-json", () { |
| 734 var o = buildAnalyzeDataDescriptionFeaturesCategoricalValues(); | 734 var o = buildAnalyzeDataDescriptionFeaturesCategoricalValues(); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 var arg_project = "foo"; | 927 var arg_project = "foo"; |
| 928 var arg_hostedModelName = "foo"; | 928 var arg_hostedModelName = "foo"; |
| 929 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 929 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 930 var obj = new api.Input.fromJson(json); | 930 var obj = new api.Input.fromJson(json); |
| 931 checkInput(obj); | 931 checkInput(obj); |
| 932 | 932 |
| 933 var path = (req.url).path; | 933 var path = (req.url).path; |
| 934 var pathOffset = 0; | 934 var pathOffset = 0; |
| 935 var index; | 935 var index; |
| 936 var subPart; | 936 var subPart; |
| 937 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/prediction/v1.6/projects/")); | 937 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 938 pathOffset += 26; | 938 pathOffset += 1; |
| 939 index = path.indexOf("/hostedmodels/", pathOffset); | |
| 940 unittest.expect(index >= 0, unittest.isTrue); | |
| 941 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 942 pathOffset = index; | |
| 943 unittest.expect(subPart, unittest.equals("$arg_project")); | |
| 944 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/hostedmodels/")); | |
| 945 pathOffset += 14; | |
| 946 index = path.indexOf("/predict", pathOffset); | |
| 947 unittest.expect(index >= 0, unittest.isTrue); | |
| 948 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 949 pathOffset = index; | |
| 950 unittest.expect(subPart, unittest.equals("$arg_hostedModelName")); | |
| 951 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/predict")); | |
| 952 pathOffset += 8; | |
| 953 | 939 |
| 954 var query = (req.url).query; | 940 var query = (req.url).query; |
| 955 var queryOffset = 0; | 941 var queryOffset = 0; |
| 956 var queryMap = {}; | 942 var queryMap = {}; |
| 957 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 943 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 958 parseBool(n) { | 944 parseBool(n) { |
| 959 if (n == "true") return true; | 945 if (n == "true") return true; |
| 960 if (n == "false") return false; | 946 if (n == "false") return false; |
| 961 if (n == null) return null; | 947 if (n == null) return null; |
| 962 throw new core.ArgumentError("Invalid boolean: $n"); | 948 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 988 | 974 |
| 989 var mock = new common_test.HttpServerMock(); | 975 var mock = new common_test.HttpServerMock(); |
| 990 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 976 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 991 var arg_project = "foo"; | 977 var arg_project = "foo"; |
| 992 var arg_id = "foo"; | 978 var arg_id = "foo"; |
| 993 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 979 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 994 var path = (req.url).path; | 980 var path = (req.url).path; |
| 995 var pathOffset = 0; | 981 var pathOffset = 0; |
| 996 var index; | 982 var index; |
| 997 var subPart; | 983 var subPart; |
| 998 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/prediction/v1.6/projects/")); | 984 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 999 pathOffset += 26; | 985 pathOffset += 1; |
| 1000 index = path.indexOf("/trainedmodels/", pathOffset); | |
| 1001 unittest.expect(index >= 0, unittest.isTrue); | |
| 1002 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1003 pathOffset = index; | |
| 1004 unittest.expect(subPart, unittest.equals("$arg_project")); | |
| 1005 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/trainedmodels/")); | |
| 1006 pathOffset += 15; | |
| 1007 index = path.indexOf("/analyze", pathOffset); | |
| 1008 unittest.expect(index >= 0, unittest.isTrue); | |
| 1009 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1010 pathOffset = index; | |
| 1011 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 1012 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/analyze")); | |
| 1013 pathOffset += 8; | |
| 1014 | 986 |
| 1015 var query = (req.url).query; | 987 var query = (req.url).query; |
| 1016 var queryOffset = 0; | 988 var queryOffset = 0; |
| 1017 var queryMap = {}; | 989 var queryMap = {}; |
| 1018 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 990 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1019 parseBool(n) { | 991 parseBool(n) { |
| 1020 if (n == "true") return true; | 992 if (n == "true") return true; |
| 1021 if (n == "false") return false; | 993 if (n == "false") return false; |
| 1022 if (n == null) return null; | 994 if (n == null) return null; |
| 1023 throw new core.ArgumentError("Invalid boolean: $n"); | 995 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1045 | 1017 |
| 1046 var mock = new common_test.HttpServerMock(); | 1018 var mock = new common_test.HttpServerMock(); |
| 1047 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1019 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1048 var arg_project = "foo"; | 1020 var arg_project = "foo"; |
| 1049 var arg_id = "foo"; | 1021 var arg_id = "foo"; |
| 1050 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1022 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1051 var path = (req.url).path; | 1023 var path = (req.url).path; |
| 1052 var pathOffset = 0; | 1024 var pathOffset = 0; |
| 1053 var index; | 1025 var index; |
| 1054 var subPart; | 1026 var subPart; |
| 1055 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/prediction/v1.6/projects/")); | 1027 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1056 pathOffset += 26; | 1028 pathOffset += 1; |
| 1057 index = path.indexOf("/trainedmodels/", pathOffset); | |
| 1058 unittest.expect(index >= 0, unittest.isTrue); | |
| 1059 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1060 pathOffset = index; | |
| 1061 unittest.expect(subPart, unittest.equals("$arg_project")); | |
| 1062 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/trainedmodels/")); | |
| 1063 pathOffset += 15; | |
| 1064 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 1065 pathOffset = path.length; | |
| 1066 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 1067 | 1029 |
| 1068 var query = (req.url).query; | 1030 var query = (req.url).query; |
| 1069 var queryOffset = 0; | 1031 var queryOffset = 0; |
| 1070 var queryMap = {}; | 1032 var queryMap = {}; |
| 1071 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1033 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1072 parseBool(n) { | 1034 parseBool(n) { |
| 1073 if (n == "true") return true; | 1035 if (n == "true") return true; |
| 1074 if (n == "false") return false; | 1036 if (n == "false") return false; |
| 1075 if (n == null) return null; | 1037 if (n == null) return null; |
| 1076 throw new core.ArgumentError("Invalid boolean: $n"); | 1038 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1096 | 1058 |
| 1097 var mock = new common_test.HttpServerMock(); | 1059 var mock = new common_test.HttpServerMock(); |
| 1098 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1060 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1099 var arg_project = "foo"; | 1061 var arg_project = "foo"; |
| 1100 var arg_id = "foo"; | 1062 var arg_id = "foo"; |
| 1101 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1063 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1102 var path = (req.url).path; | 1064 var path = (req.url).path; |
| 1103 var pathOffset = 0; | 1065 var pathOffset = 0; |
| 1104 var index; | 1066 var index; |
| 1105 var subPart; | 1067 var subPart; |
| 1106 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/prediction/v1.6/projects/")); | 1068 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1107 pathOffset += 26; | 1069 pathOffset += 1; |
| 1108 index = path.indexOf("/trainedmodels/", pathOffset); | |
| 1109 unittest.expect(index >= 0, unittest.isTrue); | |
| 1110 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1111 pathOffset = index; | |
| 1112 unittest.expect(subPart, unittest.equals("$arg_project")); | |
| 1113 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/trainedmodels/")); | |
| 1114 pathOffset += 15; | |
| 1115 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 1116 pathOffset = path.length; | |
| 1117 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 1118 | 1070 |
| 1119 var query = (req.url).query; | 1071 var query = (req.url).query; |
| 1120 var queryOffset = 0; | 1072 var queryOffset = 0; |
| 1121 var queryMap = {}; | 1073 var queryMap = {}; |
| 1122 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1074 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1123 parseBool(n) { | 1075 parseBool(n) { |
| 1124 if (n == "true") return true; | 1076 if (n == "true") return true; |
| 1125 if (n == "false") return false; | 1077 if (n == "false") return false; |
| 1126 if (n == null) return null; | 1078 if (n == null) return null; |
| 1127 throw new core.ArgumentError("Invalid boolean: $n"); | 1079 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1152 var arg_request = buildInsert(); | 1104 var arg_request = buildInsert(); |
| 1153 var arg_project = "foo"; | 1105 var arg_project = "foo"; |
| 1154 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1106 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1155 var obj = new api.Insert.fromJson(json); | 1107 var obj = new api.Insert.fromJson(json); |
| 1156 checkInsert(obj); | 1108 checkInsert(obj); |
| 1157 | 1109 |
| 1158 var path = (req.url).path; | 1110 var path = (req.url).path; |
| 1159 var pathOffset = 0; | 1111 var pathOffset = 0; |
| 1160 var index; | 1112 var index; |
| 1161 var subPart; | 1113 var subPart; |
| 1162 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/prediction/v1.6/projects/")); | 1114 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1163 pathOffset += 26; | 1115 pathOffset += 1; |
| 1164 index = path.indexOf("/trainedmodels", pathOffset); | |
| 1165 unittest.expect(index >= 0, unittest.isTrue); | |
| 1166 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1167 pathOffset = index; | |
| 1168 unittest.expect(subPart, unittest.equals("$arg_project")); | |
| 1169 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/trainedmodels")); | |
| 1170 pathOffset += 14; | |
| 1171 | 1116 |
| 1172 var query = (req.url).query; | 1117 var query = (req.url).query; |
| 1173 var queryOffset = 0; | 1118 var queryOffset = 0; |
| 1174 var queryMap = {}; | 1119 var queryMap = {}; |
| 1175 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1120 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1176 parseBool(n) { | 1121 parseBool(n) { |
| 1177 if (n == "true") return true; | 1122 if (n == "true") return true; |
| 1178 if (n == "false") return false; | 1123 if (n == "false") return false; |
| 1179 if (n == null) return null; | 1124 if (n == null) return null; |
| 1180 throw new core.ArgumentError("Invalid boolean: $n"); | 1125 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1203 var mock = new common_test.HttpServerMock(); | 1148 var mock = new common_test.HttpServerMock(); |
| 1204 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; | 1149 api.TrainedmodelsResourceApi res = new api.PredictionApi(mock).trainedmode
ls; |
| 1205 var arg_project = "foo"; | 1150 var arg_project = "foo"; |
| 1206 var arg_maxResults = 42; | 1151 var arg_maxResults = 42; |
| 1207 var arg_pageToken = "foo"; | 1152 var arg_pageToken = "foo"; |
| 1208 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1153 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1209 var path = (req.url).path; | 1154 var path = (req.url).path; |
| 1210 var pathOffset = 0; | 1155 var pathOffset = 0; |
| 1211 var index; | 1156 var index; |
| 1212 var subPart; | 1157 var subPart; |
| 1213 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/prediction/v1.6/projects/")); | 1158 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1214 pathOffset += 26; | 1159 pathOffset += 1; |
| 1215 index = path.indexOf("/trainedmodels/list", pathOffset); | |
| 1216 unittest.expect(index >= 0, unittest.isTrue); | |
| 1217 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1218 pathOffset = index; | |
| 1219 unittest.expect(subPart, unittest.equals("$arg_project")); | |
| 1220 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/trainedmodels/list")); | |
| 1221 pathOffset += 19; | |
| 1222 | 1160 |
| 1223 var query = (req.url).query; | 1161 var query = (req.url).query; |
| 1224 var queryOffset = 0; | 1162 var queryOffset = 0; |
| 1225 var queryMap = {}; | 1163 var queryMap = {}; |
| 1226 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1164 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1227 parseBool(n) { | 1165 parseBool(n) { |
| 1228 if (n == "true") return true; | 1166 if (n == "true") return true; |
| 1229 if (n == "false") return false; | 1167 if (n == "false") return false; |
| 1230 if (n == null) return null; | 1168 if (n == null) return null; |
| 1231 throw new core.ArgumentError("Invalid boolean: $n"); | 1169 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1259 var arg_project = "foo"; | 1197 var arg_project = "foo"; |
| 1260 var arg_id = "foo"; | 1198 var arg_id = "foo"; |
| 1261 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1199 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1262 var obj = new api.Input.fromJson(json); | 1200 var obj = new api.Input.fromJson(json); |
| 1263 checkInput(obj); | 1201 checkInput(obj); |
| 1264 | 1202 |
| 1265 var path = (req.url).path; | 1203 var path = (req.url).path; |
| 1266 var pathOffset = 0; | 1204 var pathOffset = 0; |
| 1267 var index; | 1205 var index; |
| 1268 var subPart; | 1206 var subPart; |
| 1269 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/prediction/v1.6/projects/")); | 1207 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1270 pathOffset += 26; | 1208 pathOffset += 1; |
| 1271 index = path.indexOf("/trainedmodels/", pathOffset); | |
| 1272 unittest.expect(index >= 0, unittest.isTrue); | |
| 1273 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1274 pathOffset = index; | |
| 1275 unittest.expect(subPart, unittest.equals("$arg_project")); | |
| 1276 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/trainedmodels/")); | |
| 1277 pathOffset += 15; | |
| 1278 index = path.indexOf("/predict", pathOffset); | |
| 1279 unittest.expect(index >= 0, unittest.isTrue); | |
| 1280 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1281 pathOffset = index; | |
| 1282 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 1283 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/predict")); | |
| 1284 pathOffset += 8; | |
| 1285 | 1209 |
| 1286 var query = (req.url).query; | 1210 var query = (req.url).query; |
| 1287 var queryOffset = 0; | 1211 var queryOffset = 0; |
| 1288 var queryMap = {}; | 1212 var queryMap = {}; |
| 1289 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1213 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1290 parseBool(n) { | 1214 parseBool(n) { |
| 1291 if (n == "true") return true; | 1215 if (n == "true") return true; |
| 1292 if (n == "false") return false; | 1216 if (n == "false") return false; |
| 1293 if (n == null) return null; | 1217 if (n == null) return null; |
| 1294 throw new core.ArgumentError("Invalid boolean: $n"); | 1218 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1320 var arg_project = "foo"; | 1244 var arg_project = "foo"; |
| 1321 var arg_id = "foo"; | 1245 var arg_id = "foo"; |
| 1322 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1246 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1323 var obj = new api.Update.fromJson(json); | 1247 var obj = new api.Update.fromJson(json); |
| 1324 checkUpdate(obj); | 1248 checkUpdate(obj); |
| 1325 | 1249 |
| 1326 var path = (req.url).path; | 1250 var path = (req.url).path; |
| 1327 var pathOffset = 0; | 1251 var pathOffset = 0; |
| 1328 var index; | 1252 var index; |
| 1329 var subPart; | 1253 var subPart; |
| 1330 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/prediction/v1.6/projects/")); | 1254 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1331 pathOffset += 26; | 1255 pathOffset += 1; |
| 1332 index = path.indexOf("/trainedmodels/", pathOffset); | |
| 1333 unittest.expect(index >= 0, unittest.isTrue); | |
| 1334 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1335 pathOffset = index; | |
| 1336 unittest.expect(subPart, unittest.equals("$arg_project")); | |
| 1337 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/trainedmodels/")); | |
| 1338 pathOffset += 15; | |
| 1339 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 1340 pathOffset = path.length; | |
| 1341 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 1342 | 1256 |
| 1343 var query = (req.url).query; | 1257 var query = (req.url).query; |
| 1344 var queryOffset = 0; | 1258 var queryOffset = 0; |
| 1345 var queryMap = {}; | 1259 var queryMap = {}; |
| 1346 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1260 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1347 parseBool(n) { | 1261 parseBool(n) { |
| 1348 if (n == "true") return true; | 1262 if (n == "true") return true; |
| 1349 if (n == "false") return false; | 1263 if (n == "false") return false; |
| 1350 if (n == null) return null; | 1264 if (n == null) return null; |
| 1351 throw new core.ArgumentError("Invalid boolean: $n"); | 1265 throw new core.ArgumentError("Invalid boolean: $n"); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1367 res.update(arg_request, arg_project, arg_id).then(unittest.expectAsync(((a
pi.Insert2 response) { | 1281 res.update(arg_request, arg_project, arg_id).then(unittest.expectAsync(((a
pi.Insert2 response) { |
| 1368 checkInsert2(response); | 1282 checkInsert2(response); |
| 1369 }))); | 1283 }))); |
| 1370 }); | 1284 }); |
| 1371 | 1285 |
| 1372 }); | 1286 }); |
| 1373 | 1287 |
| 1374 | 1288 |
| 1375 } | 1289 } |
| 1376 | 1290 |
| OLD | NEW |