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

Side by Side Diff: dart/tests/language/src/DefaultImplementationTest.dart

Issue 8958011: One more factory -> default pass. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Dart test to verify that factory classes are working. 4 // Dart test to verify that factory classes are working.
5 5
6 interface Point factory PointImplementation { 6 interface Point default PointImplementation {
7 Point(x, y); 7 Point(x, y);
8 8
9 final int x; 9 final int x;
10 final int y; 10 final int y;
11 } 11 }
12 12
13 class PointImplementation implements Point { 13 class PointImplementation implements Point {
14 const PointImplementation(int x, int y) : this.x = x, this.y = y; 14 const PointImplementation(int x, int y) : this.x = x, this.y = y;
15 final int x; 15 final int x;
16 final int y; 16 final int y;
17 } 17 }
18 18
19 class DefaultImplementationTest { 19 class DefaultImplementationTest {
20 static void testMain() { 20 static void testMain() {
21 Point point = new Point(4, 2); 21 Point point = new Point(4, 2);
22 Expect.equals(4, point.x); 22 Expect.equals(4, point.x);
23 Expect.equals(2, point.y); 23 Expect.equals(2, point.y);
24 } 24 }
25 } 25 }
26 26
27 main() { 27 main() {
28 DefaultImplementationTest.testMain(); 28 DefaultImplementationTest.testMain();
29 } 29 }
OLDNEW
« no previous file with comments | « dart/tests/language/src/DefaultFactoryTest.dart ('k') | dart/tests/language/src/Factory2Test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698