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

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

Powered by Google App Engine
This is Rietveld 408576698