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

Side by Side Diff: dart/frog/leg/lib/mock.dart

Issue 9355031: Improve List implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
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 // Mocks of things that Leg cannot read directly. 5 // Mocks of things that Leg cannot read directly.
6 6
7 // TODO(ahe): Remove this file. 7 // TODO(ahe): Remove this file.
8 8
9 class AssertionError {} 9 class AssertionError {}
10 class TypeError extends AssertionError {} 10 class TypeError extends AssertionError {}
11 class FallThroughError {} 11 class FallThroughError {}
12 12
13 // TODO(ahe): VM specfic exception? 13 // TODO(ahe): VM specfic exception?
14 class InternalError { 14 class InternalError {
15 const InternalError(this._msg); 15 const InternalError(this._msg);
16 String toString() => "InternalError: '${_msg}'"; 16 String toString() => "InternalError: '${_msg}'";
17 final String _msg; 17 final String _msg;
18 } 18 }
19 19
20 // TODO(ahe): VM specfic exception? 20 // TODO(ahe): VM specfic exception?
21 class StaticResolutionException implements Exception {} 21 class StaticResolutionException implements Exception {}
22 22
23 class List<E> implements Iterable<E> {
24 factory List([int length]) => Primitives.newList(length);
25 factory List.from(Iterable<E> other) {
26 throw 'List.from is not implemented';
27 }
28 }
29
30 void assert(condition) {} 23 void assert(condition) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698