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

Unified Diff: tests/html/indexeddb_3_test.dart

Issue 11275054: Modified unittest to use new argument syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/html/indexeddb_3_test.dart
===================================================================
--- tests/html/indexeddb_3_test.dart (revision 14114)
+++ tests/html/indexeddb_3_test.dart (working copy)
@@ -12,7 +12,7 @@
class Test {
fail(message) => (e) {
guardAsync(() {
- Expect.fail('IndexedDB failure: $message');
+ expect(false, isTrue, reason: 'IndexedDB failure: $message');
});
};
@@ -100,13 +100,13 @@
itemCount += 1;
sumKeys += cursor.key;
window.console.log('${cursor.key} ${cursor.value}');
- Expect.equals('Item ${cursor.key}', cursor.value);
+ expect(cursor.value, 'Item ${cursor.key}');
cursor.continueFunction();
} else {
// Done
- Expect.equals(99, lastKey);
- Expect.equals(100, itemCount);
- Expect.equals((100 * 99) ~/ 2, sumKeys);
+ expect(lastKey, 99);
+ expect(itemCount, 100);
+ expect(sumKeys, (100 * 99) ~/ 2);
}
}, count:101));
cursorRequest.on.error.add(fail('openCursor'));
@@ -126,13 +126,13 @@
lastKey = cursor.key;
itemCount += 1;
sumKeys += cursor.key;
- Expect.equals('Item ${cursor.key}', cursor.value);
+ expect(cursor.value, 'Item ${cursor.key}');
cursor.continueFunction();
} else {
// Done
- Expect.equals(0, lastKey); // i.e. first key (scanned in reverse).
- Expect.equals(100, itemCount);
- Expect.equals((100 * 99) ~/ 2, sumKeys);
+ expect(lastKey, 0); // i.e. first key (scanned in reverse).
+ expect(itemCount, 100);
+ expect(sumKeys, (100 * 99) ~/ 2);
}
}, count:101));
cursorRequest.on.error.add(fail('openCursor'));

Powered by Google App Engine
This is Rietveld 408576698