mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 12:13:01 +00:00
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:
parent
41bc926f6c
commit
fded2906b8
|
@ -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() {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue