| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 analyzer.test.embedder_tests; | 5 library analyzer.test.embedder_tests; |
| 6 | 6 |
| 7 import 'dart:core'; | 7 import 'dart:core'; |
| 8 | 8 |
| 9 import 'package:analyzer/file_system/file_system.dart'; | 9 import 'package:analyzer/file_system/file_system.dart'; |
| 10 import 'package:analyzer/file_system/memory_file_system.dart'; | 10 import 'package:analyzer/file_system/memory_file_system.dart'; |
| 11 import 'package:path/path.dart' as path; | |
| 12 | 11 |
| 13 import 'resource_utils.dart'; | 12 import 'resource_utils.dart'; |
| 14 import 'utils.dart'; | |
| 15 | 13 |
| 16 abstract class EmbedderRelatedTest { | 14 abstract class EmbedderRelatedTest { |
| 17 final String emptyPath = '/home/.pub-cache/empty'; | 15 final String emptyPath = '/home/.pub-cache/empty'; |
| 18 final String foxPath = '/home/.pub-cache/fox'; | 16 final String foxPath = '/home/.pub-cache/fox'; |
| 19 final String foxLib = '/home/.pub-cache/fox/lib'; | 17 final String foxLib = '/home/.pub-cache/fox/lib'; |
| 20 | 18 |
| 21 TestPathTranslator pathTranslator; | 19 TestPathTranslator pathTranslator; |
| 22 ResourceProvider resourceProvider; | 20 ResourceProvider resourceProvider; |
| 23 | 21 |
| 24 buildResourceProvider() { | 22 buildResourceProvider() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 39 "fart:loudly": "nomatter.dart" | 37 "fart:loudly": "nomatter.dart" |
| 40 '''); | 38 '''); |
| 41 } | 39 } |
| 42 | 40 |
| 43 clearResourceProvider() { | 41 clearResourceProvider() { |
| 44 resourceProvider = null; | 42 resourceProvider = null; |
| 45 pathTranslator = null; | 43 pathTranslator = null; |
| 46 } | 44 } |
| 47 | 45 |
| 48 void setUp() { | 46 void setUp() { |
| 49 initializeTestEnvironment(path.context); | |
| 50 buildResourceProvider(); | 47 buildResourceProvider(); |
| 51 } | 48 } |
| 52 | 49 |
| 53 void tearDown() { | 50 void tearDown() { |
| 54 initializeTestEnvironment(); | |
| 55 clearResourceProvider(); | 51 clearResourceProvider(); |
| 56 } | 52 } |
| 57 } | 53 } |
| OLD | NEW |