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

Side by Side Diff: tests/language/factory_redirection_test.dart

Issue 11369168: Fix result type checking of factory constructors of generic classes in VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tests/language/factory1_test.dart ('k') | tests/language/factory_type_parameter_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class A<T> { 5 class A<T> {
6 A() : x = null; 6 A() : x = null;
7 7
8 const A.constant(this.x); 8 const A.constant(this.x);
9 9
10 factory A.factory() { 10 factory A.factory() {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 main() { 55 main() {
56 new A<List>.test01(); /// 01: continued 56 new A<List>.test01(); /// 01: continued
57 new A<List>.test02(); /// 02: continued 57 new A<List>.test02(); /// 02: continued
58 new A<List>.test03(); /// 03: continued 58 new A<List>.test03(); /// 03: continued
59 new C.test04(); /// 04: continued 59 new C.test04(); /// 04: continued
60 new B.test05(0); /// 05: continued 60 new B.test05(0); /// 05: continued
61 new C.test06<int, int>(0); /// 06: continued 61 new C.test06<int, int>(0); /// 06: continued
62 new C.test07<int, int>(0); /// 07: continued 62 new C.test07<int, int>(0); /// 07: continued
63 Expect.isTrue(new A<List>() is A<List>); 63 Expect.isTrue(new A<List>() is A<List>);
64 Expect.isTrue(new A<bool>.constant(true).x); 64 Expect.isTrue(new A<bool>.constant(true).x);
65 Expect.isTrue(new A<List>.factory() is B<Set>); 65 Expect.isTrue(new A<Set>.factory() is B<Set>);
66 Expect.isTrue(new B<List>.A() is A<List>); 66 Expect.isTrue(new B<List>.A() is A<List>);
67 Expect.isTrue(new B<bool>.A_constant(true).x); 67 Expect.isTrue(new B<bool>.A_constant(true).x);
68 Expect.isTrue(new B<List>.A_factory() is B<Set>); 68 Expect.isTrue(new B<List>.A_factory() is B<Set>);
69 Expect.isTrue(new C<String, num>.A() is A<num>); 69 Expect.isTrue(new C<String, num>.A() is A<num>);
70 Expect.isTrue(new C<String, num>.A_factory() is B<Set>); 70 Expect.isTrue(new C<String, num>.A_factory() is B<Set>);
71 Expect.isTrue(new C<String, bool>.B_constant(true).x); 71 Expect.isTrue(new C<String, bool>.B_constant(true).x);
72 } 72 }
OLDNEW
« no previous file with comments | « tests/language/factory1_test.dart ('k') | tests/language/factory_type_parameter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698