| 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.incremental_resolver_test; | 5 library engine.incremental_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 2761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2772 } | 2772 } |
| 2773 '''); | 2773 '''); |
| 2774 _updateAndValidate(r''' | 2774 _updateAndValidate(r''' |
| 2775 /// aaa bbb | 2775 /// aaa bbb |
| 2776 main() { | 2776 main() { |
| 2777 return 2; | 2777 return 2; |
| 2778 } | 2778 } |
| 2779 '''); | 2779 '''); |
| 2780 } | 2780 } |
| 2781 | 2781 |
| 2782 void test_dartDoc_elegant_updateText_insertToken() { |
| 2783 _resolveUnit(r''' |
| 2784 /// A |
| 2785 /// [int] |
| 2786 class Test { |
| 2787 } |
| 2788 '''); |
| 2789 _updateAndValidate(r''' |
| 2790 /// A |
| 2791 /// |
| 2792 /// [int] |
| 2793 class Test { |
| 2794 } |
| 2795 '''); |
| 2796 } |
| 2797 |
| 2798 void test_dartDoc_elegant_updateText_removeToken() { |
| 2799 _resolveUnit(r''' |
| 2800 /// A |
| 2801 /// |
| 2802 /// [int] |
| 2803 class Test { |
| 2804 } |
| 2805 '''); |
| 2806 _updateAndValidate(r''' |
| 2807 /// A |
| 2808 /// [int] |
| 2809 class Test { |
| 2810 } |
| 2811 '''); |
| 2812 } |
| 2813 |
| 2782 void test_endOfLineComment_add_beforeKeywordToken() { | 2814 void test_endOfLineComment_add_beforeKeywordToken() { |
| 2783 _resolveUnit(r''' | 2815 _resolveUnit(r''' |
| 2784 main() { | 2816 main() { |
| 2785 var v = 42; | 2817 var v = 42; |
| 2786 } | 2818 } |
| 2787 '''); | 2819 '''); |
| 2788 _updateAndValidate(r''' | 2820 _updateAndValidate(r''' |
| 2789 main() { | 2821 main() { |
| 2790 // some comment | 2822 // some comment |
| 2791 var v = 42; | 2823 var v = 42; |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3776 } | 3808 } |
| 3777 } | 3809 } |
| 3778 | 3810 |
| 3779 | 3811 |
| 3780 class _Edit { | 3812 class _Edit { |
| 3781 final int offset; | 3813 final int offset; |
| 3782 final int length; | 3814 final int length; |
| 3783 final String replacement; | 3815 final String replacement; |
| 3784 _Edit(this.offset, this.length, this.replacement); | 3816 _Edit(this.offset, this.length, this.replacement); |
| 3785 } | 3817 } |
| OLD | NEW |