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

Side by Side Diff: tests/language/typed_selector_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/typed_message_test.dart ('k') | tests/language/typedef_is_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 import "package:expect/expect.dart";
6
7 // Regression test for http://dartbug.com/6259. This test used to fail 5 // Regression test for http://dartbug.com/6259. This test used to fail
8 // on dart2js because class A does not know [A.document] is a target for 6 // on dart2js because class A does not know [A.document] is a target for
9 // the call [:obj.document:] in the [main] method. Therefore, dart2js 7 // the call [:obj.document:] in the [main] method. Therefore, dart2js
10 // would not compile [A.document]. 8 // would not compile [A.document].
11 9
12 class A { 10 class A {
13 get document => 42; 11 get document => 42;
14 } 12 }
15 13
16 abstract class B { 14 abstract class B {
17 get document; // Abstract. 15 get document; // Abstract.
18 } 16 }
19 17
20 class C extends A implements B { 18 class C extends A implements B {
21 } 19 }
22 20
23 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); 21 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
24 22
25 void main() { 23 void main() {
26 var tab = [new Object(), new C()]; 24 var tab = [new Object(), new C()];
27 var obj = tab[inscrutable(1)]; 25 var obj = tab[inscrutable(1)];
28 int res = 0; 26 int res = 0;
29 if (obj is B) res = obj.document; 27 if (obj is B) res = obj.document;
30 Expect.equals(42, res); 28 Expect.equals(42, res);
31 } 29 }
OLDNEW
« no previous file with comments | « tests/language/typed_message_test.dart ('k') | tests/language/typedef_is_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698