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

Side by Side Diff: tests/language/inline_super_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
« no previous file with comments | « tests/language/inline_getter_test.dart ('k') | tests/language/inline_test_context_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 // Regression test for dart2js issue 6639. 5 // Regression test for dart2js issue 6639.
6 6
7 library inline_super_test; 7 library inline_super_test;
8 import "package:expect/expect.dart";
9 8
10 part 'inline_super_part.dart'; 9 part 'inline_super_part.dart';
11 10
12 // Long comment to ensure source positions in the following code are 11 // Long comment to ensure source positions in the following code are
13 // larger than the part file. Best way to ensure that is to include 12 // larger than the part file. Best way to ensure that is to include
14 // the part as a comment: 13 // the part as a comment:
15 // 14 //
16 // class Player extends LivingActor { 15 // class Player extends LivingActor {
17 // Player (deathCallback) : super(null, deathCallback); 16 // Player (deathCallback) : super(null, deathCallback);
18 // } 17 // }
19 18
20 class Percept {} 19 class Percept {}
21 20
22 class Actor { 21 class Actor {
23 final percept; 22 final percept;
24 Actor(this.percept); 23 Actor(this.percept);
25 } 24 }
26 25
27 class LivingActor extends Actor { 26 class LivingActor extends Actor {
28 // The bug occurs when inlining the node [:new Percept():] into 27 // The bug occurs when inlining the node [:new Percept():] into
29 // [Actor]'s constructor. When this inlining is being initiated 28 // [Actor]'s constructor. When this inlining is being initiated
30 // from [Player], we must take care to ensure that we know that we 29 // from [Player], we must take care to ensure that we know that we
31 // are inlining from this location, and not [Player]. 30 // are inlining from this location, and not [Player].
32 LivingActor () : super(new Percept()); 31 LivingActor () : super(new Percept());
33 } 32 }
34 33
35 main() { 34 main() {
36 Expect.isTrue(new Player().percept is Percept); 35 Expect.isTrue(new Player().percept is Percept);
37 } 36 }
OLDNEW
« no previous file with comments | « tests/language/inline_getter_test.dart ('k') | tests/language/inline_test_context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698