• Vyacheslav Egorov's avatar
    Strong mode fixes in tests (#14520) · 0556e14f
    Vyacheslav Egorov authored
    * Use explicit types for onClick handler in diagnostics_test.
    
    This test formats it to string and expects exact match.
    
    Before this change onClick had type () => dynamic in Dart 1 and () => Null in
    Dart 2.
    
    * Fix strong mode issues in packages/flutter/test/material/dropdown_test.dart
    
    Pass explicit type argument to renderObjectList(...) in expressions like
    
         List<RenderBox> l = tester.renderObjectList(...).toList();
    
    Dart 2 mode inference is not strong enough to infer RenderBox as a type argument
    fto renderObjectList and passes RenderObject instead, which later leads to
    runtime check failures (because List<RenderObject> is not List<RenderBox>).
    
    * Fix strong mode issues in packages/flutter/test/material/theme_test.dart.
    
    Pass type argument explicity to widgetList. Dart 2 type inference can't infer
    it by itself.
    
    * Fix strong mode issue packages/flutter/test/widgets/unique_widget_test.dart
    
    Pass correct type argument to GlobalKey.
    
    * Fix type annotation in packages/flutter/test/material/app_test.dart.
    
    pushNamed returns Future<Object> not Future<String>.
    0556e14f
Name
Last commit
Last update
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
ISSUE_TEMPLATE.md Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
analysis_options.yaml Loading commit data...
analysis_options_repo.yaml Loading commit data...
appveyor.yml Loading commit data...
flutter_console.bat Loading commit data...