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

Side by Side Diff: tests/language/type_variable_nested_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 // Regression test for 5 // Regression test for
6 // http://code.google.com/p/dart/issues/detail?id=9050. 6 // http://code.google.com/p/dart/issues/detail?id=9050.
7 7
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 9
10 class A<T> { 10 class A<T> {}
11 }
12 11
13 class B<T> { 12 class B<T> {
14 var _copy; 13 var _copy;
15 B() { 14 B() {
16 // We used to not register the dependency between List and B. 15 // We used to not register the dependency between List and B.
17 _copy = new List<A<T>>(); 16 _copy = new List<A<T>>();
18 } 17 }
19 } 18 }
20 19
21 main() { 20 main() {
22 var a = new B(); 21 var a = new B();
23 Expect.isFalse(a._copy is List<int>); 22 Expect.isFalse(a._copy is List<int>);
24 Expect.isTrue(a._copy is List<A>); 23 Expect.isTrue(a._copy is List<A>);
25 Expect.isTrue(a._copy is List<A<int>>); 24 Expect.isTrue(a._copy is List<A<int>>);
26 25
27 a = new B<String>(); 26 a = new B<String>();
28 Expect.isFalse(a._copy is List<String>); 27 Expect.isFalse(a._copy is List<String>);
29 Expect.isTrue(a._copy is List<A>); 28 Expect.isTrue(a._copy is List<A>);
30 Expect.isTrue(a._copy is List<A<String>>); 29 Expect.isTrue(a._copy is List<A<String>>);
31 Expect.isTrue(a._copy is List<A<Object>>); 30 Expect.isTrue(a._copy is List<A<Object>>);
32 Expect.isFalse(a._copy is List<A<int>>); 31 Expect.isFalse(a._copy is List<A<int>>);
33 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698