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

Unified Diff: tests/compiler/dart2js/mirrors/default_value_test.dart

Issue 1799283002: Delete support for source mirrors (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: new attempt Created 4 years, 7 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: tests/compiler/dart2js/mirrors/default_value_test.dart
diff --git a/tests/compiler/dart2js/mirrors/default_value_test.dart b/tests/compiler/dart2js/mirrors/default_value_test.dart
deleted file mode 100644
index b4ea3dc2f2f150f675de689c8e3b041e7ea11cf9..0000000000000000000000000000000000000000
--- a/tests/compiler/dart2js/mirrors/default_value_test.dart
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// 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.
-
-import "dart:mirrors";
-
-import "package:async_helper/async_helper.dart";
-import "package:expect/expect.dart";
-import "../memory_compiler.dart";
-
-const SOURCE = const {
- 'main.dart': """
-library main;
-
-class Class {
- var a, b, c, d, e, f, g, h;
- Class.optional(this.a, int b, void this.c(),
- [this.d, int this.e, void this.f(),
- this.g = 0, int this.h = 0]);
- Class.named(this.a, int b, void this.c(),
- {this.d, int this.e, void this.f(),
- this.g: 0, int this.h: 0});
- methodOptional(a, int b, void c(),
- [d, int e, void f(),
- g = 0, int h = 0]) {}
- methodNamed(a, int b, void c(),
- {d, int e, void f(),
- g: 0, int h: 0}) {}
-}
-""",
-};
-
-main() {
- asyncTest(() => mirrorSystemFor(SOURCE).then((MirrorSystem mirrors) {
- LibraryMirror dartCore = mirrors.libraries[Uri.parse('memory:main.dart')];
- ClassMirror classMirror = dartCore.declarations[#Class];
- testMethod(classMirror.declarations[#optional]);
- testMethod(classMirror.declarations[#named]);
- testMethod(classMirror.declarations[#methodOptional]);
- testMethod(classMirror.declarations[#methodNamed]);
- }));
-}
-
-testMethod(MethodMirror mirror) {
- Expect.equals(8, mirror.parameters.length);
- for (int i = 0 ; i < 6 ; i++) {
- testParameter(mirror.parameters[i], false);
- }
- for (int i = 6 ; i < 8 ; i++) {
- testParameter(mirror.parameters[i], true);
- }
-}
-
-testParameter(ParameterMirror mirror, bool expectDefaultValue) {
- if (expectDefaultValue) {
- Expect.isTrue(mirror.hasDefaultValue);
- Expect.isNotNull(mirror.defaultValue);
- } else {
- Expect.isFalse(mirror.hasDefaultValue);
- Expect.isNull(mirror.defaultValue);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698