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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 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 unified diff | Download patch | Annotate | Revision Log
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";
6
7 // Regression test for dart2js where the reference to [:this:] in a 5 // Regression test for dart2js where the reference to [:this:] in a
8 // constructor was not propagated to the super initializers. 6 // constructor was not propagated to the super initializers.
9 7
10 class A<T> { 8 class A<T> {
11 var map; 9 var map;
12 // Usage of type variables in the intializer makes the SSA builder 10 // Usage of type variables in the intializer makes the SSA builder
13 // want to access [:this:]. And because the initializers of A are 11 // want to access [:this:]. And because the initializers of A are
14 // inlined in the constructor of B, we have to make sure the 12 // inlined in the constructor of B, we have to make sure the
15 // [:this:] in the A constructor has a corresponding 13 // [:this:] in the A constructor has a corresponding
16 // SSA instruction. 14 // SSA instruction.
17 A() : map = new Map<T, T>(); 15 A() : map = new Map<T, T>();
18 } 16 }
19 17
20 class B<T> extends A<T> { 18 class B<T> extends A<T> {
21 } 19 }
22 20
23 main() { 21 main() {
24 Expect.isTrue(new B<int>().map is Map<int, int>); 22 Expect.isTrue(new B<int>().map is Map<int, int>);
25 } 23 }
OLDNEW
« no previous file with comments | « tests/language/type_variable_field_initializer_test.dart ('k') | tests/language/type_variable_scope2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698