| Index: tests/standalone/io/code_collection_test.dart
|
| diff --git a/tests/standalone/io/code_collection_test.dart b/tests/standalone/io/code_collection_test.dart
|
| index 4db22015a211a3e0a9e06f4151a0436af4745c1b..4e352dcff6bc8fc77ea0608dc8d514aab792c1fb 100644
|
| --- a/tests/standalone/io/code_collection_test.dart
|
| +++ b/tests/standalone/io/code_collection_test.dart
|
| @@ -74,21 +74,28 @@ main(List<String> arguments) {
|
| // Code drops are logged with --log-code-drop. Look through stdout for the
|
| // message that foo's code was dropped.
|
| print(pr.stdout);
|
| - var count = 0;
|
| + bool saw_foo2 = false;
|
| + bool saw_detaching_foo = false;
|
| + bool saw_foo3 = false;
|
| pr.stdout.split("\n").forEach((line) {
|
| if (line.contains("foo=2")) {
|
| - Expect.equals(0, count);
|
| - count++;
|
| + Expect.isFalse(saw_foo2, "foo=2 ran twice");
|
| + saw_foo2 = true;
|
| }
|
| if (line.contains("Detaching code") && line.contains("foo")) {
|
| - Expect.equals(1, count);
|
| - count++;
|
| + Expect.isTrue(saw_foo2, "foo detached before running");
|
| + // May detach twice.
|
| + saw_detaching_foo = true;
|
| }
|
| if (line.contains("foo=3")) {
|
| - Expect.equals(2, count);
|
| - count++;
|
| + Expect.isFalse(saw_foo3, "foo=3 ran twice");
|
| + Expect.isTrue(saw_detaching_foo, "foo should have been collected");
|
| + saw_foo3 = true;
|
| }
|
| });
|
| - Expect.equals(3, count);
|
| +
|
| + Expect.isTrue(saw_foo2, "Missing foo=2");
|
| + Expect.isTrue(saw_detaching_foo, "Missing code collection for foo");
|
| + Expect.isTrue(saw_foo3, "Missing foo=3");
|
| }
|
| }
|
|
|