Fix DeltaBlue and Richards.
diff --git a/example/DeltaBlue.dart b/example/DeltaBlue.dart
index 3eb23b4..152a3dd 100644
--- a/example/DeltaBlue.dart
+++ b/example/DeltaBlue.dart
@@ -448,7 +448,7 @@
/// Removes all traces of c from this variable.
void removeConstraint(Constraint c) {
- constraints = constraints.where((e) => c != e).toList();
+ constraints.removeWhere((e) => c == e);
if (determinedBy == c) determinedBy = null;
}
}
diff --git a/example/Richards.dart b/example/Richards.dart
index a5720b6..89af958 100644
--- a/example/Richards.dart
+++ b/example/Richards.dart
@@ -36,6 +36,7 @@
import 'package:benchmark_harness/benchmark_harness.dart';
+
main() {
new Richards().report();
}
@@ -77,8 +78,12 @@
print("Error during execution: queueCount = ${scheduler.queueCount}"
", holdCount = ${scheduler.holdCount}.");
}
- Expect.equals(EXPECTED_QUEUE_COUNT, scheduler.queueCount);
- Expect.equals(EXPECTED_HOLD_COUNT, scheduler.holdCount);
+ if (EXPECTED_QUEUE_COUNT != scheduler.queueCount) {
+ throw "bad scheduler queue-count";
+ }
+ if (EXPECTED_HOLD_COUNT != scheduler.holdCount) {
+ throw "bad scheduler hold-count";
+ }
}
static const int DATA_SIZE = 4;
@@ -120,7 +125,7 @@
int currentId;
TaskControlBlock list;
List<TaskControlBlock> blocks =
- new List<TaskControlBlock>.fixedLength(Richards.NUMBER_OF_IDS);
+ new List<TaskControlBlock>(Richards.NUMBER_OF_IDS);
/// Add an idle task to this scheduler.
void addIdleTask(int id, int priority, Packet queue, int count) {
@@ -461,7 +466,7 @@
int kind; // The type of this packet.
int a1 = 0;
- List<int> a2 = new List.fixedLength(Richards.DATA_SIZE);
+ List<int> a2 = new List(Richards.DATA_SIZE);
Packet(this.link, this.id, this.kind);