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

Side by Side Diff: tests/compiler/dart2js_extra/closure5_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
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 class A { 5 class A {
8 foo() => 499; 6 foo() => 499;
9 bar({a: 1, b: 7, c: 99}) => a + b + c; 7 bar({a: 1, b: 7, c: 99}) => a + b + c;
10 toto() => bar; 8 toto() => bar;
11 gee(f) => f(toto); 9 gee(f) => f(toto);
12 } 10 }
13 11
14 main() { 12 main() {
15 var a = new A(); 13 var a = new A();
16 var foo = a.foo; 14 var foo = a.foo;
17 Expect.equals(499, foo()); 15 Expect.equals(499, foo());
18 var bar = a.bar; 16 var bar = a.bar;
19 Expect.equals(107, bar()); 17 Expect.equals(107, bar());
20 Expect.equals(3, bar(a: 1, b: 1, c: 1)); 18 Expect.equals(3, bar(a: 1, b: 1, c: 1));
21 Expect.equals(10, bar(c: 2)); 19 Expect.equals(10, bar(c: 2));
22 var toto = a.toto; 20 var toto = a.toto;
23 var gee = a.gee; 21 var gee = a.gee;
24 Expect.equals(-10, gee((f) => f()(a: -1, b: -2, c: -7))); 22 Expect.equals(-10, gee((f) => f()(a: -1, b: -2, c: -7)));
25 } 23 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/closure4_test.dart ('k') | tests/compiler/dart2js_extra/closure6_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698