| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 File; | 9 import 'dart:io' show File; |
| 10 | 10 |
| 11 import 'package:testing/testing.dart' | 11 import 'package:testing/testing.dart' |
| 12 show Chain, ChainContext, Result, Step, runMe; | 12 show Chain, ChainContext, Result, Step, runMe; |
| 13 | 13 |
| 14 import 'package:kernel/ast.dart' show Program, Library; | 14 import 'package:kernel/ast.dart' show Program, Library; |
| 15 | 15 |
| 16 import 'package:kernel/target/targets.dart' show Target; |
| 17 |
| 16 import 'package:front_end/src/fasta/testing/kernel_chain.dart' | 18 import 'package:front_end/src/fasta/testing/kernel_chain.dart' |
| 17 show runDiff, Compile, CompileContext; | 19 show runDiff, Compile, CompileContext; |
| 18 | 20 |
| 19 import 'package:kernel/interpreter/interpreter.dart'; | 21 import 'package:kernel/interpreter/interpreter.dart'; |
| 20 | 22 |
| 21 const String STRONG_MODE = " strong mode "; | 23 const String STRONG_MODE = " strong mode "; |
| 22 | 24 |
| 23 class InterpreterContext extends ChainContext implements CompileContext { | 25 class InterpreterContext extends ChainContext implements CompileContext { |
| 24 final bool strongMode; | 26 final bool strongMode; |
| 27 Target get target => null; |
| 25 | 28 |
| 26 final List<Step> steps; | 29 final List<Step> steps; |
| 27 | 30 |
| 28 InterpreterContext(this.strongMode) | 31 InterpreterContext(this.strongMode) |
| 29 : steps = <Step>[ | 32 : steps = <Step>[ |
| 30 const Compile(), | 33 const Compile(), |
| 31 const Interpret(), | 34 const Interpret(), |
| 32 const MatchLogExpectation(".expect"), | 35 const MatchLogExpectation(".expect"), |
| 33 ]; | 36 ]; |
| 34 | 37 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 final Uri uri; | 96 final Uri uri; |
| 94 | 97 |
| 95 /// Evaluated program log. | 98 /// Evaluated program log. |
| 96 final String log; | 99 final String log; |
| 97 | 100 |
| 98 EvaluationLog(this.uri, this.log); | 101 EvaluationLog(this.uri, this.log); |
| 99 } | 102 } |
| 100 | 103 |
| 101 main(List<String> arguments) => | 104 main(List<String> arguments) => |
| 102 runMe(arguments, InterpreterContext.create, "testing.json"); | 105 runMe(arguments, InterpreterContext.create, "testing.json"); |
| OLD | NEW |