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

Side by Side Diff: pkg/analyzer/test/generated/non_hint_code_test.dart

Issue 2638183002: Issue 28027. Move Null to the bottom in the Analyzer. (Closed)
Patch Set: Fixes for review comments. Created 3 years, 11 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 analyzer.test.generated.non_hint_code_test; 5 library analyzer.test.generated.non_hint_code_test;
6 6
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:analyzer/src/error/codes.dart'; 8 import 'package:analyzer/src/error/codes.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/source_io.dart'; 10 import 'package:analyzer/src/generated/source_io.dart';
11 import 'package:test_reflective_loader/test_reflective_loader.dart'; 11 import 'package:test_reflective_loader/test_reflective_loader.dart';
12 12
13 import 'resolver_test_case.dart'; 13 import 'resolver_test_case.dart';
14 14
15 main() { 15 main() {
16 defineReflectiveSuite(() { 16 defineReflectiveSuite(() {
17 defineReflectiveTests(NonHintCodeTest); 17 defineReflectiveTests(NonHintCodeTest);
18 }); 18 });
19 } 19 }
20 20
21 @reflectiveTest 21 @reflectiveTest
22 class NonHintCodeTest extends ResolverTestCase { 22 class NonHintCodeTest extends ResolverTestCase {
23 test_async_future_object_without_return() async {
24 Source source = addSource('''
25 import 'dart:async';
26 Future<Object> f() async {}
27 ''');
28 await computeAnalysisResult(source);
29 assertNoErrors(source);
30 verify([source]);
31 }
32
23 test_deadCode_afterTryCatch() async { 33 test_deadCode_afterTryCatch() async {
24 Source source = addSource(''' 34 Source source = addSource('''
25 main() { 35 main() {
26 try { 36 try {
27 return f(); 37 return f();
28 } catch (e) { 38 } catch (e) {
29 print(e); 39 print(e);
30 } 40 }
31 print('not dead'); 41 print('not dead');
32 } 42 }
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 1371
1362 test_import_valid_outside_lib() async { 1372 test_import_valid_outside_lib() async {
1363 addNamedSource("/myproj/pubspec.yaml", ""); 1373 addNamedSource("/myproj/pubspec.yaml", "");
1364 addNamedSource("/myproj/web/other.dart", ""); 1374 addNamedSource("/myproj/web/other.dart", "");
1365 Source source = 1375 Source source =
1366 addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';"); 1376 addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';");
1367 await computeAnalysisResult(source); 1377 await computeAnalysisResult(source);
1368 assertNoErrors(source); 1378 assertNoErrors(source);
1369 } 1379 }
1370 } 1380 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/non_error_resolver_test.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698