OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart2js.test.memory_source_file_helper; | 5 library dart2js.test.memory_source_file_helper; |
6 | 6 |
7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
8 import "package:async_helper/async_helper.dart"; | 8 import "package:async_helper/async_helper.dart"; |
9 import 'memory_compiler.dart'; | 9 import 'memory_compiler.dart'; |
10 import 'package:compiler/implementation/mirrors/source_mirrors.dart'; | 10 import 'package:compiler/src/mirrors/source_mirrors.dart'; |
11 import 'package:compiler/implementation/mirrors/mirrors_util.dart'; | 11 import 'package:compiler/src/mirrors/mirrors_util.dart'; |
12 | 12 |
13 const Map MEMORY_SOURCE_FILES = const { | 13 const Map MEMORY_SOURCE_FILES = const { |
14 'main.dart': r""" | 14 'main.dart': r""" |
15 | 15 |
16 library main; | 16 library main; |
17 | 17 |
18 import 'dart:async' as async show Future; | 18 import 'dart:async' as async show Future; |
19 | 19 |
20 var variable; | 20 var variable; |
21 | 21 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 Expect.equals(Subclass_subfield, | 254 Expect.equals(Subclass_subfield, |
255 lookupQualifiedInScope(library, 'Subclass.subfield')); | 255 lookupQualifiedInScope(library, 'Subclass.subfield')); |
256 | 256 |
257 Expect.equals(Future_, lookupQualifiedInScope(library, 'async.Future')); | 257 Expect.equals(Future_, lookupQualifiedInScope(library, 'async.Future')); |
258 Expect.isTrue( | 258 Expect.isTrue( |
259 lookupQualifiedInScope(library, 'async.Future.then') is MethodMirror); | 259 lookupQualifiedInScope(library, 'async.Future.then') is MethodMirror); |
260 // `Timer` should not be found through the prefix `async.Future`. | 260 // `Timer` should not be found through the prefix `async.Future`. |
261 Expect.isNull( | 261 Expect.isNull( |
262 lookupQualifiedInScope(library, 'async.Future.Timer')); | 262 lookupQualifiedInScope(library, 'async.Future.Timer')); |
263 } | 263 } |
OLD | NEW |