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

Unified Diff: tests/standalone/priority_queue_stress_test.dart

Issue 701223003: Make priority_queue_stress_test pass analyzer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/priority_queue_stress_test.dart
===================================================================
--- tests/standalone/priority_queue_stress_test.dart (revision 41527)
+++ tests/standalone/priority_queue_stress_test.dart (working copy)
@@ -185,7 +185,7 @@
bool get isEmpty => restrictedQueues.length + mainQueue.length == 0;
- int get length => restrictedQueues.fold(0, (v, e) => v + element.length) +
+ int get length => restrictedQueues.fold(0, (v, e) => v + e.length) +
mainQueue.length;
PriorityQueue getRestricted(List<N> restrictions) {
@@ -208,7 +208,7 @@
var candidate = getRestricted([]);
if (candidate != null &&
(mainQueue.isEmpty ||
- mainQueue.first.priority < candidate.first.priority)) {
+ mainQueue.firstPriority < candidate.firstPriority)) {
return candidate.first;
}
return mainQueue.isEmpty ? null : mainQueue.first;
@@ -247,6 +247,7 @@
restrictedQueue.add(current, currentPriority);
}
}
+ return null;
}
String toString() {
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698