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

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

Issue 2765693002: Update all tests (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
Index: tests/lib/mirrors/reflected_type_generics_test.dart
diff --git a/tests/lib/mirrors/reflected_type_generics_test.dart b/tests/lib/mirrors/reflected_type_generics_test.dart
index f10425c4337037b1bf114ebaf0520ec0586fd537..f10f8908feb8281c55adf9fd64ad1982b1ab6f02 100644
--- a/tests/lib/mirrors/reflected_type_generics_test.dart
+++ b/tests/lib/mirrors/reflected_type_generics_test.dart
@@ -47,7 +47,7 @@ main() {
reflectType(FBounded, [FBounded]), new FBounded<FBounded>().runtimeType);
var predicateHelper = new Helper<Predicate<P>>();
- expectReflectedType(reflectType(Predicate, [P]), predicateHelper.param); /// 01: ok
+ expectReflectedType(reflectType(Predicate, [P]), predicateHelper.param); //# 01: ok
var composite = new Composite<P, int>();
expectReflectedType(reflectType(Composite, [P, int]), composite.runtimeType);
@@ -57,40 +57,40 @@ main() {
(e) => e is ArgumentError && e.invalidValue is List,
"Should throw an ArgumentError if reflecting not a generic class with "
"empty list of type arguments");
- Expect.throws( /// 03: ok
- () => reflectType(P, [B]), /// 03: continued
- (e) => e is Error, /// 03: continued
- "Should throw an ArgumentError if reflecting not a generic class with " /// 03: continued
- "some type arguments"); /// 03: continued
+ Expect.throws( //# 03: ok
+ () => reflectType(P, [B]), //# 03: continued
+ (e) => e is Error, //# 03: continued
+ "Should throw an ArgumentError if reflecting not a generic class with " //# 03: continued
+ "some type arguments"); //# 03: continued
Expect.throws(
() => reflectType(A, []),
(e) => e is ArgumentError && e.invalidValue is List,
"Should throw an ArgumentError if type argument list is empty for a "
"generic class");
- Expect.throws( /// 04: ok
- () => reflectType(A, [P, B]), /// 04: continued
- (e) => e is ArgumentError && e.invalidValue is List, /// 04: continued
- "Should throw an ArgumentError if number of type arguments is not " /// 04: continued
- "correct"); /// 04: continued
- Expect.throws(() => reflectType(B, [P]), (e) => e is Error, /// 05: ok
- "Should throw an ArgumentError for non-generic class extending " /// 05: continued
- "generic one"); /// 05: continued
+ Expect.throws( //# 04: ok
+ () => reflectType(A, [P, B]), //# 04: continued
+ (e) => e is ArgumentError && e.invalidValue is List, //# 04: continued
+ "Should throw an ArgumentError if number of type arguments is not " //# 04: continued
+ "correct"); //# 04: continued
+ Expect.throws(() => reflectType(B, [P]), (e) => e is Error, //# 05: ok
+ "Should throw an ArgumentError for non-generic class extending " //# 05: continued
+ "generic one"); //# 05: continued
Expect.throws(
() => reflectType(A, ["non-type"]),
(e) => e is ArgumentError && e.invalidValue is List,
"Should throw an ArgumentError when any of type arguments is not a Type");
- Expect.throws( /// 06: ok
- () => reflectType(A, [P, B]), /// 06: continued
- (e) => e is ArgumentError && e.invalidValue is List, /// 06: continued
- "Should throw an ArgumentError if number of type arguments is not correct " /// 06: continued
- "for generic extending another generic"); /// 06: continued
+ Expect.throws( //# 06: ok
+ () => reflectType(A, [P, B]), //# 06: continued
+ (e) => e is ArgumentError && e.invalidValue is List, //# 06: continued
+ "Should throw an ArgumentError if number of type arguments is not correct " //# 06: continued
+ "for generic extending another generic"); //# 06: continued
Expect.throws(
() => reflectType(reflectType(F).typeVariables[0].reflectedType, [int]));
- Expect.throws(() => reflectType(FBounded, [int])); /// 02: ok
+ Expect.throws(() => reflectType(FBounded, [int])); //# 02: ok
var boundedType =
reflectType(FBounded).typeVariables[0].upperBound.reflectedType;
- Expect.throws(() => reflectType(boundedType, [int])); /// 02: ok
- Expect.throws(() => reflectType(Composite, [int, int])); /// 02: ok
+ Expect.throws(() => reflectType(boundedType, [int])); //# 02: ok
+ Expect.throws(() => reflectType(Composite, [int, int])); //# 02: ok
// Instantiation of a generic class preserves type information:
ClassMirror m = reflectType(A, [P]) as ClassMirror;

Powered by Google App Engine
This is Rietveld 408576698