Chromium Code Reviews| Index: pkg/analyzer/test/src/summary/resynthesize_common.dart |
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| index 41f5503828fcf7380590f2061038b4c5ffe34217..9ab21a607ea002efe9745b766ce0d23a86cefa31 100644 |
| --- a/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| +++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| @@ -3256,6 +3256,7 @@ class C<T, U> { |
| static void m<V, W>(V v, W w) { |
| void f<X, Y>(V v, W w, X x, Y y) { |
| } |
| + print(f); |
|
scheglov
2016/11/22 19:13:24
It might be cleaner to filter out "unused X" error
Paul Berry
2016/11/22 20:51:53
Good point. Done.
|
| } |
| } |
| '''); |
| @@ -3465,6 +3466,7 @@ Stream s; |
| checkLibrary(''' |
| f<U, V>() { |
| var x = () => 0; |
| + print(x); |
| } |
| '''); |
| } |
| @@ -3630,10 +3632,11 @@ class C { |
| } |
| test_initializer_executable_with_return_type_from_closure_local() { |
| - checkLibrary(''' |
| + checkLibrary(r''' |
| void f() { |
| int u = 0; |
| var v = () => 0; |
| + print('$u$v'); |
| } |
| '''); |
| } |
| @@ -3697,7 +3700,9 @@ f() { |
| f1() {} |
| { |
| f2() {} |
| + print(f2); |
| } |
| + print(f1); |
| } |
| '''); |
| } |
| @@ -3707,6 +3712,7 @@ f() { |
| class C { |
| C() { |
| f() {} |
| + print(f); |
| } |
| } |
| '''); |
| @@ -3717,6 +3723,7 @@ class C { |
| class C { |
| m() { |
| f() {} |
| + print(f); |
| } |
| } |
| '''); |
| @@ -3726,6 +3733,7 @@ class C { |
| checkLibrary(r''' |
| get g { |
| f() {} |
| + print(f); |
| } |
| '''); |
| } |
| @@ -3781,7 +3789,9 @@ main() { |
| class C { |
| C() { |
| int v; |
| + print(v); |
| f() {} |
| + print(f); |
| } |
| } |
| '''); |
| @@ -3792,13 +3802,19 @@ class C { |
| f() { |
| f1() { |
| int v1 = 1; |
| + print(v1); |
| } // 2 |
| + print(f1); |
| f2() { |
| int v1 = 1; |
| + print(v1); |
| f3() { |
| int v2 = 1; |
| + print(v2); |
| } |
| + print(f3); |
| } |
| + print(f2); |
| } |
| '''); |
| } |
| @@ -3808,6 +3824,7 @@ f() { |
| class C { |
| m() { |
| int v; |
| + print(v); |
| } |
| } |
| '''); |
| @@ -3817,10 +3834,13 @@ class C { |
| checkLibrary(r''' |
| main() { |
| int v1 = 1; |
| + print(v1); |
| { |
| const String v2 = 'bbb'; |
| + print(v2); |
| } |
| Map<int, List<double>> v3; |
| + print(v3); |
| } |
| '''); |
| } |
| @@ -3829,6 +3849,7 @@ main() { |
| checkLibrary(r''' |
| get g { |
| int v; |
| + print(v); |
| } |
| '''); |
| } |
| @@ -4097,13 +4118,14 @@ class C<T, U> { |
| void g<V, W>() { |
| void h<X, Y>(void p(T t, U u, V v, W w, X x, Y y)) { |
| } |
| + print(h); |
| } |
| } |
| '''); |
| } |
| test_nested_generic_functions_in_generic_class_with_local_variables() { |
| - checkLibrary(''' |
| + checkLibrary(r''' |
| class C<T, U> { |
| void g<V, W>() { |
| void h<X, Y>() { |
| @@ -4113,7 +4135,9 @@ class C<T, U> { |
| W w; |
| X x; |
| Y y; |
| + print('$t$u$v$w$x$y'); |
| } |
| + print(h); |
| } |
| } |
| '''); |
| @@ -4125,13 +4149,15 @@ void f<T, U>() { |
| void g<V, W>() { |
| void h<X, Y>(void p(T t, U u, V v, W w, X x, Y y)) { |
| } |
| + print(h); |
| } |
| + print(g); |
| } |
| '''); |
| } |
| test_nested_generic_functions_with_local_variables() { |
| - checkLibrary(''' |
| + checkLibrary(r''' |
| void f<T, U>() { |
| void g<V, W>() { |
| void h<X, Y>() { |
| @@ -4141,8 +4167,11 @@ void f<T, U>() { |
| W w; |
| X x; |
| Y y; |
| + print('$t$u$v$w$x$y'); |
| } |
| + print(h); |
| } |
| + print(g); |
| } |
| '''); |
| } |
| @@ -4230,6 +4259,7 @@ void named({x: 1}) {} |
| void f() { |
| var x = () => 0; |
| var y = x; |
| + print(y); |
| } |
| '''); |
| } |
| @@ -4293,6 +4323,7 @@ bool f() => true; |
| checkLibrary(''' |
| void f<T, U>(bool b) { |
| final v = b ? /*<V>*/(T t, U u, V v) => 0 : /*<V>*/(T t, U u, V v) => 1; |
| + print(v); |
| } |
| '''); |
| } |
| @@ -4310,6 +4341,7 @@ bool f() => false; |
| checkLibrary(''' |
| void f<T, U>(bool b) { |
| var v = b ? (T t, U u) => 0 : (T t, U u) => 1; |
| + print(v); |
| } |
| '''); |
| } |
| @@ -4540,47 +4572,51 @@ typedef F();'''); |
| } |
| test_unresolved_annotation_namedConstructorCall_noClass() { |
| - checkLibrary('@foo.bar() class C {}'); |
| + checkLibrary('@foo.bar() class C {}', allowErrors: true); |
| } |
| test_unresolved_annotation_namedConstructorCall_noConstructor() { |
| - checkLibrary('@String.foo() class C {}'); |
| + checkLibrary('@String.foo() class C {}', allowErrors: true); |
| } |
| test_unresolved_annotation_prefixedIdentifier_badPrefix() { |
| - checkLibrary('@foo.bar class C {}'); |
| + checkLibrary('@foo.bar class C {}', allowErrors: true); |
| } |
| test_unresolved_annotation_prefixedIdentifier_noDeclaration() { |
| - checkLibrary('import "dart:async" as foo; @foo.bar class C {}'); |
| + checkLibrary('import "dart:async" as foo; @foo.bar class C {}', |
| + allowErrors: true); |
| } |
| test_unresolved_annotation_prefixedNamedConstructorCall_badPrefix() { |
| - checkLibrary('@foo.bar.baz() class C {}'); |
| + checkLibrary('@foo.bar.baz() class C {}', allowErrors: true); |
| } |
| test_unresolved_annotation_prefixedNamedConstructorCall_noClass() { |
| - checkLibrary('import "dart:async" as foo; @foo.bar.baz() class C {}'); |
| + checkLibrary('import "dart:async" as foo; @foo.bar.baz() class C {}', |
| + allowErrors: true); |
| } |
| test_unresolved_annotation_prefixedNamedConstructorCall_noConstructor() { |
| - checkLibrary('import "dart:async" as foo; @foo.Future.bar() class C {}'); |
| + checkLibrary('import "dart:async" as foo; @foo.Future.bar() class C {}', |
| + allowErrors: true); |
| } |
| test_unresolved_annotation_prefixedUnnamedConstructorCall_badPrefix() { |
| - checkLibrary('@foo.bar() class C {}'); |
| + checkLibrary('@foo.bar() class C {}', allowErrors: true); |
| } |
| test_unresolved_annotation_prefixedUnnamedConstructorCall_noClass() { |
| - checkLibrary('import "dart:async" as foo; @foo.bar() class C {}'); |
| + checkLibrary('import "dart:async" as foo; @foo.bar() class C {}', |
| + allowErrors: true); |
| } |
| test_unresolved_annotation_simpleIdentifier() { |
| - checkLibrary('@foo class C {}'); |
| + checkLibrary('@foo class C {}', allowErrors: true); |
| } |
| test_unresolved_annotation_unnamedConstructorCall_noClass() { |
| - checkLibrary('@foo() class C {}'); |
| + checkLibrary('@foo() class C {}', allowErrors: true); |
| } |
| test_unresolved_export() { |