Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import "package:expect/expect.dart"; | |
| 6 import 'mock_compiler.dart'; | |
| 7 | |
| 8 class ScanMockCompiler extends MockCompiler { | |
| 9 ScanMockCompiler() { | |
|
ahe
2013/08/19 08:48:53
Weird indentation.
zarah
2013/08/28 10:20:13
Done.
| |
| 10 isolateHelperLibrary = null; | |
|
ahe
2013/08/19 08:48:53
Ditto.
zarah
2013/08/28 10:20:13
Done.
| |
| 11 foreignLibrary = null; | |
| 12 } | |
| 13 LibraryElement scanBuiltinLibrary(String filename) { | |
|
ahe
2013/08/19 08:48:53
Add empty line before this method.
zarah
2013/08/28 10:20:13
Done.
| |
| 14 return createLibrary(filename, "main(){}"); | |
| 15 } | |
| 16 } | |
| 17 | |
| 18 void main() { | |
| 19 Compiler compiler = new ScanMockCompiler(); | |
| 20 Expect.equals(null, compiler.isolateHelperLibrary); | |
| 21 Expect.equals(null, compiler.foreignLibrary); | |
| 22 compiler.onLibraryLoaded(mockLibrary(compiler, "mock"), | |
| 23 new Uri(scheme: 'dart', path: '_isolate_helper')); | |
| 24 Expect.isTrue(compiler.isolateHelperLibrary != null); | |
| 25 compiler.onLibraryLoaded(mockLibrary(compiler, "mock"), | |
| 26 new Uri(scheme: 'dart', path: '_foreign_helper')); | |
| 27 Expect.isTrue(compiler.isolateHelperLibrary != null); | |
| 28 Expect.equals(new Uri(scheme: 'dart', path: '_isolate_helper'), | |
| 29 compiler.isolateHelperLibrary.canonicalUri); | |
| 30 Expect.isTrue(compiler.foreignLibrary != null); | |
| 31 Expect.equals(new Uri(scheme: 'dart', path: '_foreign_helper'), | |
| 32 compiler.foreignLibrary.canonicalUri); | |
| 33 } | |
| OLD | NEW |