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

Unified Diff: tests/lib/mirrors/mirrors_test.dart

Issue 13967003: EAKING CHANGE: Rename InstanceMIrror.invoke, .getField, .setField to invokeAsync, getFieldAsync, se… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/mirrors/mirrors.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/mirrors_test.dart
===================================================================
--- tests/lib/mirrors/mirrors_test.dart (revision 21177)
+++ tests/lib/mirrors/mirrors_test.dart (working copy)
@@ -25,22 +25,22 @@
var classMirror = libMirror.classes["Class"];
var instMirror = reflect(instance);
- libMirror.setField('topLevelField', 42);
- var future = libMirror.getField('topLevelField');
+ libMirror.setFieldAsync('topLevelField', 42);
+ var future = libMirror.getFieldAsync('topLevelField');
future.then(expectAsync1((resultMirror) {
expect(resultMirror.reflectee, equals(42));
expect(topLevelField, equals(42));
}));
- classMirror.setField('staticField', 43);
- future = classMirror.getField('staticField');
+ classMirror.setFieldAsync('staticField', 43);
+ future = classMirror.getFieldAsync('staticField');
future.then(expectAsync1((resultMirror) {
expect(resultMirror.reflectee, equals(43));
expect(Class.staticField, equals(43));
}));
- instMirror.setField('field', 44);
- future = instMirror.getField('field');
+ instMirror.setFieldAsync('field', 44);
+ future = instMirror.getFieldAsync('field');
future.then(expectAsync1((resultMirror) {
expect(resultMirror.reflectee, equals(44));
expect(instance.field, equals(44));
@@ -57,7 +57,7 @@
expect(funcMirror is MethodMirror, equals(true));
expect(funcMirror.parameters.length, equals(3));
- var future = mirror.apply([2, 4, 8]);
+ var future = mirror.applyAsync([2, 4, 8]);
future.then(expectAsync1((resultMirror) {
expect(resultMirror.reflectee, equals(14));
}));
@@ -67,14 +67,14 @@
var libMirror = mirrors.libraries["MirrorsTest"];
var classMirror = libMirror.classes["Class"];
- var future = classMirror.newInstance('', []);
+ var future = classMirror.newInstanceAsync('', []);
future.then(expectAsync1((resultMirror) {
var instance = resultMirror.reflectee;
expect(instance is Class, equals(true));
expect(instance.field, equals("default value"));
}));
- future = classMirror.newInstance('withInitialValue', [45]);
+ future = classMirror.newInstanceAsync('withInitialValue', [45]);
future.then(expectAsync1((resultMirror) {
var instance = resultMirror.reflectee;
expect(instance is Class, equals(true));
« no previous file with comments | « sdk/lib/mirrors/mirrors.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698