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

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

Issue 1168393003: Enforce LF line endings in the git database. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase Created 5 years, 6 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
index 53b872118c54b6d16a1d59f8afd2373331fa2310..b4ea3dc2f2f150f675de689c8e3b041e7ea11cf9 100644
--- a/tests/compiler/dart2js/mirrors/default_value_test.dart
+++ b/tests/compiler/dart2js/mirrors/default_value_test.dart
@@ -1,62 +1,62 @@
-// 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);
- }
-}
+// 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