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

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

Issue 12086062: Rename mappedBy to map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undo change to test-script. Created 7 years, 10 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/iterable_join_test.dart ('k') | tests/corelib/iterable_mapping_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 class A extends Iterable { 5 class A extends Iterable {
6 int count; 6 int count;
7 A(this.count); 7 A(this.count);
8 8
9 Iterator get iterator { 9 Iterator get iterator {
10 return new AIterator(count); 10 return new AIterator(count);
(...skipping 18 matching lines...) Expand all
29 29
30 get current => _current; 30 get current => _current;
31 } 31 }
32 32
33 main() { 33 main() {
34 var a = new A(10); 34 var a = new A(10);
35 Expect.equals(10, a.length); 35 Expect.equals(10, a.length);
36 a = new A(0); 36 a = new A(0);
37 Expect.equals(0, a.length); 37 Expect.equals(0, a.length);
38 a = new A(5); 38 a = new A(5);
39 Expect.equals(5, a.mappedBy((e) => e + 1).length); 39 Expect.equals(5, a.map((e) => e + 1).length);
40 Expect.equals(3, a.where((e) => e >= 3).length); 40 Expect.equals(3, a.where((e) => e >= 3).length);
41 } 41 }
OLDNEW
« no previous file with comments | « tests/corelib/iterable_join_test.dart ('k') | tests/corelib/iterable_mapping_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698