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

Unified Diff: utils/tests/pub/command_line_config.dart

Issue 14071002: Added new version of reduce. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed more uses of max, and a few bugs. Created 7 years, 8 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
« pkg/stack_trace/lib/src/trace.dart ('K') | « utils/pub/package.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/command_line_config.dart
diff --git a/utils/tests/pub/command_line_config.dart b/utils/tests/pub/command_line_config.dart
index f05f93122974afe48b84573cb24694878a86cada..1efd7d1d2b3450a41fdf883ddf6fa59d96cd80c4 100644
--- a/utils/tests/pub/command_line_config.dart
+++ b/utils/tests/pub/command_line_config.dart
@@ -5,6 +5,7 @@
library command_line_config;
import 'dart:io';
+import 'dart:math';
import 'package:pathos/path.dart' as path;
import 'package:unittest/unittest.dart';
@@ -91,7 +92,7 @@ class CommandLineConfiguration extends Configuration {
if (stack.length == 0) return;
// Figure out the longest path so we know how much to pad.
- int longest = stack.map((frame) => frame.location.length).max();
+ int longest = stack.map((frame) => frame.location.length).reduce(max);
// Print out the stack trace nicely formatted.
for (var frame in stack) {
« pkg/stack_trace/lib/src/trace.dart ('K') | « utils/pub/package.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698