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

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

Issue 2774783002: Re-land "Format all multitests" (Closed)
Patch Set: Created 3 years, 9 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/lib/mirrors/reflected_type_classes_test.dart ('k') | tests/lib/mirrors/static_metatarget_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/reflected_type_test.dart
diff --git a/tests/lib/mirrors/reflected_type_test.dart b/tests/lib/mirrors/reflected_type_test.dart
index beba03897b903c482874811355759eb3b07a7590..9bc78d6d53d6bc45cffc7bf06e6dfaa9fc3dd307 100644
--- a/tests/lib/mirrors/reflected_type_test.dart
+++ b/tests/lib/mirrors/reflected_type_test.dart
@@ -9,23 +9,29 @@ import 'dart:mirrors';
import 'package:expect/expect.dart';
class A<T> {}
+
class B extends A {}
+
class C extends A<num, int> {} // //# 01: static type warning
class D extends A<int> {}
+
class E<S> extends A<S> {}
+
class F<R> extends A<int> {}
+
class G {}
-class H<A,B,C> {}
+
+class H<A, B, C> {}
expectReflectedType(classMirror, expectedType) {
if (expectedType == null) {
Expect.isFalse(classMirror.hasReflectedType,
- "$classMirror should not have a reflected type");
- Expect.throws(() => classMirror.reflectedType,
- (e) => e is UnsupportedError);
+ "$classMirror should not have a reflected type");
+ Expect.throws(
+ () => classMirror.reflectedType, (e) => e is UnsupportedError);
} else {
Expect.isTrue(classMirror.hasReflectedType,
- "$classMirror should have a reflected type");
+ "$classMirror should have a reflected type");
Expect.equals(expectedType, classMirror.reflectedType);
}
}
@@ -50,7 +56,7 @@ main() {
expectReflectedType(reflectClass(G), G);
expectReflectedType(reflectClass(H), null);
- // Instantiations.
+ // Instantiations.
expectReflectedType(reflect(new A()).type, new A().runtimeType);
expectReflectedType(reflect(new B()).type, new B().runtimeType);
expectReflectedType(reflect(new C()).type, new C().runtimeType); // //# 01: continued
@@ -68,11 +74,11 @@ main() {
expectReflectedType(reflect(new D<num>()).type.superclass, // //# 03: static type warning
new A<int>().runtimeType); // //# 03: continued
expectReflectedType(reflect(new E<num>()).type, new E<num>().runtimeType);
- expectReflectedType(reflect(new E<num>()).type.superclass,
- new A<num>().runtimeType);
- expectReflectedType(reflect(new F<num>()).type.superclass,
- new A<int>().runtimeType);
+ expectReflectedType(
+ reflect(new E<num>()).type.superclass, new A<num>().runtimeType);
+ expectReflectedType(
+ reflect(new F<num>()).type.superclass, new A<int>().runtimeType);
expectReflectedType(reflect(new F<num>()).type, new F<num>().runtimeType);
- expectReflectedType(reflect(new H<num, num, num>()).type,
- new H<num, num, num>().runtimeType);
+ expectReflectedType(
+ reflect(new H<num, num, num>()).type, new H<num, num, num>().runtimeType);
}
« no previous file with comments | « tests/lib/mirrors/reflected_type_classes_test.dart ('k') | tests/lib/mirrors/static_metatarget_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698