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

Side by Side Diff: tests/language/factory_implementation_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/factory_arrow_test.dart ('k') | tests/language/factory_redirection2_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 abstract class A { 5 abstract class A {
8 factory A(int x, int y) = B; 6 factory A(int x, int y) = B;
9 } 7 }
10 8
11 abstract class X { 9 abstract class X {
12 factory X(int x, int y) = B.X; 10 factory X(int x, int y) = B.X;
13 } 11 }
14 12
15 class XImpl implements X { 13 class XImpl implements X {
16 final int x; 14 final int x;
(...skipping 17 matching lines...) Expand all
34 var a = new A(1, 2); 32 var a = new A(1, 2);
35 // Check that constructor B is invoked and not factory B.A. 33 // Check that constructor B is invoked and not factory B.A.
36 Expect.equals(1, a.x); 34 Expect.equals(1, a.x);
37 Expect.equals(2, a.y); 35 Expect.equals(2, a.y);
38 36
39 var x = new X(11, 22); /// 00: dynamic type error 37 var x = new X(11, 22); /// 00: dynamic type error
40 // Check that factory is invoked. 38 // Check that factory is invoked.
41 Expect.equals(110, x.x); /// 00: continued 39 Expect.equals(110, x.x); /// 00: continued
42 Expect.equals(220, x.y); /// 00: continued 40 Expect.equals(220, x.y); /// 00: continued
43 } 41 }
OLDNEW
« no previous file with comments | « tests/language/factory_arrow_test.dart ('k') | tests/language/factory_redirection2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698