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

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

Issue 19676002: Implement top-level getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
Index: dart/tests/lib/mirrors/mirrors_test.dart
diff --git a/dart/tests/lib/mirrors/mirrors_test.dart b/dart/tests/lib/mirrors/mirrors_test.dart
index bf108ce1fb1201ebc29d41e658365f205b5787b7..b2bca5847bc6c626368956e2bffc7edd6b402a64 100644
--- a/dart/tests/lib/mirrors/mirrors_test.dart
+++ b/dart/tests/lib/mirrors/mirrors_test.dart
@@ -3,11 +3,12 @@
// BSD-style license that can be found in the LICENSE file.
library MirrorsTest;
-import "dart:mirrors";
-import "../../../pkg/unittest/lib/unittest.dart";
+
+import 'dart:mirrors';
+
+import '../../light_unittest.dart';
ahe 2013/07/21 15:43:20 pkg/unittest has started using mirrors. That make
bool isDart2js = false; // TODO(ahe): Remove this field.
-bool isMinified = false; // TODO(ahe): Remove this field.
var topLevelField;
u(a, b, c) => {"a": a, "b": b, "c": c};
@@ -121,19 +122,17 @@ testFieldAccess(mirrors) {
expect(fieldMirror is VariableMirror, isTrue);
expect(fieldMirror.type, equals(mirrors.dynamicType));
- if (!isMinified) {
- libMirror.setField(const Symbol('topLevelField'), [91]);
- expect(libMirror.getField(const Symbol('topLevelField')).reflectee,
- equals([91]));
- expect(topLevelField, equals([91]));
-
- libMirror.setFieldAsync(const Symbol('topLevelField'), 42);
- future = libMirror.getFieldAsync(const Symbol('topLevelField'));
- future.then(expectAsync1((resultMirror) {
- expect(resultMirror.reflectee, equals(42));
- expect(topLevelField, equals(42));
- }));
- }
+ libMirror.setField(const Symbol('topLevelField'), [91]);
+ expect(libMirror.getField(const Symbol('topLevelField')).reflectee,
+ equals([91]));
+ expect(topLevelField, equals([91]));
+
+ libMirror.setFieldAsync(const Symbol('topLevelField'), 42);
+ future = libMirror.getFieldAsync(const Symbol('topLevelField'));
+ future.then(expectAsync1((resultMirror) {
+ expect(resultMirror.reflectee, equals(42));
+ expect(topLevelField, equals(42));
+ }));
classMirror.setFieldAsync(const Symbol('staticField'), 43);
future = classMirror.getFieldAsync(const Symbol('staticField'));
« no previous file with comments | « dart/tests/compiler/dart2js_extra/minified_mirrors_test.dart ('k') | dart/tests/lib/mirrors/top_level_accessors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698