Chromium Code Reviews| 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 fasta.testing.suite; | 5 library fasta.testing.suite; |
|
Siggi Cherem (dart-lang)
2017/04/19 20:46:18
I just moved this file - it's only used by tests h
| |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'dart:convert' show JSON; | 9 import 'dart:convert' show JSON; |
| 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:front_end/src/fasta/testing/validating_instrumentation.dart' | 13 import 'package:front_end/src/fasta/testing/validating_instrumentation.dart' |
| 14 show ValidatingInstrumentation; | 14 show ValidatingInstrumentation; |
| 15 | 15 |
| 16 import 'package:kernel/ast.dart' show Library, Program; | 16 import 'package:kernel/ast.dart' show Library, Program; |
| 17 | 17 |
| 18 import 'package:analyzer/src/kernel/loader.dart' show DartLoader; | 18 import 'package:analyzer/src/kernel/loader.dart' show DartLoader; |
| 19 | 19 |
| 20 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget; | 20 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget; |
| 21 | 21 |
| 22 import 'package:testing/testing.dart' | 22 import 'package:testing/testing.dart' |
| 23 show Chain, ExpectationSet, Result, Step, TestDescription; | 23 show Chain, ExpectationSet, Result, Step, TestDescription; |
| 24 | 24 |
| 25 import '../errors.dart' show InputError; | 25 import 'package:front_end/src/fasta/errors.dart' show InputError; |
| 26 | 26 |
| 27 import 'kernel_chain.dart' | 27 import 'package:front_end/src/fasta/testing/kernel_chain.dart' |
| 28 show MatchExpectation, Print, Run, Verify, TestContext, WriteDill; | 28 show MatchExpectation, Print, Verify, WriteDill; |
| 29 | 29 |
| 30 import '../ticker.dart' show Ticker; | 30 import 'package:front_end/src/fasta/ticker.dart' show Ticker; |
| 31 | 31 |
| 32 import '../translate_uri.dart' show TranslateUri; | 32 import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri; |
| 33 | 33 |
| 34 import '../analyzer/analyzer_target.dart' show AnalyzerTarget; | 34 import 'package:analyzer/src/fasta/analyzer_target.dart' show AnalyzerTarget; |
| 35 | 35 |
| 36 import '../kernel/kernel_target.dart' show KernelTarget; | 36 import 'package:front_end/src/fasta/kernel/kernel_target.dart' |
| 37 show KernelTarget; | |
| 37 | 38 |
| 38 import '../dill/dill_target.dart' show DillTarget; | 39 import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget; |
| 40 | |
| 41 export 'package:testing/testing.dart' show Chain, runMe; | |
| 42 | |
| 43 import 'kernel_chain.dart' show Run, TestContext; | |
| 39 | 44 |
| 40 export 'kernel_chain.dart' show STRONG_MODE, TestContext; | 45 export 'kernel_chain.dart' show STRONG_MODE, TestContext; |
| 41 | 46 |
| 42 export 'package:testing/testing.dart' show Chain, runMe; | |
| 43 | |
| 44 const String ENABLE_FULL_COMPILE = " full compile "; | 47 const String ENABLE_FULL_COMPILE = " full compile "; |
| 45 | 48 |
| 46 const String AST_KIND_INDEX = " AST kind index "; | 49 const String AST_KIND_INDEX = " AST kind index "; |
| 47 | 50 |
| 48 const String EXPECTATIONS = ''' | 51 const String EXPECTATIONS = ''' |
| 49 [ | 52 [ |
| 50 { | 53 { |
| 51 "name": "VerificationError", | 54 "name": "VerificationError", |
| 52 "group": "Fail" | 55 "group": "Fail" |
| 53 } | 56 } |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 return fail(null, instrumentation.problemsAsString); | 209 return fail(null, instrumentation.problemsAsString); |
| 207 } | 210 } |
| 208 } | 211 } |
| 209 } | 212 } |
| 210 } on InputError catch (e, s) { | 213 } on InputError catch (e, s) { |
| 211 return fail(null, e.error, s); | 214 return fail(null, e.error, s); |
| 212 } | 215 } |
| 213 return pass(p); | 216 return pass(p); |
| 214 } | 217 } |
| 215 } | 218 } |
| OLD | NEW |