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

Side by Side Diff: tests/language/mixin_type_parameters_mixin_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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 class M<T> { 7 class M<T> {
8 bool matches(o) { 8 bool matches(o) {
9 bool isChecked = checkUsingIs(o); 9 bool isChecked = checkUsingIs(o);
10 if (checkedMode) { 10 if (checkedMode) {
(...skipping 19 matching lines...) Expand all
30 static bool computeCheckedMode() { 30 static bool computeCheckedMode() {
31 try { 31 try {
32 int x = "foo"; 32 int x = "foo";
33 } on Error { 33 } on Error {
34 return true; 34 return true;
35 } 35 }
36 return false; 36 return false;
37 } 37 }
38 } 38 }
39 39
40 class S { 40 class S {}
41 }
42 41
43 class C0<T> = S with M; 42 class C0<T> = S with M;
44 class C1<T> = S with M<T>; 43 class C1<T> = S with M<T>;
45 class C2<T> = S with M<int>; 44 class C2<T> = S with M<int>;
46 class C3 = S with M<String>; 45 class C3 = S with M<String>;
47 46
48 main() { 47 main() {
49 var c0 = new C0(); 48 var c0 = new C0();
50 Expect.isTrue(c0 is M); 49 Expect.isTrue(c0 is M);
51 Expect.isTrue(c0 is M<int>); 50 Expect.isTrue(c0 is M<int>);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Expect.isFalse(c2_String.matches("hello")); 118 Expect.isFalse(c2_String.matches("hello"));
120 119
121 var c3 = new C3(); 120 var c3 = new C3();
122 Expect.isTrue(c3 is M); 121 Expect.isTrue(c3 is M);
123 Expect.isFalse(c3 is M<int>); 122 Expect.isFalse(c3 is M<int>);
124 Expect.isTrue(c3 is M<String>); 123 Expect.isTrue(c3 is M<String>);
125 Expect.isFalse(c3.matches(c2)); 124 Expect.isFalse(c3.matches(c2));
126 Expect.isFalse(c3.matches(42)); 125 Expect.isFalse(c3.matches(42));
127 Expect.isTrue(c3.matches("hello")); 126 Expect.isTrue(c3.matches("hello"));
128 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698