| OLD | NEW |
| 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import '../../../sdk/lib/_internal/compiler/implementation/js_backend/js_backend
.dart'; | 6 import '../../../sdk/lib/_internal/compiler/implementation/js_backend/js_backend
.dart'; |
| 7 import '../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart'; | 7 import '../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart'; |
| 8 import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt'; | 8 import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt'; |
| 9 | 9 |
| 10 import 'compiler_helper.dart'; | 10 import 'compiler_helper.dart'; |
| 11 import 'parser_helper.dart'; | 11 import 'parser_helper.dart'; |
| 12 | 12 |
| 13 void compileAndFind(String code, | 13 void compileAndFind(String code, |
| 14 String className, | 14 String className, |
| 15 String memberName, | 15 String memberName, |
| 16 bool disableInlining, | 16 bool disableInlining, |
| 17 check(compiler, element)) { | 17 check(compiler, element)) { |
| 18 Uri uri = new Uri.fromComponents(scheme: 'source'); | 18 Uri uri = new Uri(scheme: 'source'); |
| 19 var compiler = compilerFor(code, uri); | 19 var compiler = compilerFor(code, uri); |
| 20 compiler.runCompiler(uri); | 20 compiler.runCompiler(uri); |
| 21 compiler.disableInlining = disableInlining; | 21 compiler.disableInlining = disableInlining; |
| 22 var cls = findElement(compiler, className); | 22 var cls = findElement(compiler, className); |
| 23 var member = cls.lookupMember(buildSourceString(memberName)); | 23 var member = cls.lookupMember(buildSourceString(memberName)); |
| 24 return check(compiler.backend, member); | 24 return check(compiler.backend, member); |
| 25 } | 25 } |
| 26 | 26 |
| 27 const String TEST_1 = r""" | 27 const String TEST_1 = r""" |
| 28 class A { | 28 class A { |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 'f2': HType.STRING, | 385 'f2': HType.STRING, |
| 386 'f3': HType.NON_NULL}); | 386 'f3': HType.NON_NULL}); |
| 387 runTest(TEST_19, {'f1': HType.UNKNOWN, | 387 runTest(TEST_19, {'f1': HType.UNKNOWN, |
| 388 'f2': HType.UNKNOWN, | 388 'f2': HType.UNKNOWN, |
| 389 'f3': HType.UNKNOWN}); | 389 'f3': HType.UNKNOWN}); |
| 390 } | 390 } |
| 391 | 391 |
| 392 void main() { | 392 void main() { |
| 393 test(); | 393 test(); |
| 394 } | 394 } |
| OLD | NEW |