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

Side by Side Diff: pkg/watcher/test/utils.dart

Issue 23582003: Use filtered stacks in pub, barback, and watcher tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « pkg/scheduled_test/lib/scheduled_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 watcher.test.utils; 5 library watcher.test.utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 20 matching lines...) Expand all
31 /// times. This means using the real file system requires us to put delays in 31 /// times. This means using the real file system requires us to put delays in
32 /// the tests to ensure we wait long enough between operations for the mod time 32 /// the tests to ensure we wait long enough between operations for the mod time
33 /// to be different. 33 /// to be different.
34 /// 34 ///
35 /// Instead, we'll just mock that out. Each time a file is written, we manually 35 /// Instead, we'll just mock that out. Each time a file is written, we manually
36 /// increment the mod time for that file instantly. 36 /// increment the mod time for that file instantly.
37 Map<String, int> _mockFileModificationTimes; 37 Map<String, int> _mockFileModificationTimes;
38 38
39 void initConfig() { 39 void initConfig() {
40 useCompactVMConfiguration(); 40 useCompactVMConfiguration();
41 filterStacks = true;
41 } 42 }
42 43
43 /// Creates the sandbox directory the other functions in this library use and 44 /// Creates the sandbox directory the other functions in this library use and
44 /// ensures it's deleted when the test ends. 45 /// ensures it's deleted when the test ends.
45 /// 46 ///
46 /// This should usually be called by [setUp]. 47 /// This should usually be called by [setUp].
47 void createSandbox() { 48 void createSandbox() {
48 var dir = new Directory("").createTempSync(); 49 var dir = new Directory("").createTempSync();
49 _sandboxDir = dir.path; 50 _sandboxDir = dir.path;
50 51
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 220
220 Description describe(Description description) { 221 Description describe(Description description) {
221 description.add("$type $path"); 222 description.add("$type $path");
222 } 223 }
223 224
224 bool matches(item, Map matchState) => 225 bool matches(item, Map matchState) =>
225 item is WatchEvent && 226 item is WatchEvent &&
226 item.type == type && 227 item.type == type &&
227 p.normalize(item.path) == p.normalize(path); 228 p.normalize(item.path) == p.normalize(path);
228 } 229 }
OLDNEW
« no previous file with comments | « pkg/scheduled_test/lib/scheduled_test.dart ('k') | sdk/lib/_internal/pub/test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698