| 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 will various basic values (nulls, ints, etc). This may result in | 6 // invoke them will 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 27 matching lines...) Expand all Loading... |
| 38 'dart.async._ScheduleImmediate._closure', | 38 'dart.async._ScheduleImmediate._closure', |
| 39 | 39 |
| 40 // These either cause the VM to segfault or throw uncatchable API errors. | 40 // These either cause the VM to segfault or throw uncatchable API errors. |
| 41 // TODO(15274): Fix them and remove from blacklist. | 41 // TODO(15274): Fix them and remove from blacklist. |
| 42 'dart.io._IOService.dispatch', | 42 'dart.io._IOService.dispatch', |
| 43 'dart.io._StdIOUtils._socketType', | 43 'dart.io._StdIOUtils._socketType', |
| 44 'dart.io._StdIOUtils._getStdioOutputStream', | 44 'dart.io._StdIOUtils._getStdioOutputStream', |
| 45 'dart.io._Filter.newZLibInflateFilter', | 45 'dart.io._Filter.newZLibInflateFilter', |
| 46 'dart.io._Filter.newZLibDeflateFilter', | 46 'dart.io._Filter.newZLibDeflateFilter', |
| 47 'dart.io._FileSystemWatcher._listenOnSocket', | 47 'dart.io._FileSystemWatcher._listenOnSocket', |
| 48 'dart.io.SystemEncoding.decode', // Windows only |
| 49 'dart.io.SystemEncoding.encode', // Windows only |
| 48 ]; | 50 ]; |
| 49 | 51 |
| 50 bool isBlacklisted(Symbol qualifiedSymbol) { | 52 bool isBlacklisted(Symbol qualifiedSymbol) { |
| 51 var qualifiedString = MirrorSystem.getName(qualifiedSymbol); | 53 var qualifiedString = MirrorSystem.getName(qualifiedSymbol); |
| 52 for (var pattern in blacklist) { | 54 for (var pattern in blacklist) { |
| 53 if (qualifiedString.contains(pattern)) { | 55 if (qualifiedString.contains(pattern)) { |
| 54 print('Skipping $qualifiedString'); | 56 print('Skipping $qualifiedString'); |
| 55 return true; | 57 return true; |
| 56 } | 58 } |
| 57 } | 59 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 3.14159, | 175 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 3.14159, |
| 174 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ', "𝄞", #symbol]; | 176 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ', "𝄞", #symbol]; |
| 175 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); | 177 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); |
| 176 | 178 |
| 177 uncaughtErrorHandler(self, parent, zone, error, stack) {}; | 179 uncaughtErrorHandler(self, parent, zone, error, stack) {}; |
| 178 var zoneSpec = | 180 var zoneSpec = |
| 179 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); | 181 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); |
| 180 testZone = Zone.current.fork(specification: zoneSpec); | 182 testZone = Zone.current.fork(specification: zoneSpec); |
| 181 testZone.createTimer(Duration.ZERO, doOneTask); | 183 testZone.createTimer(Duration.ZERO, doOneTask); |
| 182 } | 184 } |
| OLD | NEW |