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

Unified Diff: tests/lib/async/deferred/deferred_api_test.dart

Issue 232563006: Insert checks before deferred calls and accesses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months 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
Index: tests/lib/async/deferred/deferred_api_test.dart
diff --git a/tests/lib/async/deferred/deferred_api_test.dart b/tests/lib/async/deferred/deferred_api_test.dart
index f138935434b82f9316e831e105627acc211624af..18eaf2258dbf30b3d4c31d034da038025629082f 100644
--- a/tests/lib/async/deferred/deferred_api_test.dart
+++ b/tests/lib/async/deferred/deferred_api_test.dart
@@ -20,15 +20,13 @@ main() {
print('unittest-suite-wait-for-done');
int counter = 0;
- lazy.load().then((bool didLoad) {
- Expect.isTrue(didLoad);
+ lazy.load().then((_) {
Johnni Winther 2014/04/11 07:34:54 Why this change?
sigurdm 2014/04/11 09:11:38 I removed the bool from the future in a previous C
Expect.equals(1, ++counter);
Expect.equals(42, lib.foo('b'));
print('lazy was loaded');
});
Expect.equals(0, counter);
- lazy.load().then((bool didLoad) {
- Expect.isFalse(didLoad);
+ lazy.load().then((_) {
Expect.equals(2, ++counter);
Expect.equals(42, lib.foo('b'));
print('lazy was loaded');

Powered by Google App Engine
This is Rietveld 408576698