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

Side by Side Diff: tests/compiler/dart2js/mock_libraries.dart

Issue 1320673004: dart2js: Make functions that appear to be unreachable throw. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // Library for creating mock versions of platform and internal libraries. 5 // Library for creating mock versions of platform and internal libraries.
6 6
7 library mock_libraries; 7 library mock_libraries;
8 8
9 String buildLibrarySource( 9 String buildLibrarySource(
10 Map<String, String> elementMap, 10 Map<String, String> elementMap,
(...skipping 21 matching lines...) Expand all
32 class Deprecated extends Object { 32 class Deprecated extends Object {
33 final String expires; 33 final String expires;
34 const Deprecated(this.expires); 34 const Deprecated(this.expires);
35 }''', 35 }''',
36 'deprecated': 'const Object deprecated = const Deprecated("next release");', 36 'deprecated': 'const Object deprecated = const Deprecated("next release");',
37 'double': r''' 37 'double': r'''
38 abstract class double extends num { 38 abstract class double extends num {
39 static var NAN = 0; 39 static var NAN = 0;
40 static parse(s) {} 40 static parse(s) {}
41 }''', 41 }''',
42 'Function': 'class Function {}', 42 'Function': r'''
43 class Function {
44 static apply(Function fn, List positional, [Map named]) => null;
45 }''',
43 'identical': 'bool identical(Object a, Object b) { return true; }', 46 'identical': 'bool identical(Object a, Object b) { return true; }',
44 'int': 'abstract class int extends num { }', 47 'int': 'abstract class int extends num { }',
45 'Iterable': 'abstract class Iterable {}', 48 'Iterable': 'abstract class Iterable {}',
46 'LinkedHashMap': r''' 49 'LinkedHashMap': r'''
47 class LinkedHashMap { 50 class LinkedHashMap {
48 factory LinkedHashMap._empty() => null; 51 factory LinkedHashMap._empty() => null;
49 factory LinkedHashMap._literal(elements) => null; 52 factory LinkedHashMap._literal(elements) => null;
50 static _makeEmpty() => null; 53 static _makeEmpty() => null;
51 static _makeLiteral(elements) => null; 54 static _makeLiteral(elements) => null;
52 }''', 55 }''',
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 final _nestedMaps; 428 final _nestedMaps;
426 429
427 const LookupMap(this._entries, [this._nestedMaps = const []]) 430 const LookupMap(this._entries, [this._nestedMaps = const []])
428 : _key = null, _value = null; 431 : _key = null, _value = null;
429 432
430 const LookupMap.pair(this._key, this._value) 433 const LookupMap.pair(this._key, this._value)
431 : _entries = const [], _nestedMaps = const []; 434 : _entries = const [], _nestedMaps = const [];
432 V operator[](K k) => null; 435 V operator[](K k) => null;
433 }''', 436 }''',
434 }; 437 };
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/dart2js.status ('k') | tests/compiler/dart2js/simple_inferrer_const_closure_default_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698