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

Unified Diff: tests/html/indexeddb_1_test.dart

Issue 17574008: Fixing DateTime values in dart2js serialized script values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
« no previous file with comments | « sdk/lib/html/html_common/conversions.dart ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/indexeddb_1_test.dart
diff --git a/tests/html/indexeddb_1_test.dart b/tests/html/indexeddb_1_test.dart
index 7fb41fb0c7094fd51b72ceee34c04e81d1afc069..d5ccfd1742feaee741b85fa1721989126e3b421e 100644
--- a/tests/html/indexeddb_1_test.dart
+++ b/tests/html/indexeddb_1_test.dart
@@ -105,20 +105,16 @@ testReadWriteTyped(key, value, matcher,
});
};
-tests_dynamic() {
- 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])));
- test('test4', testReadWrite(123, false, equals(false)));
-}
-
-tests_typed() {
- 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])));
- test('test4', testReadWriteTyped(123, false, equals(false)));
+void testTypes(testFunction) {
+ test('String', testFunction(123, 'Hoot!', equals('Hoot!')));
+ test('int', testFunction(123, 12345, equals(12345)));
+ test('List', testFunction(123, [1, 2, 3], equals([1, 2, 3])));
+ test('List 2', testFunction(123, [2, 3, 4], equals([2, 3, 4])));
+ test('bool', testFunction(123, [true, false], equals([true, false])));
+ var now = new DateTime.now();
+ test('DateTime', testFunction(123, now,
+ predicate((date) =>
+ date.millisecondsSinceEpoch == now.millisecondsSinceEpoch)));
}
main() {
@@ -152,8 +148,12 @@ main() {
// Don't bother with these tests if it's unsupported.
if (idb.IdbFactory.supported) {
test('upgrade', testUpgrade);
- tests_dynamic();
- tests_typed();
+ group('dynamic', () {
+ testTypes(testReadWrite);
+ });
+ group('typed', () {
+ testTypes(testReadWriteTyped);
+ });
}
});
}
« no previous file with comments | « sdk/lib/html/html_common/conversions.dart ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698