| 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 engine.resolver_test; | 5 library engine.resolver_test; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/ast.dart'; | 9 import 'package:analyzer/src/generated/ast.dart'; |
| 10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 7728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7739 * Reset the analysis context to have the 'enableAsync' option set to true. | 7739 * Reset the analysis context to have the 'enableAsync' option set to true. |
| 7740 */ | 7740 */ |
| 7741 void resetWithAsync() { | 7741 void resetWithAsync() { |
| 7742 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); | 7742 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); |
| 7743 options.enableAsync = true; | 7743 options.enableAsync = true; |
| 7744 analysisContext2 = | 7744 analysisContext2 = |
| 7745 AnalysisContextFactory.contextWithCoreAndOptions(options); | 7745 AnalysisContextFactory.contextWithCoreAndOptions(options); |
| 7746 } | 7746 } |
| 7747 | 7747 |
| 7748 /** | 7748 /** |
| 7749 * Reset the analysis context to have the 'enableEnum' option set to true. |
| 7750 */ |
| 7751 void resetWithEnum() { |
| 7752 AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl(); |
| 7753 analysisOptions.enableEnum = true; |
| 7754 resetWithOptions(analysisOptions); |
| 7755 } |
| 7756 |
| 7757 /** |
| 7749 * Reset the analysis context to have the given options applied. | 7758 * Reset the analysis context to have the given options applied. |
| 7750 * | 7759 * |
| 7751 * @param options the analysis options to be applied to the context | 7760 * @param options the analysis options to be applied to the context |
| 7752 */ | 7761 */ |
| 7753 void resetWithOptions(AnalysisOptions options) { | 7762 void resetWithOptions(AnalysisOptions options) { |
| 7754 analysisContext2 = | 7763 analysisContext2 = |
| 7755 AnalysisContextFactory.contextWithCoreAndOptions(options); | 7764 AnalysisContextFactory.contextWithCoreAndOptions(options); |
| 7756 } | 7765 } |
| 7757 | 7766 |
| 7758 /** | 7767 /** |
| (...skipping 5666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13425 // check propagated type | 13434 // check propagated type |
| 13426 FunctionType propagatedType = node.propagatedType as FunctionType; | 13435 FunctionType propagatedType = node.propagatedType as FunctionType; |
| 13427 expect(propagatedType.returnType, test.typeProvider.stringType); | 13436 expect(propagatedType.returnType, test.typeProvider.stringType); |
| 13428 } on AnalysisException catch (e, stackTrace) { | 13437 } on AnalysisException catch (e, stackTrace) { |
| 13429 thrownException[0] = new CaughtException(e, stackTrace); | 13438 thrownException[0] = new CaughtException(e, stackTrace); |
| 13430 } | 13439 } |
| 13431 } | 13440 } |
| 13432 return null; | 13441 return null; |
| 13433 } | 13442 } |
| 13434 } | 13443 } |
| OLD | NEW |