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

Side by Side Diff: tests/language/named_parameters_with_conversions_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Test named arguments work as expected regardless of whether the function or 5 // Test named arguments work as expected regardless of whether the function or
6 // method is called via function call syntax or method call syntax. 6 // method is called via function call syntax or method call syntax.
7 7
8 import "package:expect/expect.dart";
9
10 8
11 Validate(tag, a, b) { 9 Validate(tag, a, b) {
12 // tag encodes which parameters are passed in with values a: 111, b: 222. 10 // tag encodes which parameters are passed in with values a: 111, b: 222.
13 if (tag == 'ab') { 11 if (tag == 'ab') {
14 Expect.equals(a, 111); 12 Expect.equals(a, 111);
15 Expect.equals(b, 222); 13 Expect.equals(b, 222);
16 } 14 }
17 if (tag == 'a') { 15 if (tag == 'a') {
18 Expect.equals(a, 111); 16 Expect.equals(a, 111);
19 Expect.equals(b, 20); 17 Expect.equals(b, 20);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // 'Conversion' calls where method/field call syntax does not match the 130 // 'Conversion' calls where method/field call syntax does not match the
133 // object. 131 // object.
134 testMethodCallSyntax(new HasField()); 132 testMethodCallSyntax(new HasField());
135 testFunctionCallSyntax(new HasMethod()); 133 testFunctionCallSyntax(new HasMethod());
136 } 134 }
137 } 135 }
138 136
139 main() { 137 main() {
140 NamedParametersWithConversionsTest.testMain(); 138 NamedParametersWithConversionsTest.testMain();
141 } 139 }
OLDNEW
« no previous file with comments | « tests/language/named_parameters_type_test.dart ('k') | tests/language/named_parameters_with_dollars_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698