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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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) 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
5 abstract class A { 7 abstract class A {
6 factory A(int x, int y) = B; 8 factory A(int x, int y) = B;
7 } 9 }
8 10
9 abstract class X { 11 abstract class X {
10 factory X(int x, int y) = B.X; 12 factory X(int x, int y) = B.X;
11 } 13 }
12 14
13 class XImpl implements X { 15 class XImpl implements X {
14 final int x; 16 final int x;
(...skipping 17 matching lines...) Expand all
32 var a = new A(1, 2); 34 var a = new A(1, 2);
33 // Check that constructor B is invoked and not factory B.A. 35 // Check that constructor B is invoked and not factory B.A.
34 Expect.equals(1, a.x); 36 Expect.equals(1, a.x);
35 Expect.equals(2, a.y); 37 Expect.equals(2, a.y);
36 38
37 var x = new X(11, 22); /// 00: dynamic type error 39 var x = new X(11, 22); /// 00: dynamic type error
38 // Check that factory is invoked. 40 // Check that factory is invoked.
39 Expect.equals(110, x.x); /// 00: continued 41 Expect.equals(110, x.x); /// 00: continued
40 Expect.equals(220, x.y); /// 00: continued 42 Expect.equals(220, x.y); /// 00: continued
41 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698