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

Side by Side Diff: tests/corelib/apply2_test.dart

Issue 11021008: Added 'dynamic' keyword, so that 'Dynamic' can be deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated dart2dart test status file with co19 issue as well. Created 8 years, 2 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/compiler/dart2js/unparser2_test.dart ('k') | no next file » | 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 apply(Function function, ArgumentDescriptor args) { 5 apply(Function function, ArgumentDescriptor args) {
6 return Function.apply( 6 return Function.apply(
7 function, args.positionalArguments, args.namedArguments); 7 function, args.positionalArguments, args.namedArguments);
8 } 8 }
9 9
10 class ArgumentDescriptor { 10 class ArgumentDescriptor {
11 final List positionalArguments; 11 final List positionalArguments;
12 final Map<String, Dynamic> namedArguments; 12 final Map<String, dynamic> namedArguments;
13 13
14 ArgumentDescriptor(this.positionalArguments, this.namedArguments); 14 ArgumentDescriptor(this.positionalArguments, this.namedArguments);
15 } 15 }
16 16
17 void throwsNSME(function) { 17 void throwsNSME(function) {
18 Expect.throws(function, (e) => e is NoSuchMethodError); 18 Expect.throws(function, (e) => e is NoSuchMethodError);
19 } 19 }
20 20
21 main() { 21 main() {
22 var c1 = () => 'c1'; 22 var c1 = () => 'c1';
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 apply(c6, new ArgumentDescriptor([], {'a': 3, 'b': 4}))); 77 apply(c6, new ArgumentDescriptor([], {'a': 3, 'b': 4})));
78 Expect.equals('c6 4 3', 78 Expect.equals('c6 4 3',
79 apply(c6, new ArgumentDescriptor([], {'b': 3, 'a': 4}))); 79 apply(c6, new ArgumentDescriptor([], {'b': 3, 'a': 4})));
80 Expect.equals('c6 2 3', 80 Expect.equals('c6 2 3',
81 apply(c6, new ArgumentDescriptor([], {'b': 3}))); 81 apply(c6, new ArgumentDescriptor([], {'b': 3})));
82 throwsNSME(() => apply(c6, new ArgumentDescriptor([1], {'a': 1}))); 82 throwsNSME(() => apply(c6, new ArgumentDescriptor([1], {'a': 1})));
83 throwsNSME(() => apply(c6, new ArgumentDescriptor([1], {}))); 83 throwsNSME(() => apply(c6, new ArgumentDescriptor([1], {})));
84 throwsNSME(() => 84 throwsNSME(() =>
85 apply(c6, new ArgumentDescriptor([], {'a': 1, 'b': 2, 'c': 3}))); 85 apply(c6, new ArgumentDescriptor([], {'a': 1, 'b': 2, 'c': 3})));
86 } 86 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/unparser2_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698