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

Side by Side Diff: test/descriptor/file_test.dart

Issue 1152453009: pkg/scheduled_test: fix analyzer hints (Closed) Base URL: https://github.com/dart-lang/scheduled_test.git@master
Patch Set: nits Created 5 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 unified diff | Download patch
« no previous file with comments | « test/descriptor/directory_test.dart ('k') | test/descriptor/nothing_test.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 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:path/path.dart' as path; 7 import 'package:path/path.dart' as path;
8 import 'package:scheduled_test/descriptor.dart' as d; 8 import 'package:scheduled_test/descriptor.dart' as d;
9 import 'package:scheduled_test/scheduled_test.dart'; 9 import 'package:scheduled_test/scheduled_test.dart';
10 10
11 import 'package:metatest/metatest.dart';
12 import 'utils.dart'; 11 import 'utils.dart';
13 12
14 void main() { 13 void main() {
15 expectTestPasses('file().create() creates a file', () { 14 expectTestPasses('file().create() creates a file', () {
16 scheduleSandbox(); 15 scheduleSandbox();
17 16
18 d.file('name.txt', 'contents').create(); 17 d.file('name.txt', 'contents').create();
19 18
20 schedule(() { 19 schedule(() {
21 expect(new File(path.join(sandbox, 'name.txt')).readAsString(), 20 expect(new File(path.join(sandbox, 'name.txt')).readAsString(),
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 .writeAsString('barfoobaz'); 182 .writeAsString('barfoobaz');
184 }); 183 });
185 184
186 d.binaryMatcherFile('name.txt', contains(12)).validate(); 185 d.binaryMatcherFile('name.txt', contains(12)).validate();
187 }, (error) { 186 }, (error) {
188 expect(error.toString(), equals( 187 expect(error.toString(), equals(
189 "Expected: contains <12>\n" 188 "Expected: contains <12>\n"
190 " Actual: [98, 97, 114, 102, 111, 111, 98, 97, 122]\n")); 189 " Actual: [98, 97, 114, 102, 111, 111, 98, 97, 122]\n"));
191 }); 190 });
192 } 191 }
OLDNEW
« no previous file with comments | « test/descriptor/directory_test.dart ('k') | test/descriptor/nothing_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698