| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This test reflectively enumerates all the methods in the system and tries to | 5 // This test reflectively enumerates all the methods in the system and tries to |
| 6 // invoke them with various basic values (nulls, ints, etc). This may result in | 6 // invoke them with various basic values (nulls, ints, etc). This may result in |
| 7 // Dart exceptions or hangs, but should never result in crashes or JavaScript | 7 // Dart exceptions or hangs, but should never result in crashes or JavaScript |
| 8 // exceptions. | 8 // exceptions. |
| 9 | 9 |
| 10 library test.invoke_natives; | 10 library test.invoke_natives; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Don't change the exit code, which may fool the test harness. | 26 // Don't change the exit code, which may fool the test harness. |
| 27 'dart.io.exitCode', | 27 'dart.io.exitCode', |
| 28 | 28 |
| 29 // Don't run blocking io calls. | 29 // Don't run blocking io calls. |
| 30 new RegExp(r".*Sync$"), | 30 new RegExp(r".*Sync$"), |
| 31 | 31 |
| 32 // These prevent the test from exiting. | 32 // These prevent the test from exiting. |
| 33 'dart.io.sleep', | 33 'dart.io.sleep', |
| 34 'dart.io.HttpServer.HttpServer.listenOn', | 34 'dart.io.HttpServer.HttpServer.listenOn', |
| 35 new RegExp('dart\.io.*'), /// smi: ok | 35 new RegExp('dart\.io\..*'), /// smi: ok |
| 36 new RegExp('dart\.io\._Timer\..*'), |
| 37 new RegExp('dart\.isolate\..*'), |
| 36 | 38 |
| 37 // Runtime exceptions we can't catch because they occur too early in event | 39 // Runtime exceptions we can't catch because they occur too early in event |
| 38 // dispatch to be caught in a zone. | 40 // dispatch to be caught in a zone. |
| 39 'dart.io._Timer._createTimer', /// smi: ok | 41 'dart.io._Timer._createTimer', /// smi: ok |
| 40 'dart.async.runZoned', /// string: ok | 42 'dart.async.runZoned', /// string: ok |
| 41 'dart.async._ScheduleImmediate._closure', | 43 'dart.async._ScheduleImmediate._closure', |
| 42 | 44 |
| 43 // These either cause the VM to segfault or throw uncatchable API errors. | 45 // These either cause the VM to segfault or throw uncatchable API errors. |
| 44 // TODO(15274): Fix them and remove from blacklist. | 46 // TODO(15274): Fix them and remove from blacklist. |
| 45 'dart.io._IOService.dispatch', | 47 'dart.io._IOService.dispatch', |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 fuzzArgument = 'string'; /// string: ok | 171 fuzzArgument = 'string'; /// string: ok |
| 170 fuzzArgument = new List(0); /// emptyarray: ok | 172 fuzzArgument = new List(0); /// emptyarray: ok |
| 171 | 173 |
| 172 print('Fuzzing with $fuzzArgument'); | 174 print('Fuzzing with $fuzzArgument'); |
| 173 | 175 |
| 174 currentMirrorSystem().libraries.values.forEach(checkLibrary); | 176 currentMirrorSystem().libraries.values.forEach(checkLibrary); |
| 175 | 177 |
| 176 var valueObjects = | 178 var valueObjects = |
| 177 [true, false, null, [], {}, dynamic, | 179 [true, false, null, [], {}, dynamic, |
| 178 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 3.14159, | 180 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 3.14159, |
| 179 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ', "𝄞", #symbol]; | 181 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ', "\u{1D11E}", #symbol]; |
| 180 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); | 182 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); |
| 181 | 183 |
| 182 uncaughtErrorHandler(self, parent, zone, error, stack) {}; | 184 uncaughtErrorHandler(self, parent, zone, error, stack) {}; |
| 183 var zoneSpec = | 185 var zoneSpec = |
| 184 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); | 186 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); |
| 185 testZone = Zone.current.fork(specification: zoneSpec); | 187 testZone = Zone.current.fork(specification: zoneSpec); |
| 186 testZone.createTimer(Duration.ZERO, doOneTask); | 188 testZone.createTimer(Duration.ZERO, doOneTask); |
| 187 } | 189 } |
| OLD | NEW |