| Index: tests/html/indexeddb_2_test.dart
|
| diff --git a/tests/html/indexeddb_2_test.dart b/tests/html/indexeddb_2_test.dart
|
| index f99589286942cb227bdc8b63ddd2ec8927e543f5..74d0963a5a401c11258f440793d8e9cb29ee0c7a 100644
|
| --- a/tests/html/indexeddb_2_test.dart
|
| +++ b/tests/html/indexeddb_2_test.dart
|
| @@ -75,7 +75,9 @@ testReadWrite(key, value, check,
|
| };
|
|
|
|
|
| -tests_dynamic() {
|
| +main() {
|
| + useHtmlConfiguration();
|
| +
|
| var obj1 = {'a': 100, 'b': 's'};
|
| var obj2 = {'x': obj1, 'y': obj1}; // DAG.
|
|
|
| @@ -87,14 +89,33 @@ tests_dynamic() {
|
| obj4['a'] = 100;
|
| obj4['b'] = 's';
|
|
|
| - test('test_simple', testReadWrite(123, obj1, verifyGraph));
|
| - test('test_DAG', testReadWrite(123, obj2, verifyGraph));
|
| - test('test_cycle', testReadWrite(123, obj3, verifyGraph));
|
| - test('test_simple_splay', testReadWrite(123, obj4, verifyGraph));
|
| -}
|
| + var cyclic_list = [1, 2, 3];
|
| + cyclic_list[1] = cyclic_list;
|
|
|
| -main() {
|
| - useHtmlConfiguration();
|
| + go(name, data) => test(name, testReadWrite(123, data, verifyGraph));
|
| +
|
| + test('test_verifyGraph', () {
|
| + // Nice to know verifyGraph is working before we rely on it.
|
| + Expect.mapEquals(obj4, obj4);
|
| + verifyGraph(obj4, obj4);
|
| + verifyGraph(obj1, new Map.from(obj1));
|
| + verifyGraph(obj4, new Map.from(obj4));
|
| +
|
| + var l1 = [1,2,3];
|
| + var l2 = [const [1, 2, 3], const [1, 2, 3]];
|
| + verifyGraph([l1, l1], l2);
|
| + Expect.throws(() => verifyGraph([[1, 2, 3], [1, 2, 3]], l2));
|
| +
|
| + verifyGraph(cyclic_list, cyclic_list);
|
| + });
|
|
|
| - tests_dynamic();
|
| + go('test_simple', obj1);
|
| + go('test_DAG', obj2);
|
| + go('test_cycle', obj3);
|
| + go('test_simple_splay', obj4);
|
| + go('const_array_1', const [const [1], const [2]]);
|
| + go('const_array_dag', const [const [1], const [1]]);
|
| + go('array_deferred_copy', [1,2,3, obj3, obj3, 6]);
|
| + go('array_deferred_copy_2', [1,2,3, [4, 5, obj3], [obj3, 6]]);
|
| + go('cyclic_list', cyclic_list);
|
| }
|
|
|