| 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library test.kernel.closures.suite; | 5 library test.kernel.closures.suite; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'dart:io' show Directory, File, Platform; | 9 import 'dart:io' show Directory, File, Platform; |
| 10 | 10 |
| 11 import 'package:analyzer/src/generated/sdk.dart' show DartSdk; | 11 import 'package:analyzer/src/generated/sdk.dart' show DartSdk; |
| 12 | 12 |
| 13 import 'package:kernel/analyzer/loader.dart' | 13 import 'package:kernel/analyzer/loader.dart' |
| 14 show DartLoader, DartOptions, createDartSdk; | 14 show DartLoader, DartOptions, createDartSdk; |
| 15 | 15 |
| 16 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget; | 16 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget; |
| 17 | 17 |
| 18 import 'package:kernel/repository.dart' show Repository; | |
| 19 | |
| 20 import 'kernel_chain.dart' | 18 import 'kernel_chain.dart' |
| 21 show MatchExpectation, Print, ReadDill, SanityCheck, WriteDill; | 19 show MatchExpectation, Print, ReadDill, SanityCheck, WriteDill; |
| 22 | 20 |
| 23 import 'package:testing/testing.dart' | 21 import 'package:testing/testing.dart' |
| 24 show | 22 show |
| 25 Chain, | 23 Chain, |
| 26 ChainContext, | 24 ChainContext, |
| 27 Result, | 25 Result, |
| 28 StdioProcess, | 26 StdioProcess, |
| 29 Step, | 27 Step, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 const Print(), | 61 const Print(), |
| 64 const SanityCheck(), | 62 const SanityCheck(), |
| 65 new MatchExpectation(".expect", | 63 new MatchExpectation(".expect", |
| 66 updateExpectations: updateExpectations), | 64 updateExpectations: updateExpectations), |
| 67 const WriteDill(), | 65 const WriteDill(), |
| 68 const ReadDill(), | 66 const ReadDill(), |
| 69 const Run(), | 67 const Run(), |
| 70 ]; | 68 ]; |
| 71 | 69 |
| 72 Future<DartLoader> createLoader() async { | 70 Future<DartLoader> createLoader() async { |
| 73 Repository repository = new Repository(); | 71 Program repository = new Program(); |
| 74 return new DartLoader(repository, options, await loadPackagesFile(packages), | 72 return new DartLoader(repository, options, await loadPackagesFile(packages), |
| 75 dartSdk: dartSdk); | 73 dartSdk: dartSdk); |
| 76 } | 74 } |
| 77 } | 75 } |
| 78 | 76 |
| 79 enum Environment { | 77 enum Environment { |
| 80 directory, | 78 directory, |
| 81 file, | 79 file, |
| 82 } | 80 } |
| 83 | 81 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 .run(context.vm.toFilePath(), [generated.path, "Hello, World!"]); | 182 .run(context.vm.toFilePath(), [generated.path, "Hello, World!"]); |
| 185 print(process.output); | 183 print(process.output); |
| 186 } finally { | 184 } finally { |
| 187 generated.parent.delete(recursive: true); | 185 generated.parent.delete(recursive: true); |
| 188 } | 186 } |
| 189 return process.toResult(); | 187 return process.toResult(); |
| 190 } | 188 } |
| 191 } | 189 } |
| 192 | 190 |
| 193 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); | 191 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); |
| OLD | NEW |