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

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

Issue 1053663002: add type completions after "on" in a try block (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 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 | Annotate | Revision Log
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 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 "2+x", 1920 "2+x",
1921 "3+zs", 1921 "3+zs",
1922 "4+k", 1922 "4+k",
1923 "5+Q", 1923 "5+Q",
1924 "5-a", 1924 "5-a",
1925 "6+==", 1925 "6+==",
1926 "7+x", 1926 "7+x",
1927 "8+==", 1927 "8+==",
1928 "9+==", 1928 "9+==",
1929 "0+k" 1929 "0+k"
1930 ], failingTests: '5689'); 1930 ], failingTests: '689');
1931 1931
1932 // keywords 1932 // keywords
1933 buildTests('test014', ''' 1933 buildTests('test014', '''
1934 class Q { 1934 class Q {
1935 bool x; 1935 bool x;
1936 List zs; 1936 List zs;
1937 int k; 1937 int k;
1938 !Dvar a; 1938 !Dvar a;
1939 !Evoid mth() { 1939 !Evoid mth() {
1940 !1while (z) { !Gcontinue; }; 1940 !1while (z) { !Gcontinue; };
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2093 'test027', '''m(){try{}catch(eeee,ssss){s!1}''', <String>["1+ssss"]); 2093 'test027', '''m(){try{}catch(eeee,ssss){s!1}''', <String>["1+ssss"]);
2094 2094
2095 buildTests('test028', '''m(){var isX=3;if(is!1)''', <String>["1+isX"]); 2095 buildTests('test028', '''m(){var isX=3;if(is!1)''', <String>["1+isX"]);
2096 2096
2097 buildTests('test029', '''m(){[1].forEach((x)=>!1x);}''', <String>["1+x"]); 2097 buildTests('test029', '''m(){[1].forEach((x)=>!1x);}''', <String>["1+x"]);
2098 2098
2099 buildTests('test030', '''n(){[1].forEach((x){!1});}''', <String>["1+x"]); 2099 buildTests('test030', '''n(){[1].forEach((x){!1});}''', <String>["1+x"]);
2100 2100
2101 buildTests('test031', 2101 buildTests('test031',
2102 '''class Caster {} m() {try {} on Cas!1ter catch (CastBlock) {!2}}''', 2102 '''class Caster {} m() {try {} on Cas!1ter catch (CastBlock) {!2}}''',
2103 <String>["1+Caster", "1-CastBlock", "2+Caster", "2+CastBlock"], 2103 <String>["1+Caster", "1-CastBlock", "2+Caster", "2+CastBlock"]);
2104 failingTests: '1');
2105 2104
2106 buildTests('test032', ''' 2105 buildTests('test032', '''
2107 const ONE = 1; 2106 const ONE = 1;
2108 const ICHI = 10; 2107 const ICHI = 10;
2109 const UKSI = 100; 2108 const UKSI = 100;
2110 const EIN = 1000; 2109 const EIN = 1000;
2111 m() { 2110 m() {
2112 int x; 2111 int x;
2113 switch (x) { 2112 switch (x) {
2114 case !3ICHI: 2113 case !3ICHI:
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2290 } else { 2289 } else {
2291 ++expectedPassCount; 2290 ++expectedPassCount;
2292 tester(testName, () { 2291 tester(testName, () {
2293 CompletionTestCase test = new CompletionTestCase(); 2292 CompletionTestCase test = new CompletionTestCase();
2294 return test.runTest(spec, extraFiles); 2293 return test.runTest(spec, extraFiles);
2295 }); 2294 });
2296 } 2295 }
2297 } 2296 }
2298 } 2297 }
2299 } 2298 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698