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

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

Issue 1872073002: Code completion improvement in the DAS- only suggest completions on the RHS of an as-expression tha… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebase with bleeding_edge Created 4 years, 8 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 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after
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('test039', '''class X{}var x = null as !1X;''',
2909 <String>["1+X", "1-void"]); 2909 <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

Powered by Google App Engine
This is Rietveld 408576698