Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: pkg/analysis_server/test/completion_test.dart

Issue 2286923002: Convert analysis server over to use ContextBuilder (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: address comment, fix bugs, clean-up Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 test.completion.support; 5 library test.completion.support;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 2646 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 "1+library", 2657 "1+library",
2658 "2+import \'\';", 2658 "2+import \'\';",
2659 "3+export \'\';", 2659 "3+export \'\';",
2660 "4+part \'\';", 2660 "4+part \'\';",
2661 "5+as", 2661 "5+as",
2662 "6+hide", 2662 "6+hide",
2663 "7+show", 2663 "7+show",
2664 "8-null" 2664 "8-null"
2665 ], 2665 ],
2666 failingTests: '234567'); //TODO(jwren) 234 failing as correct selection 2666 failingTests: '234567'); //TODO(jwren) 234 failing as correct selection
2667 // offset assertions can't be passed into buildTests(..) 2667 // offset assertions can't be passed into buildTests(..)
2668 2668
2669 // keywords 2669 // keywords
2670 buildTests('test018', '''!1part !2of foo;''', <String>["1+part", "2+of"], 2670 buildTests('test018', '''!1part !2of foo;''', <String>["1+part", "2+of"],
2671 failingTests: '12'); 2671 failingTests: '12');
2672 2672
2673 buildTests( 2673 buildTests(
2674 'test019', 2674 'test019',
2675 ''' 2675 '''
2676 var truefalse = 0; 2676 var truefalse = 0;
2677 var falsetrue = 1; 2677 var falsetrue = 1;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2898 Z az; 2898 Z az;
2899 A(this.ay, this.az) { 2899 A(this.ay, this.az) {
2900 ay.!1y; 2900 ay.!1y;
2901 az.!2x; 2901 az.!2x;
2902 } 2902 }
2903 }''', 2903 }''',
2904 <String>["1+y", "1-x", "2+x", "2-y"], 2904 <String>["1+y", "1-x", "2+x", "2-y"],
2905 failingTests: '2'); 2905 failingTests: '2');
2906 2906
2907 // test analysis of untyped fields and top-level vars 2907 // test analysis of untyped fields and top-level vars
2908 buildTests('test039', '''class X{}var x = null as !1X;''', 2908 buildTests(
2909 <String>["1-void"]); 2909 'test039', '''class X{}var x = null as !1X;''', <String>["1-void"]);
2910 2910
2911 // test arg lists with named params 2911 // test arg lists with named params
2912 buildTests('test040', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1)!2;}''', 2912 buildTests('test040', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1)!2;}''',
2913 <String>["1+x1", "2-x2"], 2913 <String>["1+x1", "2-x2"],
2914 failingTests: '1'); 2914 failingTests: '1');
2915 2915
2916 // test arg lists with named params 2916 // test arg lists with named params
2917 buildTests('test041', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1''', 2917 buildTests('test041', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1''',
2918 <String>["1+x1", "1+x2", "1+y"], 2918 <String>["1+x1", "1+x2", "1+y"],
2919 failingTests: '1'); 2919 failingTests: '1');
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
2991 } else { 2991 } else {
2992 ++expectedPassCount; 2992 ++expectedPassCount;
2993 tester(testName, () { 2993 tester(testName, () {
2994 CompletionTestCase test = new CompletionTestCase(); 2994 CompletionTestCase test = new CompletionTestCase();
2995 return test.runTest(spec, extraFiles); 2995 return test.runTest(spec, extraFiles);
2996 }); 2996 });
2997 } 2997 }
2998 } 2998 }
2999 } 2999 }
3000 } 3000 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.dart ('k') | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698