| OLD | NEW |
| 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 testing.mock_sdk; | 5 library testing.mock_sdk; |
| 6 | 6 |
| 7 import 'package:analyzer/file_system/file_system.dart' as resource; | 7 import 'package:analyzer/file_system/file_system.dart' as resource; |
| 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/sdk.dart'; | 10 import 'package:analyzer/src/generated/sdk.dart'; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 void print(Object object) {} | 57 void print(Object object) {} |
| 58 ''', | 58 ''', |
| 59 | 59 |
| 60 "/lib/html/dartium/html_dartium.dart": ''' | 60 "/lib/html/dartium/html_dartium.dart": ''' |
| 61 library dart.html; | 61 library dart.html; |
| 62 class HtmlElement {} | 62 class HtmlElement {} |
| 63 ''', | 63 ''', |
| 64 | 64 |
| 65 "/lib/math/math.dart": ''' | 65 "/lib/math/math.dart": ''' |
| 66 library dart.math; | 66 library dart.math; |
| 67 const double E = 2.718281828459045; |
| 68 const double PI = 3.1415926535897932; |
| 67 ''' | 69 ''' |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 pathToContent.forEach((String path, String content) { | 72 pathToContent.forEach((String path, String content) { |
| 71 provider.newFile(path, content); | 73 provider.newFile(path, content); |
| 72 }); | 74 }); |
| 73 } | 75 } |
| 74 | 76 |
| 75 // Not used | 77 // Not used |
| 76 @override | 78 @override |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 if (path != null) { | 121 if (path != null) { |
| 120 resource.File file = provider.getResource(path); | 122 resource.File file = provider.getResource(path); |
| 121 return file.createSource(UriKind.DART_URI); | 123 return file.createSource(UriKind.DART_URI); |
| 122 } | 124 } |
| 123 | 125 |
| 124 // If we reach here then we tried to use a dartUri that's not in the | 126 // If we reach here then we tried to use a dartUri that's not in the |
| 125 // table above. | 127 // table above. |
| 126 throw unimplemented; | 128 throw unimplemented; |
| 127 } | 129 } |
| 128 } | 130 } |
| OLD | NEW |