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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. 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
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 topLevelMethod() => 't'; 7 topLevelMethod() => 't';
6 8
7 const topLevelFieldForTopLevelMethod = topLevelMethod; 9 const topLevelFieldForTopLevelMethod = topLevelMethod;
8 const topLevelFieldForStaticMethod = A.staticMethod; 10 const topLevelFieldForStaticMethod = A.staticMethod;
9 11
10 class A { 12 class A {
11 final Function closure; 13 final Function closure;
12 const A(this.closure); 14 const A(this.closure);
13 const A.defaultTopLevel([this.closure = topLevelMethod]); 15 const A.defaultTopLevel([this.closure = topLevelMethod]);
14 const A.defaultStatic([this.closure = staticMethod]); 16 const A.defaultStatic([this.closure = staticMethod]);
(...skipping 16 matching lines...) Expand all
31 Expect.equals('s', (new A.defaultStatic2()).run()); 33 Expect.equals('s', (new A.defaultStatic2()).run());
32 Expect.equals('t', topLevelFieldForTopLevelMethod()); 34 Expect.equals('t', topLevelFieldForTopLevelMethod());
33 Expect.equals('s', topLevelFieldForStaticMethod()); 35 Expect.equals('s', topLevelFieldForStaticMethod());
34 Expect.equals('t', A.staticFieldForTopLevelMethod()); 36 Expect.equals('t', A.staticFieldForTopLevelMethod());
35 Expect.equals('s', A.staticFieldForStaticMethod()); 37 Expect.equals('s', A.staticFieldForStaticMethod());
36 38
37 var map = const {'t': topLevelMethod, 's': A.staticMethod }; 39 var map = const {'t': topLevelMethod, 's': A.staticMethod };
38 Expect.equals('t', map['t']()); 40 Expect.equals('t', map['t']());
39 Expect.equals('s', map['s']()); 41 Expect.equals('s', map['s']());
40 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698