| OLD | NEW |
| 1 library googleapis.script.v1.test; | 1 library googleapis.script.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 buildUnnamed806() { | 54 buildUnnamed781() { |
| 55 var o = new core.List<api.ScriptStackTraceElement>(); | 55 var o = new core.List<api.ScriptStackTraceElement>(); |
| 56 o.add(buildScriptStackTraceElement()); | 56 o.add(buildScriptStackTraceElement()); |
| 57 o.add(buildScriptStackTraceElement()); | 57 o.add(buildScriptStackTraceElement()); |
| 58 return o; | 58 return o; |
| 59 } | 59 } |
| 60 | 60 |
| 61 checkUnnamed806(core.List<api.ScriptStackTraceElement> o) { | 61 checkUnnamed781(core.List<api.ScriptStackTraceElement> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkScriptStackTraceElement(o[0]); | 63 checkScriptStackTraceElement(o[0]); |
| 64 checkScriptStackTraceElement(o[1]); | 64 checkScriptStackTraceElement(o[1]); |
| 65 } | 65 } |
| 66 | 66 |
| 67 core.int buildCounterExecutionError = 0; | 67 core.int buildCounterExecutionError = 0; |
| 68 buildExecutionError() { | 68 buildExecutionError() { |
| 69 var o = new api.ExecutionError(); | 69 var o = new api.ExecutionError(); |
| 70 buildCounterExecutionError++; | 70 buildCounterExecutionError++; |
| 71 if (buildCounterExecutionError < 3) { | 71 if (buildCounterExecutionError < 3) { |
| 72 o.errorMessage = "foo"; | 72 o.errorMessage = "foo"; |
| 73 o.errorType = "foo"; | 73 o.errorType = "foo"; |
| 74 o.scriptStackTraceElements = buildUnnamed806(); | 74 o.scriptStackTraceElements = buildUnnamed781(); |
| 75 } | 75 } |
| 76 buildCounterExecutionError--; | 76 buildCounterExecutionError--; |
| 77 return o; | 77 return o; |
| 78 } | 78 } |
| 79 | 79 |
| 80 checkExecutionError(api.ExecutionError o) { | 80 checkExecutionError(api.ExecutionError o) { |
| 81 buildCounterExecutionError++; | 81 buildCounterExecutionError++; |
| 82 if (buildCounterExecutionError < 3) { | 82 if (buildCounterExecutionError < 3) { |
| 83 unittest.expect(o.errorMessage, unittest.equals('foo')); | 83 unittest.expect(o.errorMessage, unittest.equals('foo')); |
| 84 unittest.expect(o.errorType, unittest.equals('foo')); | 84 unittest.expect(o.errorType, unittest.equals('foo')); |
| 85 checkUnnamed806(o.scriptStackTraceElements); | 85 checkUnnamed781(o.scriptStackTraceElements); |
| 86 } | 86 } |
| 87 buildCounterExecutionError--; | 87 buildCounterExecutionError--; |
| 88 } | 88 } |
| 89 | 89 |
| 90 buildUnnamed807() { | 90 buildUnnamed782() { |
| 91 var o = new core.List<core.Object>(); | 91 var o = new core.List<core.Object>(); |
| 92 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 92 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 93 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 93 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 94 return o; | 94 return o; |
| 95 } | 95 } |
| 96 | 96 |
| 97 checkUnnamed807(core.List<core.Object> o) { | 97 checkUnnamed782(core.List<core.Object> o) { |
| 98 unittest.expect(o, unittest.hasLength(2)); | 98 unittest.expect(o, unittest.hasLength(2)); |
| 99 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')); | 99 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')); |
| 100 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')); | 100 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')); |
| 101 } | 101 } |
| 102 | 102 |
| 103 core.int buildCounterExecutionRequest = 0; | 103 core.int buildCounterExecutionRequest = 0; |
| 104 buildExecutionRequest() { | 104 buildExecutionRequest() { |
| 105 var o = new api.ExecutionRequest(); | 105 var o = new api.ExecutionRequest(); |
| 106 buildCounterExecutionRequest++; | 106 buildCounterExecutionRequest++; |
| 107 if (buildCounterExecutionRequest < 3) { | 107 if (buildCounterExecutionRequest < 3) { |
| 108 o.devMode = true; | 108 o.devMode = true; |
| 109 o.function = "foo"; | 109 o.function = "foo"; |
| 110 o.parameters = buildUnnamed807(); | 110 o.parameters = buildUnnamed782(); |
| 111 o.sessionState = "foo"; | 111 o.sessionState = "foo"; |
| 112 } | 112 } |
| 113 buildCounterExecutionRequest--; | 113 buildCounterExecutionRequest--; |
| 114 return o; | 114 return o; |
| 115 } | 115 } |
| 116 | 116 |
| 117 checkExecutionRequest(api.ExecutionRequest o) { | 117 checkExecutionRequest(api.ExecutionRequest o) { |
| 118 buildCounterExecutionRequest++; | 118 buildCounterExecutionRequest++; |
| 119 if (buildCounterExecutionRequest < 3) { | 119 if (buildCounterExecutionRequest < 3) { |
| 120 unittest.expect(o.devMode, unittest.isTrue); | 120 unittest.expect(o.devMode, unittest.isTrue); |
| 121 unittest.expect(o.function, unittest.equals('foo')); | 121 unittest.expect(o.function, unittest.equals('foo')); |
| 122 checkUnnamed807(o.parameters); | 122 checkUnnamed782(o.parameters); |
| 123 unittest.expect(o.sessionState, unittest.equals('foo')); | 123 unittest.expect(o.sessionState, unittest.equals('foo')); |
| 124 } | 124 } |
| 125 buildCounterExecutionRequest--; | 125 buildCounterExecutionRequest--; |
| 126 } | 126 } |
| 127 | 127 |
| 128 core.int buildCounterExecutionResponse = 0; | 128 core.int buildCounterExecutionResponse = 0; |
| 129 buildExecutionResponse() { | 129 buildExecutionResponse() { |
| 130 var o = new api.ExecutionResponse(); | 130 var o = new api.ExecutionResponse(); |
| 131 buildCounterExecutionResponse++; | 131 buildCounterExecutionResponse++; |
| 132 if (buildCounterExecutionResponse < 3) { | 132 if (buildCounterExecutionResponse < 3) { |
| 133 o.result = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 133 o.result = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 134 } | 134 } |
| 135 buildCounterExecutionResponse--; | 135 buildCounterExecutionResponse--; |
| 136 return o; | 136 return o; |
| 137 } | 137 } |
| 138 | 138 |
| 139 checkExecutionResponse(api.ExecutionResponse o) { | 139 checkExecutionResponse(api.ExecutionResponse o) { |
| 140 buildCounterExecutionResponse++; | 140 buildCounterExecutionResponse++; |
| 141 if (buildCounterExecutionResponse < 3) { | 141 if (buildCounterExecutionResponse < 3) { |
| 142 var casted3 = (o.result) as core.Map; unittest.expect(casted3, unittest.hasL
ength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittes
t.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["strin
g"], unittest.equals('foo')); | 142 var casted3 = (o.result) as core.Map; unittest.expect(casted3, unittest.hasL
ength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittes
t.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["strin
g"], unittest.equals('foo')); |
| 143 } | 143 } |
| 144 buildCounterExecutionResponse--; | 144 buildCounterExecutionResponse--; |
| 145 } | 145 } |
| 146 | 146 |
| 147 buildUnnamed808() { | 147 buildUnnamed783() { |
| 148 var o = new core.List<core.String>(); | 148 var o = new core.List<core.String>(); |
| 149 o.add("foo"); | 149 o.add("foo"); |
| 150 o.add("foo"); | 150 o.add("foo"); |
| 151 return o; | 151 return o; |
| 152 } | 152 } |
| 153 | 153 |
| 154 checkUnnamed808(core.List<core.String> o) { | 154 checkUnnamed783(core.List<core.String> o) { |
| 155 unittest.expect(o, unittest.hasLength(2)); | 155 unittest.expect(o, unittest.hasLength(2)); |
| 156 unittest.expect(o[0], unittest.equals('foo')); | 156 unittest.expect(o[0], unittest.equals('foo')); |
| 157 unittest.expect(o[1], unittest.equals('foo')); | 157 unittest.expect(o[1], unittest.equals('foo')); |
| 158 } | 158 } |
| 159 | 159 |
| 160 core.int buildCounterJoinAsyncRequest = 0; | 160 core.int buildCounterJoinAsyncRequest = 0; |
| 161 buildJoinAsyncRequest() { | 161 buildJoinAsyncRequest() { |
| 162 var o = new api.JoinAsyncRequest(); | 162 var o = new api.JoinAsyncRequest(); |
| 163 buildCounterJoinAsyncRequest++; | 163 buildCounterJoinAsyncRequest++; |
| 164 if (buildCounterJoinAsyncRequest < 3) { | 164 if (buildCounterJoinAsyncRequest < 3) { |
| 165 o.names = buildUnnamed808(); | 165 o.names = buildUnnamed783(); |
| 166 o.scriptId = "foo"; | 166 o.scriptId = "foo"; |
| 167 o.timeout = "foo"; | 167 o.timeout = "foo"; |
| 168 } | 168 } |
| 169 buildCounterJoinAsyncRequest--; | 169 buildCounterJoinAsyncRequest--; |
| 170 return o; | 170 return o; |
| 171 } | 171 } |
| 172 | 172 |
| 173 checkJoinAsyncRequest(api.JoinAsyncRequest o) { | 173 checkJoinAsyncRequest(api.JoinAsyncRequest o) { |
| 174 buildCounterJoinAsyncRequest++; | 174 buildCounterJoinAsyncRequest++; |
| 175 if (buildCounterJoinAsyncRequest < 3) { | 175 if (buildCounterJoinAsyncRequest < 3) { |
| 176 checkUnnamed808(o.names); | 176 checkUnnamed783(o.names); |
| 177 unittest.expect(o.scriptId, unittest.equals('foo')); | 177 unittest.expect(o.scriptId, unittest.equals('foo')); |
| 178 unittest.expect(o.timeout, unittest.equals('foo')); | 178 unittest.expect(o.timeout, unittest.equals('foo')); |
| 179 } | 179 } |
| 180 buildCounterJoinAsyncRequest--; | 180 buildCounterJoinAsyncRequest--; |
| 181 } | 181 } |
| 182 | 182 |
| 183 buildUnnamed809() { | 183 buildUnnamed784() { |
| 184 var o = new core.Map<core.String, api.Operation>(); | 184 var o = new core.Map<core.String, api.Operation>(); |
| 185 o["x"] = buildOperation(); | 185 o["x"] = buildOperation(); |
| 186 o["y"] = buildOperation(); | 186 o["y"] = buildOperation(); |
| 187 return o; | 187 return o; |
| 188 } | 188 } |
| 189 | 189 |
| 190 checkUnnamed809(core.Map<core.String, api.Operation> o) { | 190 checkUnnamed784(core.Map<core.String, api.Operation> o) { |
| 191 unittest.expect(o, unittest.hasLength(2)); | 191 unittest.expect(o, unittest.hasLength(2)); |
| 192 checkOperation(o["x"]); | 192 checkOperation(o["x"]); |
| 193 checkOperation(o["y"]); | 193 checkOperation(o["y"]); |
| 194 } | 194 } |
| 195 | 195 |
| 196 core.int buildCounterJoinAsyncResponse = 0; | 196 core.int buildCounterJoinAsyncResponse = 0; |
| 197 buildJoinAsyncResponse() { | 197 buildJoinAsyncResponse() { |
| 198 var o = new api.JoinAsyncResponse(); | 198 var o = new api.JoinAsyncResponse(); |
| 199 buildCounterJoinAsyncResponse++; | 199 buildCounterJoinAsyncResponse++; |
| 200 if (buildCounterJoinAsyncResponse < 3) { | 200 if (buildCounterJoinAsyncResponse < 3) { |
| 201 o.results = buildUnnamed809(); | 201 o.results = buildUnnamed784(); |
| 202 } | 202 } |
| 203 buildCounterJoinAsyncResponse--; | 203 buildCounterJoinAsyncResponse--; |
| 204 return o; | 204 return o; |
| 205 } | 205 } |
| 206 | 206 |
| 207 checkJoinAsyncResponse(api.JoinAsyncResponse o) { | 207 checkJoinAsyncResponse(api.JoinAsyncResponse o) { |
| 208 buildCounterJoinAsyncResponse++; | 208 buildCounterJoinAsyncResponse++; |
| 209 if (buildCounterJoinAsyncResponse < 3) { | 209 if (buildCounterJoinAsyncResponse < 3) { |
| 210 checkUnnamed809(o.results); | 210 checkUnnamed784(o.results); |
| 211 } | 211 } |
| 212 buildCounterJoinAsyncResponse--; | 212 buildCounterJoinAsyncResponse--; |
| 213 } | 213 } |
| 214 | 214 |
| 215 buildUnnamed810() { | 215 buildUnnamed785() { |
| 216 var o = new core.Map<core.String, core.Object>(); | 216 var o = new core.Map<core.String, core.Object>(); |
| 217 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 217 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 218 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 218 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 219 return o; | 219 return o; |
| 220 } | 220 } |
| 221 | 221 |
| 222 checkUnnamed810(core.Map<core.String, core.Object> o) { | 222 checkUnnamed785(core.Map<core.String, core.Object> o) { |
| 223 unittest.expect(o, unittest.hasLength(2)); | 223 unittest.expect(o, unittest.hasLength(2)); |
| 224 var casted4 = (o["x"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 224 var casted4 = (o["x"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
| 225 var casted5 = (o["y"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 225 var casted5 = (o["y"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
| 226 } | 226 } |
| 227 | 227 |
| 228 buildUnnamed811() { | 228 buildUnnamed786() { |
| 229 var o = new core.Map<core.String, core.Object>(); | 229 var o = new core.Map<core.String, core.Object>(); |
| 230 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 230 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 231 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 231 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 232 return o; | 232 return o; |
| 233 } | 233 } |
| 234 | 234 |
| 235 checkUnnamed811(core.Map<core.String, core.Object> o) { | 235 checkUnnamed786(core.Map<core.String, core.Object> o) { |
| 236 unittest.expect(o, unittest.hasLength(2)); | 236 unittest.expect(o, unittest.hasLength(2)); |
| 237 var casted6 = (o["x"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 237 var casted6 = (o["x"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
| 238 var casted7 = (o["y"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); | 238 var casted7 = (o["y"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); |
| 239 } | 239 } |
| 240 | 240 |
| 241 core.int buildCounterOperation = 0; | 241 core.int buildCounterOperation = 0; |
| 242 buildOperation() { | 242 buildOperation() { |
| 243 var o = new api.Operation(); | 243 var o = new api.Operation(); |
| 244 buildCounterOperation++; | 244 buildCounterOperation++; |
| 245 if (buildCounterOperation < 3) { | 245 if (buildCounterOperation < 3) { |
| 246 o.done = true; | 246 o.done = true; |
| 247 o.error = buildStatus(); | 247 o.error = buildStatus(); |
| 248 o.metadata = buildUnnamed810(); | 248 o.metadata = buildUnnamed785(); |
| 249 o.name = "foo"; | 249 o.name = "foo"; |
| 250 o.response = buildUnnamed811(); | 250 o.response = buildUnnamed786(); |
| 251 } | 251 } |
| 252 buildCounterOperation--; | 252 buildCounterOperation--; |
| 253 return o; | 253 return o; |
| 254 } | 254 } |
| 255 | 255 |
| 256 checkOperation(api.Operation o) { | 256 checkOperation(api.Operation o) { |
| 257 buildCounterOperation++; | 257 buildCounterOperation++; |
| 258 if (buildCounterOperation < 3) { | 258 if (buildCounterOperation < 3) { |
| 259 unittest.expect(o.done, unittest.isTrue); | 259 unittest.expect(o.done, unittest.isTrue); |
| 260 checkStatus(o.error); | 260 checkStatus(o.error); |
| 261 checkUnnamed810(o.metadata); | 261 checkUnnamed785(o.metadata); |
| 262 unittest.expect(o.name, unittest.equals('foo')); | 262 unittest.expect(o.name, unittest.equals('foo')); |
| 263 checkUnnamed811(o.response); | 263 checkUnnamed786(o.response); |
| 264 } | 264 } |
| 265 buildCounterOperation--; | 265 buildCounterOperation--; |
| 266 } | 266 } |
| 267 | 267 |
| 268 core.int buildCounterScriptStackTraceElement = 0; | 268 core.int buildCounterScriptStackTraceElement = 0; |
| 269 buildScriptStackTraceElement() { | 269 buildScriptStackTraceElement() { |
| 270 var o = new api.ScriptStackTraceElement(); | 270 var o = new api.ScriptStackTraceElement(); |
| 271 buildCounterScriptStackTraceElement++; | 271 buildCounterScriptStackTraceElement++; |
| 272 if (buildCounterScriptStackTraceElement < 3) { | 272 if (buildCounterScriptStackTraceElement < 3) { |
| 273 o.function = "foo"; | 273 o.function = "foo"; |
| 274 o.lineNumber = 42; | 274 o.lineNumber = 42; |
| 275 } | 275 } |
| 276 buildCounterScriptStackTraceElement--; | 276 buildCounterScriptStackTraceElement--; |
| 277 return o; | 277 return o; |
| 278 } | 278 } |
| 279 | 279 |
| 280 checkScriptStackTraceElement(api.ScriptStackTraceElement o) { | 280 checkScriptStackTraceElement(api.ScriptStackTraceElement o) { |
| 281 buildCounterScriptStackTraceElement++; | 281 buildCounterScriptStackTraceElement++; |
| 282 if (buildCounterScriptStackTraceElement < 3) { | 282 if (buildCounterScriptStackTraceElement < 3) { |
| 283 unittest.expect(o.function, unittest.equals('foo')); | 283 unittest.expect(o.function, unittest.equals('foo')); |
| 284 unittest.expect(o.lineNumber, unittest.equals(42)); | 284 unittest.expect(o.lineNumber, unittest.equals(42)); |
| 285 } | 285 } |
| 286 buildCounterScriptStackTraceElement--; | 286 buildCounterScriptStackTraceElement--; |
| 287 } | 287 } |
| 288 | 288 |
| 289 buildUnnamed812() { | 289 buildUnnamed787() { |
| 290 var o = new core.Map<core.String, core.Object>(); | 290 var o = new core.Map<core.String, core.Object>(); |
| 291 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 291 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 292 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 292 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 293 return o; | 293 return o; |
| 294 } | 294 } |
| 295 | 295 |
| 296 checkUnnamed812(core.Map<core.String, core.Object> o) { | 296 checkUnnamed787(core.Map<core.String, core.Object> o) { |
| 297 unittest.expect(o, unittest.hasLength(2)); | 297 unittest.expect(o, unittest.hasLength(2)); |
| 298 var casted8 = (o["x"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); | 298 var casted8 = (o["x"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); |
| 299 var casted9 = (o["y"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); | 299 var casted9 = (o["y"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); |
| 300 } | 300 } |
| 301 | 301 |
| 302 buildUnnamed813() { | 302 buildUnnamed788() { |
| 303 var o = new core.List<core.Map<core.String, core.Object>>(); | 303 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 304 o.add(buildUnnamed812()); | 304 o.add(buildUnnamed787()); |
| 305 o.add(buildUnnamed812()); | 305 o.add(buildUnnamed787()); |
| 306 return o; | 306 return o; |
| 307 } | 307 } |
| 308 | 308 |
| 309 checkUnnamed813(core.List<core.Map<core.String, core.Object>> o) { | 309 checkUnnamed788(core.List<core.Map<core.String, core.Object>> o) { |
| 310 unittest.expect(o, unittest.hasLength(2)); | 310 unittest.expect(o, unittest.hasLength(2)); |
| 311 checkUnnamed812(o[0]); | 311 checkUnnamed787(o[0]); |
| 312 checkUnnamed812(o[1]); | 312 checkUnnamed787(o[1]); |
| 313 } | 313 } |
| 314 | 314 |
| 315 core.int buildCounterStatus = 0; | 315 core.int buildCounterStatus = 0; |
| 316 buildStatus() { | 316 buildStatus() { |
| 317 var o = new api.Status(); | 317 var o = new api.Status(); |
| 318 buildCounterStatus++; | 318 buildCounterStatus++; |
| 319 if (buildCounterStatus < 3) { | 319 if (buildCounterStatus < 3) { |
| 320 o.code = 42; | 320 o.code = 42; |
| 321 o.details = buildUnnamed813(); | 321 o.details = buildUnnamed788(); |
| 322 o.message = "foo"; | 322 o.message = "foo"; |
| 323 } | 323 } |
| 324 buildCounterStatus--; | 324 buildCounterStatus--; |
| 325 return o; | 325 return o; |
| 326 } | 326 } |
| 327 | 327 |
| 328 checkStatus(api.Status o) { | 328 checkStatus(api.Status o) { |
| 329 buildCounterStatus++; | 329 buildCounterStatus++; |
| 330 if (buildCounterStatus < 3) { | 330 if (buildCounterStatus < 3) { |
| 331 unittest.expect(o.code, unittest.equals(42)); | 331 unittest.expect(o.code, unittest.equals(42)); |
| 332 checkUnnamed813(o.details); | 332 checkUnnamed788(o.details); |
| 333 unittest.expect(o.message, unittest.equals('foo')); | 333 unittest.expect(o.message, unittest.equals('foo')); |
| 334 } | 334 } |
| 335 buildCounterStatus--; | 335 buildCounterStatus--; |
| 336 } | 336 } |
| 337 | 337 |
| 338 | 338 |
| 339 main() { | 339 main() { |
| 340 unittest.group("obj-schema-ExecutionError", () { | 340 unittest.group("obj-schema-ExecutionError", () { |
| 341 unittest.test("to-json--from-json", () { | 341 unittest.test("to-json--from-json", () { |
| 342 var o = buildExecutionError(); | 342 var o = buildExecutionError(); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 res.run(arg_request, arg_scriptId).then(unittest.expectAsync1(((api.Operat
ion response) { | 463 res.run(arg_request, arg_scriptId).then(unittest.expectAsync1(((api.Operat
ion response) { |
| 464 checkOperation(response); | 464 checkOperation(response); |
| 465 }))); | 465 }))); |
| 466 }); | 466 }); |
| 467 | 467 |
| 468 }); | 468 }); |
| 469 | 469 |
| 470 | 470 |
| 471 } | 471 } |
| 472 | 472 |
| OLD | NEW |