Make priority_queue_stress_test pass analyzer.

BUG=21468
R=whesse@google.com

Review URL: https://codereview.chromium.org//701223003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41559 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
koda@google.com 2014-11-06 14:17:37 +00:00
parent 41bc926f6c
commit fded2906b8
2 changed files with 3 additions and 4 deletions

View file

@ -185,7 +185,7 @@ class RestrictViewPriorityQueue<N extends TypedElement, P extends Priority> {
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 @@ class RestrictViewPriorityQueue<N extends TypedElement, P extends Priority> {
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 @@ class RestrictViewPriorityQueue<N extends TypedElement, P extends Priority> {
restrictedQueue.add(current, currentPriority);
}
}
return null;
}
String toString() {

View file

@ -60,8 +60,6 @@ io/file_constructor_test: fail
# This is runtime test.
io/process_exit_negative_test: Skip
priority_queue_stress_test: StaticWarning # Issue 21468
[ $compiler == dart2js ]
number_identity_test: Skip # Bigints and int/double diff. not supported.
typed_data_test: Skip # dart:typed_data support needed.