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

Unified Diff: tests/html/indexeddb_1_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_1_test.dart
===================================================================
--- tests/html/indexeddb_1_test.dart (revision 14156)
+++ tests/html/indexeddb_1_test.dart (working copy)
@@ -7,7 +7,7 @@
const String STORE_NAME = 'TEST';
const int VERSION = 1;
-testReadWrite(key, value, check,
+testReadWrite(key, value, matcher,
[dbName = DB_NAME,
storeName = STORE_NAME,
version = VERSION]) => () {
@@ -30,7 +30,7 @@
request.on.success.add(expectAsync1((e) {
var object = e.target.result;
db.close();
- check(value, object);
+ expect(object, matcher);
}));
request.on.error.add(fail);
}
@@ -83,7 +83,7 @@
deleteRequest.on.error.add(fail);
};
-testReadWriteTyped(key, value, check,
+testReadWriteTyped(key, value, matcher,
[dbName = DB_NAME,
storeName = STORE_NAME,
version = VERSION]) => () {
@@ -106,7 +106,7 @@
request.on.success.add(expectAsync1((e) {
var object = e.target.result;
db.close();
- check(value, object);
+ expect(object, matcher);
}));
request.on.error.add(fail);
}
@@ -160,18 +160,17 @@
};
tests_dynamic() {
- test('test1', testReadWrite(123, 'Hoot!', Expect.equals));
- test('test2', testReadWrite(123, 12345, Expect.equals));
- test('test3', testReadWrite(123, [1,2,3], Expect.listEquals));
- test('test4', testReadWrite(123, const [2, 3, 4], Expect.listEquals));
+ test('test1', testReadWrite(123, 'Hoot!', equals('Hoot!')));
+ test('test2', testReadWrite(123, 12345, equals(12345)));
+ test('test3', testReadWrite(123, [1, 2, 3], equals([1, 2, 3])));
+ test('test4', testReadWrite(123, [2, 3, 4], equals([2, 3, 4])));
}
tests_typed() {
- test('test1', testReadWriteTyped(123, 'Hoot!', Expect.equals));
- test('test2', testReadWriteTyped(123, 12345, Expect.equals));
- test('test3', testReadWriteTyped(123, [1,2,3], Expect.listEquals));
- test('test4',
- testReadWriteTyped(123, const [2, 3, 4], Expect.listEquals));
+ test('test1', testReadWriteTyped(123, 'Hoot!', equals('Hoot!')));
+ test('test2', testReadWriteTyped(123, 12345, equals(12345)));
+ test('test3', testReadWriteTyped(123, [1, 2, 3], equals([1, 2, 3])));
+ test('test4', testReadWriteTyped(123, [2, 3, 4], equals([2, 3, 4])));
}
main() {

Powered by Google App Engine
This is Rietveld 408576698