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

Unified Diff: tests/language_strong/generic_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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/language_strong/generic_test.dart
diff --git a/tests/language_strong/generic_test.dart b/tests/language_strong/generic_test.dart
index 35c5783f45a540f4f358ee01a76bfec3ec2d93ab..225b1d837f650a7254fd0be9b396712aa03cda34 100644
--- a/tests/language_strong/generic_test.dart
+++ b/tests/language_strong/generic_test.dart
@@ -20,7 +20,9 @@ class AX {
class B<T extends A> {
final A a_;
final T t_;
- const B(T t) : a_ = t, t_ = t;
+ const B(T t)
+ : a_ = t,
+ t_ = t;
isT(x) {
return x is T;
}
@@ -28,17 +30,17 @@ class B<T extends A> {
class C<T> {
B<T> b_;
- C(T t) : b_ = new B<T>(t) { }
+ C(T t) : b_ = new B<T>(t) {}
}
class D {
C<AA> caa_;
- D() : caa_ = new C<AA>(const AA()) { }
+ D() : caa_ = new C<AA>(const AA()) {}
}
class E {
C<AX> cax_;
- E() : cax_ = new C<AX>(const AX()) { }
+ E() : cax_ = new C<AX>(const AX()) {}
}
class GenericTest {
@@ -47,13 +49,13 @@ class GenericTest {
D d = new D();
Expect.equals(true, d.caa_.b_ is B<AA>);
Expect.equals(true, d.caa_.b_.isT(const AA()));
- C c = new C(const AA()); // c is of raw type C, T in C<T> is dynamic.
+ C c = new C(const AA()); // c is of raw type C, T in C<T> is dynamic.
Expect.equals(true, c.b_ is B);
Expect.equals(true, c.b_ is B<AA>);
Expect.equals(true, c.b_.isT(const AA()));
Expect.equals(true, c.b_.isT(const AX()));
try {
- E e = new E(); // Throws a type error, if type checks are enabled.
+ E e = new E(); // Throws a type error, if type checks are enabled.
} on TypeError catch (error) {
result = 1;
}
@@ -65,7 +67,6 @@ class GenericTest {
}
}
-
main() {
GenericTest.testMain();
}

Powered by Google App Engine
This is Rietveld 408576698