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

Unified Diff: tools/testing/dart/test_progress.dart

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: tools/testing/dart/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 203edbdd195cc33250eaef829dd273bce1f6f720..d4c0b208625aee8d64ec7637c8caf19e29b36f03 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -300,7 +300,7 @@ class CompactProgressIndicator extends CompactIndicator {
: super(startTime, printTiming);
void _printProgress() {
- var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
+ var percent = ((_completedTests() / _foundTests) * 100).truncate().toString();
Lasse Reichstein Nielsen 2013/01/04 10:29:42 .truncate().toString() => toStringAsFixed(0) ?
var progressPadded = _pad(_allTestsKnown ? percent : '--', 3);
var passedPadded = _pad(_passedTests.toString(), 5);
var failedPadded = _pad(_failedTests.toString(), 5);
@@ -331,7 +331,7 @@ class ColorProgressIndicator extends CompactIndicator {
}
void _printProgress() {
- var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
+ var percent = ((_completedTests() / _foundTests) * 100).truncate().toString();
var progressPadded = _pad(_allTestsKnown ? percent : '--', 3);
var passedPadded = _pad(_passedTests.toString(), 5);
var failedPadded = _pad(_failedTests.toString(), 5);
@@ -415,7 +415,7 @@ class BuildbotProgressIndicator extends ProgressIndicator {
if (test.lastCommandOutput.unexpectedOutput) {
status = 'fail';
}
- var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
+ var percent = ((_completedTests() / _foundTests) * 100).truncate().toString();
print('Done ${test.configurationString} ${test.displayName}: $status');
print('@@@STEP_CLEAR@@@');
print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@');

Powered by Google App Engine
This is Rietveld 408576698