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

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

Issue 9417031: Mock up all remaining core library implementation classes. (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);
16 String toString() => "InternalError: '${_msg}'";
17 final String _msg;
18 }
15 19
16 // TODO(ahe): VM specfic exception? 20 // TODO(ahe): VM specfic exception?
17 class StaticResolutionException implements Exception {} 21 class StaticResolutionException implements Exception {}
18 22
19 class List<E> implements Iterable<E> { 23 class List<E> implements Iterable<E> {
20 factory List([int length]) => Primitives.newList(length); 24 factory List([int length]) => Primitives.newList(length);
21 factory List.from(Iterable<E> other) { 25 factory List.from(Iterable<E> other) {
22 throw 'List.from is not implemented'; 26 throw 'List.from is not implemented';
23 } 27 }
24 } 28 }
25 29
26 void assert(condition) {} 30 void assert(condition) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698