Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: tests/lib_strong/mirrors/invocation_fuzz_test.dart

Issue 2779843004: Fix top-level inference errors for most of the newly failing tests. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/lib_strong/lib_strong.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 } 62 }
63 return false; 63 return false;
64 } 64 }
65 65
66 class Task { 66 class Task {
67 var name; 67 var name;
68 var action; 68 var action;
69 } 69 }
70 70
71 var queue = new List(); 71 var queue = new List<Task>();
72 72
73 checkMethod(MethodMirror m, ObjectMirror target, [origin]) { 73 checkMethod(MethodMirror m, ObjectMirror target, [origin]) {
74 if (isBlacklisted(m.qualifiedName)) return; 74 if (isBlacklisted(m.qualifiedName)) return;
75 75
76 var task = new Task(); 76 var task = new Task();
77 task.name = '${MirrorSystem.getName(m.qualifiedName)} from $origin'; 77 task.name = '${MirrorSystem.getName(m.qualifiedName)} from $origin';
78 78
79 if (m.isRegularMethod) { 79 if (m.isRegularMethod) {
80 task.action = () => target.invoke( 80 task.action = () => target.invoke(
81 m.simpleName, new List.filled(m.parameters.length, fuzzArgument)); 81 m.simpleName, new List.filled(m.parameters.length, fuzzArgument));
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 ]; 190 ];
191 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); 191 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object'));
192 192
193 uncaughtErrorHandler(self, parent, zone, error, stack) {} 193 uncaughtErrorHandler(self, parent, zone, error, stack) {}
194 ; 194 ;
195 var zoneSpec = 195 var zoneSpec =
196 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); 196 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler);
197 testZone = Zone.current.fork(specification: zoneSpec); 197 testZone = Zone.current.fork(specification: zoneSpec);
198 testZone.createTimer(Duration.ZERO, doOneTask); 198 testZone.createTimer(Duration.ZERO, doOneTask);
199 } 199 }
OLDNEW
« no previous file with comments | « tests/lib_strong/lib_strong.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698