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

Side by Side Diff: lib/test.dart

Issue 1960503002: Fix all strong-mode errors and warnings. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: .analysis_options Created 4 years, 7 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
« no previous file with comments | « lib/src/utils.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:path/path.dart' as p; 7 import 'package:path/path.dart' as p;
8 8
9 import 'src/backend/declarer.dart'; 9 import 'src/backend/declarer.dart';
10 import 'src/backend/test_platform.dart'; 10 import 'src/backend/test_platform.dart';
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 os: currentOSGuess); 58 os: currentOSGuess);
59 59
60 var engine = new Engine(); 60 var engine = new Engine();
61 engine.suiteSink.add(suite); 61 engine.suiteSink.add(suite);
62 engine.suiteSink.close(); 62 engine.suiteSink.close();
63 ExpandedReporter.watch(engine, 63 ExpandedReporter.watch(engine,
64 color: true, printPath: false, printPlatform: false); 64 color: true, printPath: false, printPlatform: false);
65 65
66 var success = await engine.run(); 66 var success = await engine.run();
67 // TODO(nweiz): Set the exit code on the VM when issue 6943 is fixed. 67 // TODO(nweiz): Set the exit code on the VM when issue 6943 is fixed.
68 if (success) return; 68 if (success) return null;
69 print(''); 69 print('');
70 new Future.error("Dummy exception to set exit code."); 70 new Future.error("Dummy exception to set exit code.");
71 }); 71 });
72 return _globalDeclarer; 72 return _globalDeclarer;
73 } 73 }
74 74
75 // TODO(nweiz): This and other top-level functions should throw exceptions if 75 // TODO(nweiz): This and other top-level functions should throw exceptions if
76 // they're called after the declarer has finished declaring. 76 // they're called after the declarer has finished declaring.
77 /// Creates a new test case with the given description (converted to a string) 77 /// Creates a new test case with the given description (converted to a string)
78 /// and body. 78 /// and body.
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 /// prefer [tearDown], and only use [tearDOwnAll] if the callback is 240 /// prefer [tearDown], and only use [tearDOwnAll] if the callback is
241 /// prohibitively slow. 241 /// prohibitively slow.
242 void tearDownAll(callback()) => _declarer.tearDownAll(callback); 242 void tearDownAll(callback()) => _declarer.tearDownAll(callback);
243 243
244 /// Registers an exception that was caught for the current test. 244 /// Registers an exception that was caught for the current test.
245 void registerException(error, [StackTrace stackTrace]) { 245 void registerException(error, [StackTrace stackTrace]) {
246 // This will usually forward directly to [Invoker.current.handleError], but 246 // This will usually forward directly to [Invoker.current.handleError], but
247 // going through the zone API allows other zones to consistently see errors. 247 // going through the zone API allows other zones to consistently see errors.
248 Zone.current.handleUncaughtError(error, stackTrace); 248 Zone.current.handleUncaughtError(error, stackTrace);
249 } 249 }
OLDNEW
« no previous file with comments | « lib/src/utils.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698