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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // Runtime exceptions we can't catch because they occur too early in event | 36 // Runtime exceptions we can't catch because they occur too early in event |
37 // dispatch to be caught in a zone. | 37 // dispatch to be caught in a zone. |
38 'dart.io._Timer._createTimer', /// smi: ok | 38 'dart.io._Timer._createTimer', /// smi: ok |
39 'dart.async.runZoned', /// string: ok | 39 'dart.async.runZoned', /// string: ok |
40 'dart.async._ScheduleImmediate._closure', | 40 'dart.async._ScheduleImmediate._closure', |
41 | 41 |
42 // These either cause the VM to segfault or throw uncatchable API errors. | 42 // These either cause the VM to segfault or throw uncatchable API errors. |
43 // TODO(15274): Fix them and remove from blacklist. | 43 // TODO(15274): Fix them and remove from blacklist. |
44 'dart.io._IOService.dispatch', | 44 'dart.io._IOService.dispatch', |
| 45 'dart.io._IOService._initialize', |
| 46 'dart.io._IOService._finalize', |
45 'dart.io._StdIOUtils._socketType', | 47 'dart.io._StdIOUtils._socketType', |
46 'dart.io._StdIOUtils._getStdioOutputStream', | 48 'dart.io._StdIOUtils._getStdioOutputStream', |
47 'dart.io._Filter.newZLibInflateFilter', | 49 'dart.io._Filter.newZLibInflateFilter', |
48 'dart.io._Filter.newZLibDeflateFilter', | 50 'dart.io._Filter.newZLibDeflateFilter', |
49 'dart.io._FileSystemWatcher._listenOnSocket', | 51 'dart.io._FileSystemWatcher._listenOnSocket', |
50 'dart.io.SystemEncoding.decode', // Windows only | 52 'dart.io.SystemEncoding.decode', // Windows only |
51 'dart.io.SystemEncoding.encode', // Windows only | 53 'dart.io.SystemEncoding.encode', // Windows only |
52 ]; | 54 ]; |
53 | 55 |
54 bool isBlacklisted(Symbol qualifiedSymbol) { | 56 bool isBlacklisted(Symbol qualifiedSymbol) { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 3.14159, | 179 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 3.14159, |
178 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ', "\u{1D11E}", #symbol]; | 180 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ', "\u{1D11E}", #symbol]; |
179 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); | 181 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); |
180 | 182 |
181 uncaughtErrorHandler(self, parent, zone, error, stack) {}; | 183 uncaughtErrorHandler(self, parent, zone, error, stack) {}; |
182 var zoneSpec = | 184 var zoneSpec = |
183 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); | 185 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); |
184 testZone = Zone.current.fork(specification: zoneSpec); | 186 testZone = Zone.current.fork(specification: zoneSpec); |
185 testZone.createTimer(Duration.ZERO, doOneTask); | 187 testZone.createTimer(Duration.ZERO, doOneTask); |
186 } | 188 } |
OLD | NEW |