| 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 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 buildTests('testCommentSnippets014', ''' | 108 buildTests('testCommentSnippets014', ''' |
| 109 typedef n!1 ;''', <String>["1+num"]); | 109 typedef n!1 ;''', <String>["1+num"]); |
| 110 | 110 |
| 111 buildTests('testCommentSnippets015', ''' | 111 buildTests('testCommentSnippets015', ''' |
| 112 class D {f(){} g(){f!1(f!2);}}''', <String>["1+f", "2+f"]); | 112 class D {f(){} g(){f!1(f!2);}}''', <String>["1+f", "2+f"]); |
| 113 | 113 |
| 114 buildTests('testCommentSnippets016', ''' | 114 buildTests('testCommentSnippets016', ''' |
| 115 class F {m() { m(); !1}}''', <String>["1+m"]); | 115 class F {m() { m(); !1}}''', <String>["1+m"]); |
| 116 | 116 |
| 117 buildTests('testCommentSnippets017', ''' | 117 buildTests('testCommentSnippets017', ''' |
| 118 class F {var x = !1false;}''', <String>["1+true"], failingTests: '1'); | 118 class F {var x = !1false;}''', <String>["1+true"]); |
| 119 | 119 |
| 120 buildTests('testCommentSnippets018', ''' | 120 buildTests('testCommentSnippets018', ''' |
| 121 class Map{}class Arrays{}class C{ m(!1){} n(!2 x, q)''', | 121 class Map{}class Arrays{}class C{ m(!1){} n(!2 x, q)''', |
| 122 <String>["1+Map", "1-void", "1-null", "2+Arrays", "2-void", "2-null"]); | 122 <String>["1+Map", "1-void", "1-null", "2+Arrays", "2-void", "2-null"]); |
| 123 | 123 |
| 124 buildTests('testCommentSnippets019', ''' | 124 buildTests('testCommentSnippets019', ''' |
| 125 class A{m(){Object x;x.!1/**/clear()''', <String>["1+toString"]); | 125 class A{m(){Object x;x.!1/**/clear()''', <String>["1+toString"]); |
| 126 | 126 |
| 127 buildTests('testCommentSnippets020', ''' | 127 buildTests('testCommentSnippets020', ''' |
| 128 classMap{}class tst {var newt;void newf(){}test() {var newz;new!1/**/;}}''', | 128 classMap{}class tst {var newt;void newf(){}test() {var newz;new!1/**/;}}''', |
| (...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 "B+on", | 1961 "B+on", |
| 1962 "C+catch", | 1962 "C+catch", |
| 1963 "D+var", | 1963 "D+var", |
| 1964 "E+void", | 1964 "E+void", |
| 1965 "F+assert", | 1965 "F+assert", |
| 1966 "G+continue", | 1966 "G+continue", |
| 1967 "H+break", | 1967 "H+break", |
| 1968 "J+if", | 1968 "J+if", |
| 1969 "K+else", | 1969 "K+else", |
| 1970 "L+return" | 1970 "L+return" |
| 1971 ], failingTests: '59BCHK'); | 1971 ], failingTests: '35BCHK'); |
| 1972 | 1972 |
| 1973 // operators in function | 1973 // operators in function |
| 1974 buildTests('test015', '''f(a,b,c) => a + b * c !1;''', <String>["1+=="], | 1974 buildTests('test015', '''f(a,b,c) => a + b * c !1;''', <String>["1+=="], |
| 1975 failingTests: '1'); | 1975 failingTests: '1'); |
| 1976 | 1976 |
| 1977 // operators in return | 1977 // operators in return |
| 1978 buildTests('test016', | 1978 buildTests('test016', |
| 1979 '''class X {dynamic f(a,b,c) {return a + b * c !1;}}''', <String>[ | 1979 '''class X {dynamic f(a,b,c) {return a + b * c !1;}}''', <String>[ |
| 1980 "1+==" | 1980 "1+==" |
| 1981 ], failingTests: '1'); | 1981 ], failingTests: '1'); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1998 | 1998 |
| 1999 // keywords | 1999 // keywords |
| 2000 buildTests('test018', '''!1part !2of foo;''', <String>["1+part", "2+of"], | 2000 buildTests('test018', '''!1part !2of foo;''', <String>["1+part", "2+of"], |
| 2001 failingTests: '2'); | 2001 failingTests: '2'); |
| 2002 | 2002 |
| 2003 buildTests('test019', ''' | 2003 buildTests('test019', ''' |
| 2004 var truefalse = 0; | 2004 var truefalse = 0; |
| 2005 var falsetrue = 1; | 2005 var falsetrue = 1; |
| 2006 main() { | 2006 main() { |
| 2007 var foo = true!1 | 2007 var foo = true!1 |
| 2008 }''', <String>["1+true", "1+truefalse", "1-falsetrue"], failingTests: '1'); | 2008 }''', <String>["1+true", "1+truefalse", "1-falsetrue"]); |
| 2009 | 2009 |
| 2010 buildTests('test020', '''var x = null.!1''', <String>["1+toString"], | 2010 buildTests('test020', '''var x = null.!1''', <String>["1+toString"], |
| 2011 failingTests: '1'); | 2011 failingTests: '1'); |
| 2012 | 2012 |
| 2013 buildTests('test021', '''var x = .!1''', <String>["1-toString"]); | 2013 buildTests('test021', '''var x = .!1''', <String>["1-toString"]); |
| 2014 | 2014 |
| 2015 buildTests('test022', '''var x = .!1;''', <String>["1-toString"]); | 2015 buildTests('test022', '''var x = .!1;''', <String>["1-toString"]); |
| 2016 | 2016 |
| 2017 buildTests('test023', ''' | 2017 buildTests('test023', ''' |
| 2018 class Map{getKeys(){}} | 2018 class Map{getKeys(){}} |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2286 } else { | 2286 } else { |
| 2287 ++expectedPassCount; | 2287 ++expectedPassCount; |
| 2288 tester(testName, () { | 2288 tester(testName, () { |
| 2289 CompletionTestCase test = new CompletionTestCase(); | 2289 CompletionTestCase test = new CompletionTestCase(); |
| 2290 return test.runTest(spec, extraFiles); | 2290 return test.runTest(spec, extraFiles); |
| 2291 }); | 2291 }); |
| 2292 } | 2292 } |
| 2293 } | 2293 } |
| 2294 } | 2294 } |
| 2295 } | 2295 } |
| OLD | NEW |