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

Side by Side Diff: tests/corelib/apply_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
« no previous file with comments | « tests/corelib/apply2_test.dart ('k') | tests/corelib/big_integer_vm_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Testing Function.apply calls correctly. 5 // Testing Function.apply calls correctly.
8 // This test is not testing error handling, only that correct parameters 6 // This test is not testing error handling, only that correct parameters
9 // cause a correct call. 7 // cause a correct call.
10 8
11 int test0() => 42; 9 int test0() => 42;
12 int test0a({int a}) => 37 + a; 10 int test0a({int a}) => 37 + a;
13 int test1(int i) => i + 1; 11 int test1(int i) => i + 1;
14 int test1a(int i, {int a}) => i + a; 12 int test1a(int i, {int a}) => i + a;
15 int test2(int i, int j) => i + j; 13 int test2(int i, int j) => i + j;
16 int test2a(int i, int j, {int a}) => i + j + a; 14 int test2a(int i, int j, {int a}) => i + j + a;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Test that apply works even with a different name. 70 // Test that apply works even with a different name.
73 var app = confuse(); 71 var app = confuse();
74 Expect.equals(42, app(test2, [22, 20])); 72 Expect.equals(42, app(test2, [22, 20]));
75 73
76 // Test that apply can itself be applied. 74 // Test that apply can itself be applied.
77 Expect.equals(42, Function.apply(Function.apply, [test2, [17, 25]])); 75 Expect.equals(42, Function.apply(Function.apply, [test2, [17, 25]]));
78 76
79 // Test that apply works on callable objects. 77 // Test that apply works on callable objects.
80 testList(42, new Callable(), [13, 29]); 78 testList(42, new Callable(), [13, 29]);
81 } 79 }
OLDNEW
« no previous file with comments | « tests/corelib/apply2_test.dart ('k') | tests/corelib/big_integer_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698