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

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

Issue 10917275: Update unittest to new package layout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « tests/json/json_test.dart ('k') | tools/testing/dart/browser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/mirrors_test.dart
diff --git a/tests/lib/mirrors/mirrors_test.dart b/tests/lib/mirrors/mirrors_test.dart
index 522e187738e7a19d3c4d016bc1b2c34dd0080bbf..a65c5b121278ce54765c70b9178b224b4f4bab0c 100644
--- a/tests/lib/mirrors/mirrors_test.dart
+++ b/tests/lib/mirrors/mirrors_test.dart
@@ -2,12 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// TODO(rmacnak): Move the existing mirror tests here (a place for
+// TODO(rmacnak): Move the existing mirror tests here (a place for
// cross-implementation tests).
#library("MirrorsTest.dart");
#import("dart:mirrors");
-#import("../../../pkg/unittest/unittest.dart");
+#import("../../../pkg/unittest/lib/unittest.dart");
var topLevelField;
@@ -29,30 +29,30 @@ testFieldAccess(mirrors) {
var future = libMirror.getField('topLevelField');
future.then(expectAsync1((resultMirror) {
expect(resultMirror.reflectee, equals(42));
- expect(topLevelField, equals(42));
+ expect(topLevelField, equals(42));
}));
-
+
classMirror.setField('staticField', 43);
future = classMirror.getField('staticField');
future.then(expectAsync1((resultMirror) {
expect(resultMirror.reflectee, equals(43));
- expect(Class.staticField, equals(43));
+ expect(Class.staticField, equals(43));
}));
instMirror.setField('field', 44);
future = instMirror.getField('field');
future.then(expectAsync1((resultMirror) {
expect(resultMirror.reflectee, equals(44));
- expect(instance.field, equals(44));
+ expect(instance.field, equals(44));
}));
}
testClosureMirrors(mirrors) {
var closure = (x, y, z) { return x + y + z; };
-
+
var mirror = reflect(closure);
expect(mirror is ClosureMirror, equals(true));
-
+
var funcMirror = mirror.function;
expect(funcMirror is MethodMirror, equals(true));
expect(funcMirror.parameters.length, equals(3));
@@ -66,7 +66,7 @@ testClosureMirrors(mirrors) {
testInvokeConstructor(mirrors) {
var libMirror = mirrors.libraries["MirrorsTest.dart"];
var classMirror = libMirror.classes["Class"];
-
+
var future = classMirror.newInstance('', []);
future.then(expectAsync1((resultMirror) {
var instance = resultMirror.reflectee;
« no previous file with comments | « tests/json/json_test.dart ('k') | tools/testing/dart/browser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698