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

Side by Side Diff: tools/dom/docs/test/docs_test.dart

Issue 2827793002: Format all files under tools and utils directory. (Closed)
Patch Set: Format all files under tools and utils directory. Created 3 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 unified diff | Download patch
« no previous file with comments | « tools/dom/docs/lib/docs.dart ('k') | tools/dom/scripts/idlrenderer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library docs_test; 5 library docs_test;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
(...skipping 22 matching lines...) Expand all
33 // We should find a json file where we expect it. 33 // We should find a json file where we expect it.
34 expect(oldJson.existsSync(), isTrue); 34 expect(oldJson.existsSync(), isTrue);
35 35
36 // Save the last modified time to check it at the end. 36 // Save the last modified time to check it at the end.
37 var oldJsonModified = oldJson.lastModifiedSync(); 37 var oldJsonModified = oldJson.lastModifiedSync();
38 38
39 // There should be no test file yet. 39 // There should be no test file yet.
40 if (testJson.existsSync()) testJson.deleteSync(); 40 if (testJson.existsSync()) testJson.deleteSync();
41 assert(!testJson.existsSync()); 41 assert(!testJson.existsSync());
42 42
43 expect(convert(lib_uri, testJsonPath) 43 expect(
44 .then((bool anyErrors) { 44 convert(lib_uri, testJsonPath).then((bool anyErrors) {
45 expect(anyErrors, isFalse); 45 expect(anyErrors, isFalse);
46 46
47 // We should have a file now. 47 // We should have a file now.
48 expect(testJson.existsSync(), isTrue); 48 expect(testJson.existsSync(), isTrue);
49 49
50 // Ensure that there's nothing different between the new JSON and old. 50 // Ensure that there's nothing different between the new JSON and ol d.
51 expect(testJson.readAsStringSync(), equals(oldJson.readAsStringSync())); 51 expect(testJson.readAsStringSync(),
52 equals(oldJson.readAsStringSync()));
52 53
53 // Ensure that the old JSON file didn't actually change. 54 // Ensure that the old JSON file didn't actually change.
54 expect(oldJsonModified, equals(oldJson.lastModifiedSync())); 55 expect(oldJsonModified, equals(oldJson.lastModifiedSync()));
55 }), completes); 56 }),
57 completes);
56 }); 58 });
57 }); 59 });
58 } 60 }
OLDNEW
« no previous file with comments | « tools/dom/docs/lib/docs.dart ('k') | tools/dom/scripts/idlrenderer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698